NT_Service.inl

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // NT_Service.inl,v 4.2 2005/10/28 16:14:53 ossama Exp
00004 
00005 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00006 
00007 ACE_INLINE
00008 ACE_NT_Service::ACE_NT_Service (DWORD start_timeout,
00009                                 DWORD service_type,
00010                                 DWORD controls_mask) :
00011                                  start_time_(start_timeout),
00012                                  svc_handle_(0),
00013                                  svc_sc_handle_(0),
00014                                  name_(0),
00015                                  desc_(0),
00016                                  host_(0)
00017 {
00018   svc_status_.dwServiceType = service_type;
00019   svc_status_.dwCurrentState = 0;
00020   svc_status_.dwControlsAccepted = controls_mask;
00021   svc_status_.dwWin32ExitCode = NO_ERROR;
00022   svc_status_.dwServiceSpecificExitCode = 0;
00023   svc_status_.dwCheckPoint = 0;
00024   svc_status_.dwWaitHint = 0;
00025 }
00026 
00027 
00028 ACE_INLINE
00029 ACE_NT_Service::ACE_NT_Service (const ACE_TCHAR *name,
00030                                 const ACE_TCHAR *desc,
00031                                 DWORD start_timeout,
00032                                 DWORD service_type,
00033                                 DWORD controls_mask) :
00034                                  start_time_(start_timeout),
00035                                  svc_handle_(0),
00036                                  svc_sc_handle_(0),
00037                                  name_(ACE::strnew(name)),
00038                                  desc_(ACE::strnew(desc)),
00039                                  host_(0)
00040 {
00041   svc_status_.dwServiceType = service_type;
00042   svc_status_.dwCurrentState = 0;
00043   svc_status_.dwControlsAccepted = controls_mask;
00044   svc_status_.dwWin32ExitCode = NO_ERROR;
00045   svc_status_.dwServiceSpecificExitCode = 0;
00046   svc_status_.dwCheckPoint = 0;
00047 }
00048 
00049 
00050 ACE_INLINE int
00051 ACE_NT_Service::svc (void)
00052 {
00053   return -1;
00054 }
00055 
00056 
00057 ACE_INLINE
00058 const ACE_TCHAR *
00059 ACE_NT_Service::name (void) const
00060 {
00061   return name_;
00062 }
00063 
00064 ACE_INLINE
00065 const ACE_TCHAR *
00066 ACE_NT_Service::desc (void) const
00067 {
00068   return desc_;
00069 }
00070 
00071 ACE_INLINE
00072 const ACE_TCHAR *
00073 ACE_NT_Service::host (void) const
00074 {
00075   return host_;
00076 }
00077 
00078 ACE_INLINE void
00079 ACE_NT_Service::svc_handle(const SERVICE_STATUS_HANDLE new_svc_handle)
00080 {
00081   this->svc_handle_ = new_svc_handle;
00082   return;
00083 }
00084 
00085 ACE_END_VERSIONED_NAMESPACE_DECL

Generated on Thu Nov 9 09:41:57 2006 for ACE by doxygen 1.3.6