#A4# #Start synergyc Synergy+ Client# #Platform?# #main(...)# #Unix (Linux/Mac)# #WinMain(...)# #Windows# #ARCH->openConsole(...) Show log window for test mode in Windows# ## ## ## ## ## ## #run(..., startup) Cross-platform; execution steps into here until exit; passes in the startup(...) function pointer# ## ## ## #CLOG->insert(...) Setup logging# #startup(...) pointer to one of: - daemonNTStartup() - foregroundStartup() - standardStartup()# #assign: startup = daemonNTStartup(...) ... or ... foregroundStartup(...) Function ptr for later# ## ## ## #assign: startup = standardStartup(...) Function ptr for later# ## ## ## #Exit occurs when the run() method is stepped out of; which occurs when mainLoop() ends and steps out# ## ## ## #daemonNTStartup(...) Windows service, invisible to user (1.3.3: Windows XP only)# #daemonNTMainLoop()# ## ## ## ## ## ## #parse(...) Parses command line args and stores the input values in static variables# ## ## ## #CArchMiscWindows::runDaemon(mainLoop)# ## ## ## #foregroundStartup() Windows foreground app with tray icon, etc# ## ## ## ## ## ## #mainLoop() Main execution loop for both Windows and Unix in all modes; all routes lead to here# ## ## ## #standardStartup() Unix start up mode; starts either a loop or a threaed daemon# ## ## ## ## ## ## #ARCH->showConsole(...) Shows a console window on Unix when non-daemon# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #daemonMainLoop(...) In Unix mode this is called via "demonizer" function, and does some logging before entering mainLoop()# ## ## ## #Cross-platform activities are displayed with red border and blue background# ## ## ## #CArchDaemonWindows::runDaemon(mainLoop)# ## ## ## #s_daemon->doRunDaemon(mainLoop) Fairly complex function which controls the Windows service, and invokes mainLoop, which runs in a thread# ## ## ## ## ## ## #startClient() Starts the client in another thread, which handles the events as they arrive# #getEvent(ref: event)# #dispatchEvent(ref: event)# ## ## ## #event != CEvent::kQuit# ## ## ## #true# ## ## ## ## ## ## ## ## ## ## ## #Exit occurs when the event is a quit message, and mainLoop() returns# ## ## ## #false# ## ##