deskflow/src/lib/synergy/win32/AppUtilWindows.h

63 lines
1.4 KiB
C
Raw Normal View History

2012-06-10 16:50:54 +00:00
/*
* synergy -- mouse and keyboard sharing utility
* Copyright (C) 2012 Bolton Software Ltd.
* Copyright (C) 2002 Chris Schoeneman
2012-06-10 16:50:54 +00:00
*
* This package is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* found in the file COPYING that should have accompanied this file.
*
* This package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "synergy/AppUtil.h"
#include "base/String.h"
2012-06-10 16:50:54 +00:00
#define WIN32_LEAN_AND_MEAN
#include "Windows.h"
2014-11-11 13:51:47 +00:00
#define ARCH_APP_UTIL AppUtilWindows
2012-06-10 16:50:54 +00:00
class IEventQueue;
2012-06-10 16:50:54 +00:00
enum AppExitMode {
kExitModeNormal,
kExitModeDaemon
};
2014-11-11 13:51:47 +00:00
class AppUtilWindows : public AppUtil {
2012-06-10 16:50:54 +00:00
public:
2014-11-11 13:51:47 +00:00
AppUtilWindows(IEventQueue* events);
virtual ~AppUtilWindows();
2012-06-10 16:50:54 +00:00
int daemonNTStartup(int, char**);
int daemonNTMainLoop(int argc, const char** argv);
void debugServiceWait();
int run(int argc, char** argv);
void exitApp(int code);
void beforeAppExit();
2014-11-11 13:51:47 +00:00
static AppUtilWindows& instance();
2012-06-10 16:50:54 +00:00
void startNode();
private:
AppExitMode m_exitMode;
IEventQueue* m_events;
2014-11-11 13:51:47 +00:00
static BOOL WINAPI consoleHandler(DWORD Event);
2012-06-10 16:50:54 +00:00
};