1 chip 1.1 //%/////////////////////////////////////////////////////////////////////////////
2 //
3 // Copyright (c) 2000 - 2003 BMC Software, Hewlett-Packard Company, IBM,
4 // The Open Group, Tivoli Systems
5 //
6 // Permission is hereby granted, free of charge, to any person obtaining a copy
7 // of this software and associated documentation files (the "Software"), to
8 // deal in the Software without restriction, including without limitation the
9 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 // sell copies of the Software, and to permit persons to whom the Software is
11 // furnished to do so, subject to the following conditions:
12 //
13 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
14 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
15 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
16 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
17 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
18 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
19 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 //
22 chip 1.1 //==============================================================================
23 //
24 // Author: Chip Vincent (cvincent@us.ibm.com)
25 //
26 // Modified By:
27 // Nag Boranna, Hewlett-Packard Company(nagaraja_boranna@hp.com)
28 // Yi Zhou, Hewlett-Packard Company(yi_zhou@hp.com)
29 // Jenny Yu, Hewlett-Packard Company (jenny_yu@hp.com)
30 // Nitin Upasani, Hewlett-Packard Company (Nitin_Upasani@hp.com)
31 // Carol Ann Krug Graves, Hewlett-Packard Company
32 // (carolann_graves@hp.com)
33 // Mike Day, IBM (mdday@us.ibm.com)
34 //
35 //%/////////////////////////////////////////////////////////////////////////////
36
37 #ifndef Pegasus_ProviderManagerService_h
38 #define Pegasus_ProviderManagerService_h
39
40 #include <Pegasus/Common/Config.h>
41 #include <Pegasus/Common/Thread.h>
42 #include <Pegasus/Common/Array.h>
43 chip 1.1 #include <Pegasus/Common/Pair.h>
44 #include <Pegasus/Common/MessageQueueService.h>
45
46 #include <Pegasus/ProviderManager2/ProviderManagerModule.h>
47 #include <Pegasus/ProviderManager2/ProviderManager.h>
48 #include <Pegasus/ProviderManager2/SafeQueue.h>
49
50 #include <Pegasus/Server/Linkage.h>
51
52 PEGASUS_NAMESPACE_BEGIN
53
54 class PEGASUS_SERVER_LINKAGE ProviderManagerService : public MessageQueueService
55 {
56 public:
57 ProviderManagerService(void);
58 // temp
59 ProviderManagerService(ProviderRegistrationManager * providerRegistrationManager);
60
61 virtual ~ProviderManagerService(void);
62
63 // temp
64 chip 1.1 void unload_idle_providers(void);
65
66 protected:
67 virtual Boolean messageOK(const Message * message);
68 virtual void handleEnqueue(void);
69 virtual void handleEnqueue(Message * message);
70
71 virtual void _handle_async_request(AsyncRequest * request);
72
73 private:
74 //static PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL handleServiceOperation(void * arg) throw();
75
76 //void handleStartService() thorw();
77 //void handleStopService() thorw();
78 //void handlePauseService() thorw();
79 //void handleResumeService() thorw();
80
81 static PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL handleCimOperation(void * arg) throw();
82
83 void handleCimRequest(AsyncOpNode *op, const Message * message) throw();
84
85 chip 1.1 private:
86 SafeQueue<AsyncOpNode *> _incomingQueue;
87 SafeQueue<AsyncOpNode *> _outgoingQueue;
88
89 private:
90 Array<Pair<ProviderManager *, ProviderManagerModule> > _providerManagers;
91
92 };
93
94 PEGASUS_NAMESPACE_END
95
96 #endif
|