1 //%2003////////////////////////////////////////////////////////////////////////
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.
8 // Permission is hereby granted, free of charge, to any person obtaining a copy
9 // of this software and associated documentation files (the "Software"), to
10 // deal in the Software without restriction, including without limitation the
11 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
12 // sell copies of the Software, and to permit persons to whom the Software is
13 // furnished to do so, subject to the following conditions:
15 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
16 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
17 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
18 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
19 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
20 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
21 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 //==============================================================================
26 // Author: Paulo F. Borges (pfborges@wowmail.com)
29 // Modified By: Jair Francisco T. dos Santos (t.dos.santos.francisco@non.hp.com)
30 // Carol Ann Krug Graves, Hewlett-Packard Company
31 // (carolann_graves@hp.com)
32 //==============================================================================
33 // This template was created from DNSServiceProvider.h
34 //%/////////////////////////////////////////////////////////////////////////
35 #ifndef _NTPPROVIDER_H
36 #define _NTPPROVIDER_H
38 //------------------------------------------------------------------------------
40 //------------------------------------------------------------------------------
42 #include <Pegasus/Common/Config.h>
43 #include <Pegasus/Common/String.h>
44 #include <Pegasus/Provider/CIMInstanceProvider.h>
45 #include <Pegasus/Provider/CIMMethodProvider.h>
46 #include <Pegasus/Common/OperationContext.h>
47 #include "NTPService.h"
49 //------------------------------------------------------------------------------
50 PEGASUS_USING_PEGASUS;
53 //------------------------------------------------------------------------------
54 // Class [NTPServiceProvider] Definition
55 //------------------------------------------------------------------------------
56 class NTPServiceProvider: public CIMInstanceProvider,
57 public CIMMethodProvider
60 //Constructor/Destructor
61 NTPServiceProvider(void);
62 ~NTPServiceProvider(void);
66 //-- CIMInstanceProvider methods
67 /** Given a reference to an instance of the CIM class, fills in the data
68 * elements of the class with the details gleaned from the system. */
69 void getInstance(const OperationContext & context,
70 const CIMObjectPath & ref,
71 const Boolean includeQualifiers,
72 const Boolean includeClassOrigin,
73 const CIMPropertyList & propertyList,
74 InstanceResponseHandler & handler);
76 /** Returns filled instances for all instances of the CIM class detected
78 void enumerateInstances(const OperationContext & context,
79 const CIMObjectPath & ref,
80 const Boolean includeQualifiers,
81 const Boolean includeClassOrigin,
82 const CIMPropertyList & propertyList,
83 InstanceResponseHandler & handler);
85 /** Produces a list of references to all instances of the CIM class
86 * detected on the system, but does not fill the instances
88 void enumerateInstanceNames(const OperationContext & context,
89 const CIMObjectPath & ref,
90 ObjectPathResponseHandler & handler);
92 /** Currently unimplemented in the NTPService provider,
93 * this is a no-op here. */
94 void modifyInstance(const OperationContext & context,
95 const CIMObjectPath & ref,
96 const CIMInstance & obj,
97 const Boolean includeQualifiers,
98 const CIMPropertyList & propertyList,
99 ResponseHandler & handler);
101 /** Currently unimplemented in the NTPService provider,
102 * this is a no-op here. */
103 void createInstance(const OperationContext & context,
104 const CIMObjectPath & ref,
105 const CIMInstance & obj,
106 ObjectPathResponseHandler & handler);
108 /** Currently unimplemented in the NTPService provider,
109 * this is a no-op here. */
110 void deleteInstance(const OperationContext & context,
111 const CIMObjectPath & ref,
112 ResponseHandler & handler);
114 /** Currently unimplemented in the NTPService provider,
115 * this is a no-op here. */
116 void invokeMethod(const OperationContext& context,
117 const CIMObjectPath& objectReference,
118 const CIMName& methodName,
119 const Array<CIMParamValue>& inParameters,
120 MethodResultResponseHandler& handler);
122 /** Currently unimplemented in the NTPService provider,
123 * this is a no-op here. */
124 void initialize(CIMOMHandle & cimom);
126 /** frees the object itself loaded */
127 void terminate(void);
130 // Builds a reference (a set of Key,Value pairs)
131 CIMObjectPath _fill_reference(const CIMNamespaceName &nameSpace,
132 const CIMName &className,
134 // Builds a filled-in instance.
135 CIMInstance _build_instance(const CIMName & classname,
136 const CIMNamespaceName & nameSpace,
137 const Array<CIMKeyBinding> keys,