service_control.h

Go to the documentation of this file.
00001 #ifndef SERVICE_CONTROL_CLASS
00002 #define SERVICE_CONTROL_CLASS
00003 
00004 /*****************************************************************************\
00005 *                                                                             *
00006 *  Name   : service_control                                                   *
00007 *  Author : Chris Koeritz                                                     *
00008 *                                                                             *
00009 *******************************************************************************
00010 * Copyright (c) 2000-$now By Author.  This program is free software; you can  *
00011 * redistribute it and/or modify it under the terms of the GNU General Public  *
00012 * License as published by the Free Software Foundation; either version 2 of   *
00013 * the License or (at your option) any later version.  This is online at:      *
00014 *     http://www.fsf.org/copyleft/gpl.html                                    *
00015 * Please send any updates to: fred@gruntose.com                               *
00016 \*****************************************************************************/
00017 
00018 #include <basis/object_base.h>
00019 
00021 
00022 class service_control
00023 {
00024 public:
00025   virtual ~service_control() {}
00026 
00027   enum outcomes {
00028     OKAY = common::OKAY,  
00029     ACCESS_DENIED = common::ACCESS_DENIED,
00031     NOT_FOUND = common::NOT_FOUND  
00032   };
00033 
00034   outcome control_service(const istring &service_name, bool start_it,
00035           bool quiet);
00037 
00046   IMPLEMENT_CLASS_NAME("service_control");
00047 
00048   enum service_configs {
00049     MANUAL,  
00050     AUTOMATIC  
00051   };
00052   outcome reconfigure_service(const istring &service_name,
00053           service_configs new_mode);
00055 
00058   void show_system_error();
00060 };
00061 
00062 #endif
00063 

Generated on Fri Nov 28 04:29:31 2008 for HOOPLE Libraries by  doxygen 1.5.1