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

  1 karl  1.5 //%2006////////////////////////////////////////////////////////////////////////
  2 h.sterling 1.1 //
  3                // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
  4                // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
  5                // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
  6                // IBM Corp.; EMC Corporation, The Open Group.
  7                // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
  8                // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
  9                // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 10                // EMC Corporation; VERITAS Software Corporation; The Open Group.
 11 karl       1.5 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 12                // EMC Corporation; Symantec Corporation; The Open Group.
 13 h.sterling 1.1 //
 14                // Permission is hereby granted, free of charge, to any person obtaining a copy
 15                // of this software and associated documentation files (the "Software"), to
 16                // deal in the Software without restriction, including without limitation the
 17                // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 18                // sell copies of the Software, and to permit persons to whom the Software is
 19                // furnished to do so, subject to the following conditions:
 20                // 
 21                // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 22                // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
 23                // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 24                // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 25                // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 26                // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 27                // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 28                // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 29                //
 30                //==============================================================================
 31                //
 32                // Author: Heather Sterling (hsterl@us.ibm.com) PEP#222
 33                //
 34 h.sterling 1.1 //%/////////////////////////////////////////////////////////////////////////////
 35                
 36                #ifndef Pegasus_Server_Process_h
 37                #define Pegasus_Server_Process_h
 38                
 39                #include <Pegasus/Common/Config.h>
 40                #include <Pegasus/Common/String.h>
 41 david      1.3 #include <Service/Linkage.h>
 42 h.sterling 1.1 
 43                PEGASUS_NAMESPACE_BEGIN
 44                
 45                /** This abstract class has virtual methods for information that varies across applications. The rest of the methods 
 46                  * are called from the application (i.e. cimserver.cpp), and need to be defined by every operating system implementation. 
 47                  * This version will not touch the method names, as it is fairly risky to do so now. However, the goal is to 
 48                  * eventually standardize the interface so we pull out as much OS-specific function as possible from the main cimserver file.
 49                  *
 50                  * Not all operating systems need to fully implement all these methods.  Stick methods which do not apply to
 51                  * your OS in a "No-ops" section at the top.
 52                  * 
 53                  * See PEP#222 for more information.
 54                  */ 
 55                
 56                class PEGASUS_SERVICE_LINKAGE ServerProcess
 57                {
 58                public:
 59                
 60                    ServerProcess(void);
 61                
 62                    virtual ~ServerProcess(void);
 63 h.sterling 1.1 
 64                    virtual const char* getProductName() const = 0;
 65                
 66                    virtual const char* getExtendedName() const = 0;
 67                
 68                    virtual const char* getDescription() const = 0;
 69                
 70                    virtual const char* getVersion() const = 0;
 71                    
 72                    virtual const char* getProcessName() const = 0;
 73                
 74                    virtual const char* getPIDFileName() const = 0;
 75                
 76 kumpf      1.4     virtual int cimserver_run(
 77                        int argc,
 78                        char** argv,
 79                        Boolean shutdownOption,
 80                        Boolean debugOutputOption) = 0;
 81 h.sterling 1.1 
 82                    virtual void cimserver_stop(void) = 0;
 83                
 84 kumpf      1.4     int platform_run(
 85                        int argc,
 86                        char** argv,
 87                        Boolean shutdownOption,
 88                        Boolean debugOutputOption);
 89 h.sterling 1.1 
 90                    int cimserver_fork(void);
 91                
 92                    void notify_parent(int id);
 93                
 94                    long get_server_pid(void);
 95                
 96 h.sterling 1.2     void set_parent_pid(int pid);
 97                
 98 h.sterling 1.1     int get_proc(int pid);
 99                
100                    bool isCIMServerRunning(void);
101                
102                    void cimserver_set_process(void* p);
103                
104                    int cimserver_kill(int id);
105                
106                    void cimserver_exitRC(int rc);
107                
108                    int cimserver_initialize(void);
109                
110 marek      1.6     // Currently (07/27/06) this function is only used by
111                    // pegasus/src/Pegasus/DynListener/Service/cimlistener.cpp
112                    // in the cimlistener it is used to wait for a signal
113                    // to shutdown
114                
115                    // if PEGASUS_HAS_SIGNALS is defined this function waits in a sigwait
116                    // for either a SIGHUP or a SIGTERM and does not return before
117                    
118                    // if PEGASUS_HAS_SIGNALS is NOT defined this function is a noop function
119                    // returning immediately with -1
120 h.sterling 1.1     int cimserver_wait(void);
121                
122                    String getHome(void);
123                };
124                
125                PEGASUS_NAMESPACE_END
126                
127                #endif // Pegasus_Server_Process_h

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2