• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • dcop
 

dcop

  • dcop
dcopserver_win.cpp
1 /*
2  This file is part of the KDE libraries
3  Copyright (C) 2005 Andreas Roth <aroth@arsoft-online.com>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License version 2 as published by the Free Software Foundation.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 */
19 
20 //this file is included by dcopserver.cpp
21 
22 #include <tqeventloop.h>
23 
24 DWORD WINAPI DCOPServer::TerminatorThread(void * pParam)
25 {
26  DCOPServer * server = (DCOPServer*)pParam;
27 
28  WaitForSingleObject(server->m_evTerminate,INFINITE);
29  fprintf( stderr, "[dcopserver_win] Terminate event signaled\n" );
30  if(!server->shutdown) {
31 
32  ResetEvent(server->m_evTerminate);
33  server->slotShutdown();
34 
35  // Wait for main thread to tell us to realy terminate now
36  // Need some further event processing to get the timer signals
37  while(WaitForSingleObject(server->m_evTerminate,100) != WAIT_OBJECT_0)
38  TQApplication::eventLoop()->processEvents(TQEventLoop::ExcludeUserInput|TQEventLoop::ExcludeSocketNotifiers);
39  fprintf( stderr, "[dcopserver_win] Terminated event signaled the last time\n" );
40  }
41  fprintf( stderr, "[dcopserver_win] Terminate thread teminated\n" );
42  return 0;
43 }
44 
45 BOOL WINAPI DCOPServer::dcopServerConsoleProc(DWORD dwCtrlType)
46 {
47  BOOL ret;
48  switch(dwCtrlType)
49  {
50  case CTRL_BREAK_EVENT:
51  case CTRL_CLOSE_EVENT:
52  case CTRL_LOGOFF_EVENT:
53  case CTRL_SHUTDOWN_EVENT:
54  case CTRL_C_EVENT:
55  system(findDcopserverShutdown()+" --nokill");
56  ret = TRUE;
57  break;
58  default:
59  ret = FALSE;
60  }
61  return ret;
62 }
63 

dcop

Skip menu "dcop"
  • Main Page
  • Modules
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

dcop

Skip menu "dcop"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for dcop by doxygen 1.9.1
This website is maintained by Timothy Pearson.