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

  1 h.sterling 1.1 //%2005////////////////////////////////////////////////////////////////////////
  2                //
  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                //
 12                // Permission is hereby granted, free of charge, to any person obtaining a copy
 13                // of this software and associated documentation files (the "Software"), to
 14                // deal in the Software without restriction, including without limitation the
 15                // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 16                // sell copies of the Software, and to permit persons to whom the Software is
 17                // furnished to do so, subject to the following conditions:
 18                // 
 19                // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 20                // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
 21                // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 22 h.sterling 1.1 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 23                // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 24                // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 25                // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 26                // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 27                //
 28                //==============================================================================
 29                //
 30                // Author: Heather Sterling (hsterl@us.ibm.com) PEP#222
 31                //
 32                //%/////////////////////////////////////////////////////////////////////////////
 33                
 34                #ifndef Pegasus_Server_Process_h
 35                #define Pegasus_Server_Process_h
 36                
 37                #include <Pegasus/Common/Config.h>
 38                #include <Pegasus/Common/String.h>
 39                #include "Linkage.h"
 40                
 41                PEGASUS_NAMESPACE_BEGIN
 42                
 43 h.sterling 1.1 /** This abstract class has virtual methods for information that varies across applications. The rest of the methods 
 44                  * are called from the application (i.e. cimserver.cpp), and need to be defined by every operating system implementation. 
 45                  * This version will not touch the method names, as it is fairly risky to do so now. However, the goal is to 
 46                  * eventually standardize the interface so we pull out as much OS-specific function as possible from the main cimserver file.
 47                  *
 48                  * Not all operating systems need to fully implement all these methods.  Stick methods which do not apply to
 49                  * your OS in a "No-ops" section at the top.
 50                  * 
 51                  * See PEP#222 for more information.
 52                  */ 
 53                
 54                class PEGASUS_SERVICE_LINKAGE ServerProcess
 55                {
 56                public:
 57                
 58                    ServerProcess(void);
 59                
 60                    virtual ~ServerProcess(void);
 61                
 62                    virtual const char* getProductName() const = 0;
 63                
 64 h.sterling 1.1     virtual const char* getExtendedName() const = 0;
 65                
 66                    virtual const char* getDescription() const = 0;
 67                
 68                    virtual const char* getVersion() const = 0;
 69                    
 70                    virtual const char* getProcessName() const = 0;
 71                
 72                    virtual const char* getPIDFileName() const = 0;
 73                
 74                    virtual int cimserver_run(int argc, char** argv, bool shutdownOption) = 0;
 75                
 76                    virtual void cimserver_stop(void) = 0;
 77                
 78                    int platform_run( int argc, char** argv, bool shutdownOption);
 79                
 80                    int cimserver_fork(void);
 81                
 82                    void notify_parent(int id);
 83                
 84                    long get_server_pid(void);
 85 h.sterling 1.1 
 86 h.sterling 1.2     void set_parent_pid(int pid);
 87                
 88 h.sterling 1.1     int get_proc(int pid);
 89                
 90                    bool isCIMServerRunning(void);
 91                
 92                    void cimserver_set_process(void* p);
 93                
 94                    int cimserver_kill(int id);
 95                
 96                    void cimserver_exitRC(int rc);
 97                
 98                    int cimserver_initialize(void);
 99                
100                    int cimserver_wait(void);
101                
102                    String getHome(void);
103                };
104                
105                PEGASUS_NAMESPACE_END
106                
107                #endif // Pegasus_Server_Process_h

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2