(file) Return to ServerProcess.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Service

  1 martin 1.10 //%LICENSE////////////////////////////////////////////////////////////////
  2 martin 1.11 //
  3 martin 1.10 // Licensed to The Open Group (TOG) under one or more contributor license
  4             // agreements.  Refer to the OpenPegasusNOTICE.txt file distributed with
  5             // this work for additional information regarding copyright ownership.
  6             // Each contributor licenses this file to you under the OpenPegasus Open
  7             // Source License; you may not use this file except in compliance with the
  8             // License.
  9 martin 1.11 //
 10 martin 1.10 // Permission is hereby granted, free of charge, to any person obtaining a
 11             // copy of this software and associated documentation files (the "Software"),
 12             // to deal in the Software without restriction, including without limitation
 13             // the rights to use, copy, modify, merge, publish, distribute, sublicense,
 14             // and/or sell copies of the Software, and to permit persons to whom the
 15             // Software is furnished to do so, subject to the following conditions:
 16 martin 1.11 //
 17 martin 1.10 // The above copyright notice and this permission notice shall be included
 18             // in all copies or substantial portions of the Software.
 19 martin 1.11 //
 20 martin 1.10 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 21 martin 1.11 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 22 martin 1.10 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 23             // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 24             // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 25             // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 26             // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 27 martin 1.11 //
 28 martin 1.10 //////////////////////////////////////////////////////////////////////////
 29 h.sterling 1.1  //
 30                 //%/////////////////////////////////////////////////////////////////////////////
 31                 
 32                 #ifndef Pegasus_Server_Process_h
 33                 #define Pegasus_Server_Process_h
 34                 
 35                 #include <Pegasus/Common/Config.h>
 36                 #include <Pegasus/Common/String.h>
 37 david      1.3  #include <Service/Linkage.h>
 38 h.sterling 1.1  
 39                 PEGASUS_NAMESPACE_BEGIN
 40                 
 41 kumpf      1.8  /**
 42                     This abstract class has virtual methods for information that varies across
 43                     applications. The rest of the methods are called from the application
 44                     (i.e. cimserver.cpp), and need to be defined by every operating system
 45                     implementation.
 46                 
 47                     This version will not touch the method names, as it is fairly risky to do
 48                     so now.  However, the goal is to eventually standardize the interface so
 49                     we pull out as much OS-specific function as possible from the main
 50                     cimserver file.
 51                 
 52                     Not all operating systems need to fully implement all these methods.
 53                     Stick methods which do not apply to your OS in a "No-ops" section at the
 54                     top.
 55                 
 56                     See PEP#222 for more information.
 57                 */
 58 h.sterling 1.1  
 59                 class PEGASUS_SERVICE_LINKAGE ServerProcess
 60                 {
 61                 public:
 62                 
 63 kumpf      1.8      ServerProcess();
 64 h.sterling 1.1  
 65 kumpf      1.8      virtual ~ServerProcess();
 66 h.sterling 1.1  
 67                     virtual const char* getProductName() const = 0;
 68                 
 69                     virtual const char* getExtendedName() const = 0;
 70                 
 71                     virtual const char* getDescription() const = 0;
 72                 
 73                     virtual const char* getVersion() const = 0;
 74 kumpf      1.8  
 75 h.sterling 1.1      virtual const char* getProcessName() const = 0;
 76                 
 77 kumpf      1.4      virtual int cimserver_run(
 78                         int argc,
 79                         char** argv,
 80                         Boolean shutdownOption,
 81                         Boolean debugOutputOption) = 0;
 82 h.sterling 1.1  
 83 kumpf      1.8      virtual void cimserver_stop() = 0;
 84 h.sterling 1.1  
 85 kumpf      1.4      int platform_run(
 86                         int argc,
 87                         char** argv,
 88                         Boolean shutdownOption,
 89                         Boolean debugOutputOption);
 90 h.sterling 1.1  
 91 kumpf      1.8      int cimserver_fork();
 92 h.sterling 1.1  
 93                     void notify_parent(int id);
 94                 
 95                     void cimserver_set_process(void* p);
 96                 
 97                     void cimserver_exitRC(int rc);
 98                 
 99 kumpf      1.8      int cimserver_initialize();
100 h.sterling 1.1  
101 marek      1.6      // Currently (07/27/06) this function is only used by
102                     // pegasus/src/Pegasus/DynListener/Service/cimlistener.cpp
103                     // in the cimlistener it is used to wait for a signal
104                     // to shutdown
105                 
106                     // if PEGASUS_HAS_SIGNALS is defined this function waits in a sigwait
107                     // for either a SIGHUP or a SIGTERM and does not return before
108 kumpf      1.8  
109 marek      1.6      // if PEGASUS_HAS_SIGNALS is NOT defined this function is a noop function
110                     // returning immediately with -1
111 kumpf      1.8      int cimserver_wait();
112 h.sterling 1.1  
113 kumpf      1.8      String getHome();
114 h.sterling 1.1  };
115                 
116                 PEGASUS_NAMESPACE_END
117                 
118                 #endif // Pegasus_Server_Process_h

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2