Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / orbsvcs / ImplRepo_Service / Activator_NT_Service.h
blob7ce65127d7bce1473df4b49c4db530aaf9f4a6b9
1 /* -*- C++ -*- */
2 //=============================================================================
3 /**
4 * @file Activator_NT_Service.h
6 * @author Darrell Brunsch <brunsch@cs.wustl.edu>
7 * @author Jeff Parsons <parsons@cs.wustl.edu>
8 * @author John Tucker <jtucker@infoglide.com>
9 * @author Mike Vitalo <mvitalo@infoglide.com>
11 //=============================================================================
13 #ifndef Activator_NT_Service_H
14 #define Activator_NT_Service_H
16 #include "ace/config-all.h"
18 #if defined (ACE_WIN32) && !defined (ACE_LACKS_WIN32_SERVICES)
20 #include "ace/NT_Service.h"
21 #include "ace/Singleton.h"
22 #include "ace/Synch.h"
23 #include "tao/orbconf.h"
25 #if !defined (ACE_LACKS_PRAGMA_ONCE)
26 # pragma once
27 #endif /* ACE_LACKS_PRAGMA_ONCE */
29 extern const ACE_TCHAR * IMR_ACTIVATOR_SERVICE_NAME;
30 extern const ACE_TCHAR * IMR_ACTIVATOR_DISPLAY_NAME;
31 extern const ACE_TCHAR * IMR_ACTIVATOR_DESCRIPTION;
33 /**
34 * @class Activator_NT_Service
36 * @brief Allows the Implementation Repository to act as a Windows NT Service.
38 class Activator_NT_Service : public ACE_NT_Service
40 public:
41 typedef TAO_SYNCH_RECURSIVE_MUTEX MUTEX;
43 /// We override <handle_control> because it handles stop requests
44 /// privately.
45 virtual void handle_control (DWORD control_code);
47 /// We override <handle_exception> so a 'stop' control code can wake
48 /// the reactor off of its wait.
49 virtual int handle_exception (ACE_HANDLE h);
51 /// This is a virtual method inherited from ACE_NT_Service.
52 virtual int svc ();
53 private:
54 friend class ACE_Singleton<Activator_NT_Service, MUTEX>;
57 typedef ACE_Singleton<Activator_NT_Service, ACE_Mutex> SERVICE;
59 #endif /* ACE_WIN32 && !ACE_LACKS_WIN32_SERVICES */
61 #endif /* Activator_NT_Service_H */