summaryrefslogtreecommitdiff
path: root/ace/NT_Service.cpp
diff options
context:
space:
mode:
authorgonzo <gonzo@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-03-08 23:40:24 +0000
committergonzo <gonzo@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-03-08 23:40:24 +0000
commitddd182af6f4d8ba9f6b769eed40d1463efefba19 (patch)
tree62fb4dfbae8ae84f46cdb4830f51c53be237f08d /ace/NT_Service.cpp
parentb2ca53ca3379d7668399003fe7c6603a9e8f8db2 (diff)
downloadATCD-ddd182af6f4d8ba9f6b769eed40d1463efefba19.tar.gz
ChangeLogTag: Mon Mar 8 17:35:04 1999 Gonzalo Diethelm <gonzo@tango.cs.wustl.edu>
Diffstat (limited to 'ace/NT_Service.cpp')
-rw-r--r--ace/NT_Service.cpp46
1 files changed, 37 insertions, 9 deletions
diff --git a/ace/NT_Service.cpp b/ace/NT_Service.cpp
index 7290f9d6e68..7e2551b79d8 100644
--- a/ace/NT_Service.cpp
+++ b/ace/NT_Service.cpp
@@ -83,24 +83,19 @@ ACE_NT_Service::handle_control (DWORD control_code)
switch(control_code) {
case SERVICE_CONTROL_SHUTDOWN:
case SERVICE_CONTROL_STOP:
- report_status(SERVICE_STOP_PENDING);
- /* how to cancel? */
+ stop_requested(control_code);
break;
case SERVICE_CONTROL_PAUSE:
- report_status(SERVICE_PAUSE_PENDING);
- this->suspend();
- report_status(SERVICE_PAUSED);
+ pause_requested(control_code);
break;
case SERVICE_CONTROL_CONTINUE:
- report_status(SERVICE_CONTINUE_PENDING);
- this->resume();
- report_status(SERVICE_RUNNING);
+ continue_requested(control_code);
break;
case SERVICE_CONTROL_INTERROGATE:
- report_status(0);
+ interrogate_requested(control_code);
break;
}
@@ -110,6 +105,39 @@ ACE_NT_Service::handle_control (DWORD control_code)
void
+ACE_NT_Service::stop_requested (DWORD)
+{
+ this->report_status (SERVICE_STOP_PENDING);
+ /* how to cancel? */
+}
+
+
+void
+ACE_NT_Service::pause_requested (DWORD)
+{
+ this->report_status (SERVICE_PAUSE_PENDING);
+ this->suspend ();
+ report_status (SERVICE_PAUSED);
+}
+
+
+void
+ACE_NT_Service::continue_requested (DWORD)
+{
+ this->report_status (SERVICE_CONTINUE_PENDING);
+ this->resume ();
+ report_status (SERVICE_RUNNING);
+}
+
+
+void
+ACE_NT_Service::interrogate_requested (DWORD)
+{
+ this->report_status (0);
+}
+
+
+void
ACE_NT_Service::name (LPCTSTR name, LPCTSTR desc)
{