Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

CAutoStart.h

00001 /*
00002  * synergy -- mouse and keyboard sharing utility
00003  * Copyright (C) 2002 Chris Schoeneman
00004  * 
00005  * This package is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU General Public License
00007  * found in the file COPYING that should have accompanied this file.
00008  * 
00009  * This package is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  */
00014 
00015 #ifndef CAUTOSTART_H
00016 #define CAUTOSTART_H
00017 
00018 #include "CString.h"
00019 
00020 #define WINDOWS_LEAN_AND_MEAN
00021 #include <windows.h>
00022 
00024 class CAutoStart {
00025 public:
00026     CAutoStart(HWND parent, bool isServer, const CString& cmdLine);
00027     ~CAutoStart();
00028 
00030 
00031 
00033 
00036     void                doModal();
00037 
00039 
00042     static void         reinstallDaemon(bool isClient, const CString& cmdLine);
00043 
00045 
00048     static void         uninstallDaemons(bool client);
00049 
00051 
00055     static bool         startDaemon();
00056 
00058 
00059 
00060 
00062 
00065     static bool         isDaemonInstalled();
00066 
00068 
00069 private:
00070     void                update();
00071     bool                onInstall(bool allUsers);
00072     bool                onUninstall(bool allUsers);
00073 
00074     // message handling
00075     BOOL                doDlgProc(HWND, UINT, WPARAM, LPARAM);
00076     static BOOL CALLBACK dlgProc(HWND, UINT, WPARAM, LPARAM);
00077 
00078 private:
00079     static CAutoStart*  s_singleton;
00080 
00081     HWND                m_parent;
00082     bool                m_isServer;
00083     CString             m_cmdLine;
00084     CString             m_name;
00085     HWND                m_hwnd;
00086     bool                m_install;
00087     CString             m_errorMessage;
00088 };
00089 
00090 #endif

Generated on Fri Nov 6 00:21:13 2009 for synergy-plus by  doxygen 1.3.9.1