1 martin 1.25 //%LICENSE////////////////////////////////////////////////////////////////
|
2 martin 1.26 //
|
3 martin 1.25 // 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.26 //
|
10 martin 1.25 // 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.26 //
|
17 martin 1.25 // The above copyright notice and this permission notice shall be included
18 // in all copies or substantial portions of the Software.
|
19 martin 1.26 //
|
20 martin 1.25 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
21 martin 1.26 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
22 martin 1.25 // 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.26 //
|
28 martin 1.25 //////////////////////////////////////////////////////////////////////////
|
29 kumpf 1.1 //
30 //%/////////////////////////////////////////////////////////////////////////////
31
32 #ifndef Pegasus_CIMOperationRequestAuthorizer_h
33 #define Pegasus_CIMOperationRequestAuthorizer_h
34
35 #include <Pegasus/Common/Config.h>
|
36 mday 1.2 #include <Pegasus/Common/MessageQueueService.h>
|
37 kumpf 1.1 #include <Pegasus/Common/CIMMessage.h>
|
38 a.arora 1.17 #include <Pegasus/Common/AutoPtr.h>
|
39 kumpf 1.11 #include <Pegasus/Server/Linkage.h>
|
40 kumpf 1.1
|
41 kumpf 1.24 PEGASUS_NAMESPACE_BEGIN
42
43 class PEGASUS_SERVER_LINKAGE CIMOperationRequestAuthorizer :
|
44 sahana.prabhakar 1.27 public MessageQueue
|
45 kumpf 1.24 {
46 public:
47
|
48 sahana.prabhakar 1.27 typedef MessageQueue Base;
|
49 kumpf 1.24
50 CIMOperationRequestAuthorizer(
51 MessageQueueService* outputQueue);
52
53 ~CIMOperationRequestAuthorizer();
54
55 void sendResponse(
56 Uint32 queueId,
57 Buffer& message);
58
59 void sendIMethodError(
60 Uint32 queueId,
61 HttpMethod httpMethod,
62 const String& messageId,
63 const CIMName& methodName,
64 const CIMException& cimException);
|
65 kumpf 1.1
|
66 kumpf 1.24 void sendMethodError(
67 Uint32 queueId,
68 HttpMethod httpMethod,
69 const String& messageId,
70 const CIMName& methodName,
71 const CIMException& cimException);
72
73 virtual void handleEnqueue(Message*);
74
75 virtual void handleEnqueue();
76
77 /** Sets the flag to indicate whether or not the CIMServer is
78 shutting down.
79 */
80 void setServerTerminating(Boolean flag);
81
82 private:
83
84 // Constant defining the user group name separator
85 static const char _GROUPNAME_SEPARATOR;
|
86 kumpf 1.1
|
87 kumpf 1.24 // Get a list of authorized user groups
88 Array<String> _getAuthorizedUserGroups();
|
89 kumpf 1.1
|
90 kumpf 1.24 Array<String> _authorizedUserGroups;
91 // Do not make this an AutoPtr as the MQS has to be deleted
92 // by somebody else, not this class.
93 MessageQueueService* _outputQueue;
|
94 kumpf 1.1
|
95 kumpf 1.24 // Flag to indicate whether or not the CIMServer is shutting down.
96 Boolean _serverTerminating;
|
97 kumpf 1.1 };
98
99 PEGASUS_NAMESPACE_END
100
101 #endif /* Pegasus_CIMOperationRequestAuthorizer_h */
|