summaryrefslogtreecommitdiff
path: root/bin/bbackupd/Win32BackupService.cpp
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2015-12-13 23:39:18 +0000
committerChris Wilson <chris+github@qwirx.com>2015-12-13 23:50:06 +0000
commit403e7e2051ee3bd3e16a616cfca63b036481282b (patch)
treebd9d5c2ed3623990158727ffe76c49ffad92966c /bin/bbackupd/Win32BackupService.cpp
parente77de564aaacaed07075eaac1974d35d09dd2bce (diff)
Move reusable code out of bin directories.
Allows tests to depend on lib/bbackupd instead of bin/bbackupd, which was always a hack, and really doesn't work with CMake.
Diffstat (limited to 'bin/bbackupd/Win32BackupService.cpp')
-rw-r--r--bin/bbackupd/Win32BackupService.cpp48
1 files changed, 0 insertions, 48 deletions
diff --git a/bin/bbackupd/Win32BackupService.cpp b/bin/bbackupd/Win32BackupService.cpp
deleted file mode 100644
index 6d027abf..00000000
--- a/bin/bbackupd/Win32BackupService.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-// Win32 service functions for Box Backup, by Nick Knight
-
-#ifdef WIN32
-
-#include "Box.h"
-#include "BackupDaemon.h"
-#include "MainHelper.h"
-#include "BoxPortsAndFiles.h"
-#include "BackupStoreException.h"
-
-#include "MemLeakFindOn.h"
-
-#include "Win32BackupService.h"
-
-Win32BackupService* gpDaemonService = NULL;
-extern HANDLE gStopServiceEvent;
-extern DWORD gServiceReturnCode;
-
-unsigned int WINAPI RunService(LPVOID lpParameter)
-{
- DWORD retVal = gpDaemonService->WinService((const char*) lpParameter);
- gServiceReturnCode = retVal;
- SetEvent(gStopServiceEvent);
- return retVal;
-}
-
-void TerminateService(void)
-{
- gpDaemonService->SetTerminateWanted();
-}
-
-DWORD Win32BackupService::WinService(const char* pConfigFileName)
-{
- DWORD ret;
-
- if (pConfigFileName != NULL)
- {
- ret = this->Main(pConfigFileName);
- }
- else
- {
- ret = this->Main(BOX_GET_DEFAULT_BBACKUPD_CONFIG_FILE);
- }
-
- return ret;
-}
-
-#endif // WIN32