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 //%/////////////////////////////////////////////////////////////////////////////
33
34 h.sterling 1.1 #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 david 1.3 #include <Service/Linkage.h>
|
40 h.sterling 1.1
41 PEGASUS_NAMESPACE_BEGIN
42
|
43 kumpf 1.8 /**
44 This abstract class has virtual methods for information that varies across
45 applications. The rest of the methods are called from the application
46 (i.e. cimserver.cpp), and need to be defined by every operating system
47 implementation.
48
49 This version will not touch the method names, as it is fairly risky to do
50 so now. However, the goal is to eventually standardize the interface so
51 we pull out as much OS-specific function as possible from the main
52 cimserver file.
53
54 Not all operating systems need to fully implement all these methods.
55 Stick methods which do not apply to your OS in a "No-ops" section at the
56 top.
57
58 See PEP#222 for more information.
59 */
|
60 h.sterling 1.1
61 class PEGASUS_SERVICE_LINKAGE ServerProcess
62 {
63 public:
64
|
65 kumpf 1.8 ServerProcess();
|
66 h.sterling 1.1
|
67 kumpf 1.8 virtual ~ServerProcess();
|
68 h.sterling 1.1
69 virtual const char* getProductName() const = 0;
70
71 virtual const char* getExtendedName() const = 0;
72
73 virtual const char* getDescription() const = 0;
74
75 virtual const char* getVersion() const = 0;
|
76 kumpf 1.8
|
77 h.sterling 1.1 virtual const char* getProcessName() const = 0;
78
79 virtual const char* getPIDFileName() const = 0;
80
|
81 kumpf 1.4 virtual int cimserver_run(
82 int argc,
83 char** argv,
84 Boolean shutdownOption,
85 Boolean debugOutputOption) = 0;
|
86 h.sterling 1.1
|
87 kumpf 1.8 virtual void cimserver_stop() = 0;
|
88 h.sterling 1.1
|
89 kumpf 1.4 int platform_run(
90 int argc,
91 char** argv,
92 Boolean shutdownOption,
93 Boolean debugOutputOption);
|
94 h.sterling 1.1
|
95 kumpf 1.8 int cimserver_fork();
|
96 h.sterling 1.1
97 void notify_parent(int id);
98
99 void cimserver_set_process(void* p);
100
101 void cimserver_exitRC(int rc);
102
|
103 kumpf 1.8 int cimserver_initialize();
|
104 h.sterling 1.1
|
105 marek 1.6 // Currently (07/27/06) this function is only used by
106 // pegasus/src/Pegasus/DynListener/Service/cimlistener.cpp
107 // in the cimlistener it is used to wait for a signal
108 // to shutdown
109
110 // if PEGASUS_HAS_SIGNALS is defined this function waits in a sigwait
111 // for either a SIGHUP or a SIGTERM and does not return before
|
112 kumpf 1.8
|
113 marek 1.6 // if PEGASUS_HAS_SIGNALS is NOT defined this function is a noop function
114 // returning immediately with -1
|
115 kumpf 1.8 int cimserver_wait();
|
116 h.sterling 1.1
|
117 kumpf 1.8 String getHome();
|
118 h.sterling 1.1 };
119
120 PEGASUS_NAMESPACE_END
121
122 #endif // Pegasus_Server_Process_h
|