version 1.9, 2012/08/08 08:27:59
|
version 1.13, 2013/04/13 19:03:09
|
|
|
// | // |
////////////////////////////////////////////////////////////////////////// | ////////////////////////////////////////////////////////////////////////// |
// | // |
|
// Class CIMResponseData encapsulates the possible types of response data |
|
// representations and supplies conversion methods between these types. |
|
// PEP#348 - The CMPI infrastructure using SCMO (Single Chunk Memory Objects) |
|
// describes its usage in the server flow. |
|
// The design document can be found on the OpenPegasus website openpegasus.org |
|
// at https://collaboration.opengroup.org/pegasus/pp/documents/21210/PEP_348.pdf |
|
// |
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
#ifndef Pegasus_CIMResponseData_h | #ifndef Pegasus_CIMResponseData_h |
|
|
#include <Pegasus/Common/CIMBuffer.h> | #include <Pegasus/Common/CIMBuffer.h> |
#include <Pegasus/Common/SCMOClass.h> | #include <Pegasus/Common/SCMOClass.h> |
#include <Pegasus/Common/SCMOInstance.h> | #include <Pegasus/Common/SCMOInstance.h> |
#include <Pegasus/Common/SCMODump.h> |
|
| |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
|
|
}; | }; |
//includeClassOrigin & _includeQualifiers are set to true by default. | //includeClassOrigin & _includeQualifiers are set to true by default. |
//_propertyList is initialized to an empty propertylist to enable | //_propertyList is initialized to an empty propertylist to enable |
// sending all properties by default. |
// sending all properties by default. _isClassOperation set false and |
|
// only reset by selected operations (ex. associator response builder) |
CIMResponseData(ResponseDataContent content): | CIMResponseData(ResponseDataContent content): |
_encoding(0),_dataType(content),_includeQualifiers(true), | _encoding(0),_dataType(content),_includeQualifiers(true), |
_includeClassOrigin(true),_propertyList(CIMPropertyList()) |
_includeClassOrigin(true), |
|
_isClassOperation(false), |
|
_propertyList(CIMPropertyList()) |
{ | { |
} | } |
| |
|
|
_scmoInstances(x._scmoInstances), | _scmoInstances(x._scmoInstances), |
_includeQualifiers(x._includeQualifiers), | _includeQualifiers(x._includeQualifiers), |
_includeClassOrigin(x._includeClassOrigin), | _includeClassOrigin(x._includeClassOrigin), |
|
_isClassOperation(x._isClassOperation), |
_propertyList(x._propertyList) | _propertyList(x._propertyList) |
{ | { |
} | } |
|
|
const Boolean includeClassOrigin, | const Boolean includeClassOrigin, |
const CIMPropertyList& propertyList); | const CIMPropertyList& propertyList); |
| |
|
// Used with association and reference operations (i.e. operations that |
|
// return CIMObject or CIMObjectPath to set a parameter to define whether |
|
// responseData is for operation on a class or instance. |
|
// Allows building the correct path (classPath or instancePath) and |
|
// object type (Class or Instance) on response. |
|
void setIsClassOperation(Boolean b); |
|
|
void setPropertyList(const CIMPropertyList& propertyList) | void setPropertyList(const CIMPropertyList& propertyList) |
{ | { |
_propertyList = propertyList; | _propertyList = propertyList; |
|
|
| |
// SCMO encoding | // SCMO encoding |
Array<SCMOInstance> _scmoInstances; | Array<SCMOInstance> _scmoInstances; |
|
|
|
// Request characteristics that are carried through operation for |
|
// modification of response generation. |
Boolean _includeQualifiers; | Boolean _includeQualifiers; |
Boolean _includeClassOrigin; | Boolean _includeClassOrigin; |
|
// Defines whether response CIMObjects or ObjectPaths are class or instance. |
|
// because associators, etc. operations provide both class and instance |
|
// responses. Default is false and should only be set to true by |
|
// operation requests such as associators (which could return either |
|
// instances or classes) when the operation is to return class information. |
|
Boolean _isClassOperation; |
CIMPropertyList _propertyList; | CIMPropertyList _propertyList; |
| |
}; | }; |