version 1.1, 2004/03/04 09:55:38
|
version 1.4, 2004/09/03 18:30:46
|
|
|
| |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
|
// |
|
// ValueResponseHandler (used internally to implement property operations) |
|
// |
|
class PEGASUS_PPM_LINKAGE ValueResponseHandler : virtual public ResponseHandler |
|
{ |
|
public: |
|
virtual void deliver(const CIMValue & value) = 0; |
|
|
|
virtual void deliver(const Array<CIMValue> & values) = 0; |
|
}; |
|
|
|
|
|
// |
|
// SimpleResponseHandler |
|
// |
class PEGASUS_PPM_LINKAGE SimpleResponseHandler : virtual public ResponseHandler | class PEGASUS_PPM_LINKAGE SimpleResponseHandler : virtual public ResponseHandler |
{ | { |
public: | public: |
|
|
(ContentLanguageListContainer::NAME); | (ContentLanguageListContainer::NAME); |
langs = cntr.getLanguages(); | langs = cntr.getLanguages(); |
} | } |
catch (Exception & e) |
catch (const Exception &) |
{ | { |
// The content language container must not exist. | // The content language container must not exist. |
// Return the empty ContentLanguages. | // Return the empty ContentLanguages. |
|
|
| |
}; | }; |
| |
class PEGASUS_PPM_LINKAGE SimpleClassResponseHandler : public SimpleResponseHandler, public ClassResponseHandler |
|
{ |
|
public: |
|
SimpleClassResponseHandler(void) |
|
{ |
|
} |
|
|
|
void processing(void) { SimpleResponseHandler::processing(); } |
|
void complete(void) { SimpleResponseHandler::complete(); } |
|
|
|
virtual void deliver(const CIMClass & classObj) |
|
{ |
|
Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE, |
|
"SimpleResponseHandler: deliver()"); |
|
|
|
_objects.append(classObj); |
|
} |
|
|
|
virtual void deliver(const Array<CIMClass> & classObjs) |
|
{ |
|
// call deliver for each object in the array |
|
for(Uint32 i = 0, n = classObjs.size(); i < n; i++) |
|
{ |
|
deliver(classObjs[i]); |
|
} |
|
} |
|
|
|
const Array<CIMClass> getObjects(void) const |
|
{ |
|
return _objects; |
|
} |
|
|
|
private: |
|
Array<CIMClass> _objects; |
|
|
|
}; |
|
|
|
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |
| |
#endif | #endif |