version 1.12.2.4, 2012/02/15 17:47:06
|
version 1.12.2.10, 2013/11/21 17:59:42
|
|
|
OP_OpenAssociatorInstancePaths, | OP_OpenAssociatorInstancePaths, |
OP_PullInstancesWithPath, | OP_PullInstancesWithPath, |
OP_PullInstancePaths, | OP_PullInstancePaths, |
|
OP_PullInstances, |
OP_CloseEnumeration, | OP_CloseEnumeration, |
OP_EnumerationCount, | OP_EnumerationCount, |
|
OP_OpenQueryInstances, |
// EXP_PULL_END | // EXP_PULL_END |
OP_Count | OP_Count |
}; | }; |
|
|
return OP_OpenAssociatorInstances; | return OP_OpenAssociatorInstances; |
if (_EQUAL(s, "OpenAssociatorInstancePaths")) | if (_EQUAL(s, "OpenAssociatorInstancePaths")) |
return OP_OpenAssociatorInstancePaths; | return OP_OpenAssociatorInstancePaths; |
|
if (_EQUAL(s, "OpenQueryInstances")) |
|
return OP_OpenQueryInstances;; |
break; | break; |
case 'P': | case 'P': |
if (_EQUAL(s, "PullInstancesWithPath")) | if (_EQUAL(s, "PullInstancesWithPath")) |
return OP_PullInstancesWithPath; | return OP_PullInstancesWithPath; |
if (_EQUAL(s, "PullInstancePaths")) | if (_EQUAL(s, "PullInstancePaths")) |
return OP_PullInstancePaths; | return OP_PullInstancePaths; |
|
if (_EQUAL(s, "PullInstances")) |
|
return OP_PullInstances; |
break; | break; |
// EXP_PULL_END | // EXP_PULL_END |
case 'R': | case 'R': |
|
|
STAT_GETSTARTTIME | STAT_GETSTARTTIME |
| |
Boolean deepInheritance = flags & DEEP_INHERITANCE; | Boolean deepInheritance = flags & DEEP_INHERITANCE; |
|
#ifndef PEGASUS_DISABLE_INSTANCE_QUALIFIERS |
Boolean includeQualifiers = flags & INCLUDE_QUALIFIERS; | Boolean includeQualifiers = flags & INCLUDE_QUALIFIERS; |
|
#endif |
Boolean includeClassOrigin = flags & INCLUDE_CLASS_ORIGIN; | Boolean includeClassOrigin = flags & INCLUDE_CLASS_ORIGIN; |
| |
// [NAMESPACE] | // [NAMESPACE] |
|
|
STAT_GETSTARTTIME | STAT_GETSTARTTIME |
| |
// [FLAGS] | // [FLAGS] |
|
#ifndef PEGASUS_DISABLE_INSTANCE_QUALIFIERS |
Boolean includeQualifiers = flags & INCLUDE_QUALIFIERS; | Boolean includeQualifiers = flags & INCLUDE_QUALIFIERS; |
|
#endif |
Boolean includeClassOrigin = flags & INCLUDE_CLASS_ORIGIN; | Boolean includeClassOrigin = flags & INCLUDE_CLASS_ORIGIN; |
| |
// [NAMESPACE] | // [NAMESPACE] |
|
|
// [PROPERTY-LIST] | // [PROPERTY-LIST] |
buf.putPropertyList(msg->propertyList); | buf.putPropertyList(msg->propertyList); |
| |
buf.putUint32Arg(msg->maxObjectCount); |
buf.putUint32(msg->maxObjectCount); |
buf.putUint32Arg(msg->operationTimeout); | buf.putUint32Arg(msg->operationTimeout); |
buf.putString(msg->filterQueryLanguage); | buf.putString(msg->filterQueryLanguage); |
buf.putString(msg->filterQuery); | buf.putString(msg->filterQuery); |
|
|
return 0; | return 0; |
| |
// These can all be one common function. | // These can all be one common function. |
Uint32Arg maxObjectCount; |
Uint32 maxObjectCount; |
if (!in.getUint32Arg(maxObjectCount)) |
if (!in.getUint32(maxObjectCount)) |
return 0; | return 0; |
Uint32Arg operationTimeout; | Uint32Arg operationTimeout; |
if (!in.getUint32Arg(operationTimeout)) | if (!in.getUint32Arg(operationTimeout)) |
|
|
| |
Boolean endOfSequence; | Boolean endOfSequence; |
if (!in.getBoolean(endOfSequence)) | if (!in.getBoolean(endOfSequence)) |
|
{ |
return 0; | return 0; |
|
} |
| |
String enumerationContext; | String enumerationContext; |
if (!in.getString(enumerationContext)) | if (!in.getString(enumerationContext)) |
|
{ |
return 0; | return 0; |
|
} |
| |
CIMOpenEnumerateInstancesResponseMessage* msg = | CIMOpenEnumerateInstancesResponseMessage* msg = |
new CIMOpenEnumerateInstancesResponseMessage( | new CIMOpenEnumerateInstancesResponseMessage( |
messageId, | messageId, |
cimException, | cimException, |
|
QueueIdStack(), |
endOfSequence, | endOfSequence, |
enumerationContext, |
enumerationContext); |
QueueIdStack()); |
|
| |
// Instead of resolving the binary data here, we delegate this | // Instead of resolving the binary data here, we delegate this |
// to a later point in time when the data is actually retrieved through | // to a later point in time when the data is actually retrieved through |
|
|
// [CLASSNAME] | // [CLASSNAME] |
buf.putName(msg->className); | buf.putName(msg->className); |
| |
buf.putUint32Arg(msg->maxObjectCount); |
buf.putUint32(msg->maxObjectCount); |
buf.putUint32Arg(msg->operationTimeout); | buf.putUint32Arg(msg->operationTimeout); |
buf.putString(msg->filterQueryLanguage); | buf.putString(msg->filterQueryLanguage); |
buf.putString(msg->filterQuery); | buf.putString(msg->filterQuery); |
|
|
| |
// These can all be one common function. | // These can all be one common function. |
| |
Uint32Arg maxObjectCount; |
Uint32 maxObjectCount; |
if (!in.getUint32Arg(maxObjectCount)) |
if (!in.getUint32(maxObjectCount)) |
return 0; | return 0; |
Uint32Arg operationTimeout; | Uint32Arg operationTimeout; |
if (!in.getUint32Arg(operationTimeout)) | if (!in.getUint32Arg(operationTimeout)) |
|
|
| |
Boolean endOfSequence; | Boolean endOfSequence; |
if (!in.getBoolean(endOfSequence)) | if (!in.getBoolean(endOfSequence)) |
|
{ |
return 0; | return 0; |
|
} |
| |
String enumerationContext; | String enumerationContext; |
if (!in.getString(enumerationContext)) | if (!in.getString(enumerationContext)) |
{ | { |
return 0; | return 0; |
} | } |
|
|
CIMOpenEnumerateInstancePathsResponseMessage* msg = | CIMOpenEnumerateInstancePathsResponseMessage* msg = |
new CIMOpenEnumerateInstancePathsResponseMessage( | new CIMOpenEnumerateInstancePathsResponseMessage( |
messageId, | messageId, |
cimException, | cimException, |
|
QueueIdStack(), |
endOfSequence, | endOfSequence, |
enumerationContext, |
enumerationContext); |
QueueIdStack()); |
|
| |
// Instead of resolving the binary data here, we delegate this | // Instead of resolving the binary data here, we delegate this |
// to a later point in time when the data is actually retrieved through | // to a later point in time when the data is actually retrieved through |
|
|
// [PROPERTY-LIST] | // [PROPERTY-LIST] |
buf.putPropertyList(msg->propertyList); | buf.putPropertyList(msg->propertyList); |
| |
buf.putUint32Arg(msg->maxObjectCount); |
buf.putUint32(msg->maxObjectCount); |
buf.putUint32Arg(msg->operationTimeout); | buf.putUint32Arg(msg->operationTimeout); |
buf.putString(msg->filterQueryLanguage); | buf.putString(msg->filterQueryLanguage); |
buf.putString(msg->filterQuery); | buf.putString(msg->filterQuery); |
|
|
return 0; | return 0; |
| |
// These can all be one common function. | // These can all be one common function. |
Uint32Arg maxObjectCount; |
Uint32 maxObjectCount; |
if (!in.getUint32Arg(maxObjectCount)) |
if (!in.getUint32(maxObjectCount)) |
return 0; | return 0; |
Uint32Arg operationTimeout; | Uint32Arg operationTimeout; |
if (!in.getUint32Arg(operationTimeout)) | if (!in.getUint32Arg(operationTimeout)) |
|
|
new CIMOpenReferenceInstancesResponseMessage( | new CIMOpenReferenceInstancesResponseMessage( |
messageId, | messageId, |
cimException, | cimException, |
|
QueueIdStack(), |
endOfSequence, | endOfSequence, |
enumerationContext, |
enumerationContext); |
QueueIdStack()); |
|
| |
// Instead of resolving the binary data here, we delegate this | // Instead of resolving the binary data here, we delegate this |
// to a later point in time when the data is actually retrieved through | // to a later point in time when the data is actually retrieved through |
|
|
// [ROLE] | // [ROLE] |
buf.putString(msg->role); | buf.putString(msg->role); |
| |
buf.putUint32Arg(msg->maxObjectCount); |
buf.putUint32(msg->maxObjectCount); |
buf.putUint32Arg(msg->operationTimeout); | buf.putUint32Arg(msg->operationTimeout); |
buf.putString(msg->filterQueryLanguage); | buf.putString(msg->filterQueryLanguage); |
buf.putString(msg->filterQuery); | buf.putString(msg->filterQuery); |
|
|
return 0; | return 0; |
| |
// These can all be one common function. | // These can all be one common function. |
Uint32Arg maxObjectCount; |
Uint32 maxObjectCount; |
if (!in.getUint32Arg(maxObjectCount)) |
if (!in.getUint32(maxObjectCount)) |
return 0; | return 0; |
Uint32Arg operationTimeout; | Uint32Arg operationTimeout; |
if (!in.getUint32Arg(operationTimeout)) | if (!in.getUint32Arg(operationTimeout)) |
|
|
new CIMOpenReferenceInstancePathsResponseMessage( | new CIMOpenReferenceInstancePathsResponseMessage( |
messageId, | messageId, |
cimException, | cimException, |
|
QueueIdStack(), |
endOfSequence, | endOfSequence, |
enumerationContext, |
enumerationContext); |
QueueIdStack()); |
|
| |
// Instead of resolving the binary data right here, we delegate this | // Instead of resolving the binary data right here, we delegate this |
// to a later point in time when the data is actually retrieved through | // to a later point in time when the data is actually retrieved through |
|
|
// [PROPERTY-LIST] | // [PROPERTY-LIST] |
buf.putPropertyList(msg->propertyList); | buf.putPropertyList(msg->propertyList); |
| |
buf.putUint32Arg(msg->maxObjectCount); |
buf.putUint32(msg->maxObjectCount); |
buf.putUint32Arg(msg->operationTimeout); | buf.putUint32Arg(msg->operationTimeout); |
buf.putString(msg->filterQueryLanguage); | buf.putString(msg->filterQueryLanguage); |
buf.putString(msg->filterQuery); | buf.putString(msg->filterQuery); |
|
|
return 0; | return 0; |
| |
// These can all be one common function. | // These can all be one common function. |
Uint32Arg maxObjectCount; |
Uint32 maxObjectCount; |
if (!in.getUint32Arg(maxObjectCount)) |
if (!in.getUint32(maxObjectCount)) |
return 0; | return 0; |
Uint32Arg operationTimeout; | Uint32Arg operationTimeout; |
if (!in.getUint32Arg(operationTimeout)) | if (!in.getUint32Arg(operationTimeout)) |
|
|
new CIMOpenAssociatorInstancesResponseMessage( | new CIMOpenAssociatorInstancesResponseMessage( |
messageId, | messageId, |
cimException, | cimException, |
|
QueueIdStack(), |
endOfSequence, | endOfSequence, |
enumerationContext, |
enumerationContext ); |
QueueIdStack()); |
|
| |
// Instead of resolving the binary data right here, we delegate this | // Instead of resolving the binary data right here, we delegate this |
// to a later point in time when the data is actually retrieved through | // to a later point in time when the data is actually retrieved through |
|
|
// [RESULT-ROLE] | // [RESULT-ROLE] |
buf.putString(msg->resultRole); | buf.putString(msg->resultRole); |
| |
buf.putUint32Arg(msg->maxObjectCount); |
buf.putUint32(msg->maxObjectCount); |
buf.putUint32Arg(msg->operationTimeout); | buf.putUint32Arg(msg->operationTimeout); |
buf.putString(msg->filterQueryLanguage); | buf.putString(msg->filterQueryLanguage); |
buf.putString(msg->filterQuery); | buf.putString(msg->filterQuery); |
|
|
return 0; | return 0; |
| |
// These can all be one common function. | // These can all be one common function. |
Uint32Arg maxObjectCount; |
Uint32 maxObjectCount; |
if (!in.getUint32Arg(maxObjectCount)) |
if (!in.getUint32(maxObjectCount)) |
return 0; | return 0; |
|
|
Uint32Arg operationTimeout; | Uint32Arg operationTimeout; |
if (!in.getUint32Arg(operationTimeout)) | if (!in.getUint32Arg(operationTimeout)) |
return 0; | return 0; |
|
|
String filterQueryLanguage; | String filterQueryLanguage; |
if (!in.getString(filterQueryLanguage)) | if (!in.getString(filterQueryLanguage)) |
return 0; | return 0; |
|
|
String filterQuery; | String filterQuery; |
if (!in.getString(filterQuery)) | if (!in.getString(filterQuery)) |
return 0; | return 0; |
|
|
| |
Boolean endOfSequence; | Boolean endOfSequence; |
if (!in.getBoolean(endOfSequence)) | if (!in.getBoolean(endOfSequence)) |
|
{ |
return 0; | return 0; |
|
} |
| |
String enumerationContext; | String enumerationContext; |
if (!in.getString(enumerationContext)) | if (!in.getString(enumerationContext)) |
|
{ |
return 0; | return 0; |
|
} |
| |
CIMOpenAssociatorInstancePathsResponseMessage* msg = | CIMOpenAssociatorInstancePathsResponseMessage* msg = |
new CIMOpenAssociatorInstancePathsResponseMessage( | new CIMOpenAssociatorInstancePathsResponseMessage( |
messageId, | messageId, |
cimException, | cimException, |
|
QueueIdStack(), |
endOfSequence, | endOfSequence, |
enumerationContext, |
enumerationContext); |
QueueIdStack()); |
|
| |
// Instead of resolving the binary data right here, we delegate this | // Instead of resolving the binary data right here, we delegate this |
// to a later point in time when the data is actually retrieved through | // to a later point in time when the data is actually retrieved through |
|
|
// [EnumerationContext] | // [EnumerationContext] |
buf.putString(msg->enumerationContext); | buf.putString(msg->enumerationContext); |
| |
buf.putUint32Arg(msg->maxObjectCount); |
buf.putUint32(msg->maxObjectCount); |
} | } |
| |
static CIMPullInstancesWithPathRequestMessage* | static CIMPullInstancesWithPathRequestMessage* |
|
|
| |
CIMNamespaceName nameSpace; | CIMNamespaceName nameSpace; |
if (!in.getNamespaceName(nameSpace)) | if (!in.getNamespaceName(nameSpace)) |
|
{ |
return 0; | return 0; |
|
} |
| |
// [EnumerationContext] | // [EnumerationContext] |
String enumerationContext; | String enumerationContext; |
|
|
return 0; | return 0; |
} | } |
| |
// [MACTCOUNT] |
// [MAXCOUNT] |
Uint32Arg maxObjectCount; |
Uint32 maxObjectCount; |
if (!in.getUint32Arg(maxObjectCount)) |
if (!in.getUint32(maxObjectCount)) |
|
{ |
return 0; | return 0; |
|
} |
| |
AutoPtr<CIMPullInstancesWithPathRequestMessage> request( | AutoPtr<CIMPullInstancesWithPathRequestMessage> request( |
new CIMPullInstancesWithPathRequestMessage( | new CIMPullInstancesWithPathRequestMessage( |
|
|
| |
Boolean endOfSequence; | Boolean endOfSequence; |
if (!in.getBoolean(endOfSequence)) | if (!in.getBoolean(endOfSequence)) |
|
{ |
return 0; | return 0; |
|
} |
| |
String enumerationContext; | String enumerationContext; |
if (!in.getString(enumerationContext)) | if (!in.getString(enumerationContext)) |
|
{ |
return 0; | return 0; |
|
} |
| |
CIMPullInstancesWithPathResponseMessage* msg = | CIMPullInstancesWithPathResponseMessage* msg = |
new CIMPullInstancesWithPathResponseMessage( | new CIMPullInstancesWithPathResponseMessage( |
messageId, | messageId, |
cimException, | cimException, |
|
QueueIdStack(), |
endOfSequence, | endOfSequence, |
enumerationContext, |
enumerationContext); |
QueueIdStack()); |
|
| |
// Instead of resolving the binary data right here, we delegate this | // Instead of resolving the binary data right here, we delegate this |
// to a later point in time when the data is actually retrieved through | // to a later point in time when the data is actually retrieved through |
|
|
// [EnumerationContext] | // [EnumerationContext] |
buf.putString(msg->enumerationContext); | buf.putString(msg->enumerationContext); |
| |
buf.putUint32Arg(msg->maxObjectCount); |
buf.putUint32(msg->maxObjectCount); |
} | } |
| |
static CIMPullInstancePathsRequestMessage* | static CIMPullInstancePathsRequestMessage* |
|
|
| |
CIMNamespaceName nameSpace; | CIMNamespaceName nameSpace; |
if (!in.getNamespaceName(nameSpace)) | if (!in.getNamespaceName(nameSpace)) |
|
{ |
return 0; | return 0; |
|
} |
| |
// [EnumerationContext] | // [EnumerationContext] |
String enumerationContext; | String enumerationContext; |
|
|
} | } |
| |
// [MAXOBJECTCOUNT] | // [MAXOBJECTCOUNT] |
Uint32Arg maxObjectCount; |
Uint32 maxObjectCount; |
if (!in.getUint32Arg(maxObjectCount)) |
if (!in.getUint32(maxObjectCount)) |
return 0; | return 0; |
| |
AutoPtr<CIMPullInstancePathsRequestMessage> request( | AutoPtr<CIMPullInstancePathsRequestMessage> request( |
|
|
| |
Boolean endOfSequence; | Boolean endOfSequence; |
if (!in.getBoolean(endOfSequence)) | if (!in.getBoolean(endOfSequence)) |
|
{ |
return 0; | return 0; |
|
} |
| |
String enumerationContext; | String enumerationContext; |
if (!in.getString(enumerationContext)) | if (!in.getString(enumerationContext)) |
|
{ |
return 0; | return 0; |
|
} |
| |
CIMPullInstancePathsResponseMessage* msg = | CIMPullInstancePathsResponseMessage* msg = |
new CIMPullInstancePathsResponseMessage( | new CIMPullInstancePathsResponseMessage( |
messageId, | messageId, |
cimException, | cimException, |
|
QueueIdStack(), |
endOfSequence, | endOfSequence, |
|
enumerationContext); |
|
|
|
// Instead of resolving the binary data right here, we delegate this |
|
// to a later point in time when the data is actually retrieved through |
|
// a call to getNamedInstances, which is going to resolve the binary |
|
// data when the callback function is registered. |
|
// This allows an alternate client implementation to gain direct access |
|
// to the binary data and pass this for example to the JNI implementation |
|
// of the JSR48 CIM Client for Java. |
|
CIMResponseData& responseData = msg->getResponseData(); |
|
responseData.setRemainingBinaryData(in); |
|
|
|
msg->binaryRequest=true; |
|
return msg; |
|
} |
|
|
|
|
|
//============================================================================== |
|
// |
|
// PullInstances |
|
// |
|
//============================================================================== |
|
|
|
static void _encodePullInstancesRequest( |
|
CIMBuffer& buf, |
|
CIMPullInstancesRequestMessage* msg, |
|
CIMName& name) |
|
{ |
|
/* See ../Client/CIMOperationRequestEncoder.cpp */ |
|
|
|
static const CIMName NAME("PullInstances"); |
|
name = NAME; |
|
|
|
// [HEADER] |
|
|
|
Uint32 flags = 0; |
|
|
|
_putHeader(buf, flags, msg->messageId, OP_PullInstances); |
|
|
|
// [NAMESPACE] |
|
buf.putNamespaceName(msg->nameSpace); |
|
|
|
// [EnumerationContext] |
|
buf.putString(msg->enumerationContext); |
|
|
|
buf.putUint32(msg->maxObjectCount); |
|
} |
|
|
|
static CIMPullInstancesRequestMessage* |
|
_decodePullInstancesRequest( |
|
CIMBuffer& in, |
|
Uint32 queueId, |
|
Uint32 returnQueueId, |
|
Uint32 flags, |
|
const String& messageId) |
|
{ |
|
/* See ../Server/CIMOperationRequestDecoder.cpp */ |
|
|
|
STAT_GETSTARTTIME |
|
|
|
// [NAMESPACE] |
|
|
|
CIMNamespaceName nameSpace; |
|
if (!in.getNamespaceName(nameSpace)) |
|
{ |
|
return 0; |
|
} |
|
|
|
// [EnumerationContext] |
|
String enumerationContext; |
|
if (!in.getString(enumerationContext)) |
|
{ |
|
return 0; |
|
} |
|
|
|
// [MAXCOUNT] |
|
Uint32 maxObjectCount; |
|
if (!in.getUint32(maxObjectCount)) |
|
{ |
|
return 0; |
|
} |
|
|
|
AutoPtr<CIMPullInstancesRequestMessage> request( |
|
new CIMPullInstancesRequestMessage( |
|
messageId, |
|
nameSpace, |
enumerationContext, | enumerationContext, |
QueueIdStack()); |
maxObjectCount, |
|
QueueIdStack(queueId, returnQueueId))); |
|
|
|
request->binaryRequest = true; |
|
|
|
STAT_SERVERSTART |
|
|
|
return request.release(); |
|
} |
|
|
|
// For the pull Response messages the interface is the message and the, |
|
// not just the responseData. |
|
static void _encodePullInstancesResponseBody( |
|
CIMBuffer& out, |
|
CIMPullInstancesResponseMessage* msg, |
|
CIMResponseData& data, |
|
CIMName& name) |
|
{ |
|
/* See ../Server/CIMOperationResponseEncoder.cpp */ |
|
|
|
static const CIMName NAME("PullInstances"); |
|
name = NAME; |
|
// [endOfSequence] |
|
out.putBoolean(msg->endOfSequence); |
|
|
|
// [enumerationContext] |
|
out.putString(msg->enumerationContext); |
|
|
|
data.encodeBinaryResponse(out); |
|
} |
|
|
|
static CIMPullInstancesResponseMessage* |
|
_decodePullInstancesResponse( |
|
CIMBuffer& in, |
|
const String& messageId) |
|
{ |
|
CIMException cimException; |
|
|
|
Boolean endOfSequence; |
|
if (!in.getBoolean(endOfSequence)) |
|
{ |
|
return 0; |
|
} |
|
|
|
String enumerationContext; |
|
if (!in.getString(enumerationContext)) |
|
{ |
|
return 0; |
|
} |
|
|
|
CIMPullInstancesResponseMessage* msg = |
|
new CIMPullInstancesResponseMessage( |
|
messageId, |
|
cimException, |
|
QueueIdStack(), |
|
endOfSequence, |
|
enumerationContext); |
| |
// Instead of resolving the binary data right here, we delegate this | // Instead of resolving the binary data right here, we delegate this |
// to a later point in time when the data is actually retrieved through | // to a later point in time when the data is actually retrieved through |
|
|
msg->binaryRequest=true; | msg->binaryRequest=true; |
return msg; | return msg; |
} | } |
|
//============================================================================== |
|
// |
|
// OpenQueryInstances |
|
// |
|
//============================================================================== |
|
|
|
static void _encodeOpenQueryInstancesRequest( |
|
CIMBuffer& buf, |
|
CIMOpenQueryInstancesRequestMessage* msg, |
|
CIMName& name) |
|
{ |
|
/* See ../Client/CIMOperationRequestEncoder.cpp */ |
|
|
|
static const CIMName NAME("OpenQueryInstances"); |
|
|
|
// [HEADER] |
|
|
|
Uint32 flags = 0; |
|
|
|
if (msg->continueOnError) |
|
flags |= CONTINUE_ON_ERROR; |
|
|
|
_putHeader(buf, flags, msg->messageId, OP_OpenQueryInstances); |
|
|
|
// [NAMESPACE] |
|
buf.putNamespaceName(msg->nameSpace); |
|
|
|
// [filterQuery and filterQueryLanguage] |
|
buf.putString(msg->query); |
|
buf.putString(msg->queryLanguage); |
|
|
|
// [returnQueryResultClass] |
|
buf.putBoolean(msg->returnQueryResultClass); |
|
|
|
buf.putUint32(msg->maxObjectCount); |
|
buf.putUint32Arg(msg->operationTimeout); |
|
} |
|
|
|
static CIMOpenQueryInstancesRequestMessage* |
|
_decodeOpenQueryInstancesRequest( |
|
CIMBuffer& in, |
|
Uint32 queueId, |
|
Uint32 returnQueueId, |
|
Uint32 flags, |
|
const String& messageId) |
|
{ |
|
/* See ../Server/CIMOperationRequestDecoder.cpp */ |
|
|
|
STAT_GETSTARTTIME |
|
|
|
Boolean continueOnError = flags & CONTINUE_ON_ERROR; |
|
|
|
// [NAMESPACE] |
|
CIMNamespaceName nameSpace; |
|
if (!in.getNamespaceName(nameSpace)) |
|
return 0; |
|
|
|
// [FILTERQUERY and FILTERQUERYSTRING] |
|
String filterQuery; |
|
if (!in.getString(filterQuery)) |
|
return 0; |
|
String filterQueryLanguage; |
|
if (!in.getString(filterQueryLanguage)) |
|
return 0; |
|
|
|
// [RETURNQUERYRESULTCLASS] |
|
Boolean returnQueryResultClass; |
|
if (!in.getBoolean(returnQueryResultClass)) |
|
return 0; |
|
|
|
// These can all be one common function. |
|
Uint32 maxObjectCount; |
|
if (!in.getUint32(maxObjectCount)) |
|
return 0; |
|
Uint32Arg operationTimeout; |
|
if (!in.getUint32Arg(operationTimeout)) |
|
return 0; |
|
|
|
AutoPtr<CIMOpenQueryInstancesRequestMessage> request( |
|
new CIMOpenQueryInstancesRequestMessage( |
|
messageId, |
|
nameSpace, |
|
filterQuery, |
|
filterQueryLanguage, |
|
returnQueryResultClass, |
|
operationTimeout, |
|
continueOnError, |
|
maxObjectCount, |
|
QueueIdStack(queueId, returnQueueId))); |
|
|
|
request->binaryRequest = true; |
|
|
|
STAT_SERVERSTART |
|
|
|
return request.release(); |
|
} |
|
|
|
static void _encodeOpenQueryInstancesResponseBody( |
|
CIMBuffer& out, |
|
CIMOpenQueryInstancesResponseMessage* msg, |
|
CIMResponseData& data, |
|
CIMName& name) |
|
{ |
|
/* See ../Server/CIMOperationResponseEncoder.cpp */ |
|
|
|
out.putClass(msg->queryResultClass); |
|
|
|
// [endOfSequence] |
|
out.putBoolean(msg->endOfSequence); |
|
|
|
// [enumerationContext] |
|
out.putString(msg->enumerationContext); |
|
|
|
data.encodeBinaryResponse(out); |
|
} |
|
|
|
static CIMOpenQueryInstancesResponseMessage* |
|
_decodeOpenQueryInstancesResponse( |
|
CIMBuffer& in, |
|
const String& messageId) |
|
{ |
|
CIMException cimException; |
|
|
|
// KS_TODO Should we set validation??? |
|
// Turn on validation: This is a debugging tool |
|
//#if defined(ENABLE_VALIDATION) |
|
// buf.setValidate(true); |
|
//#endif |
|
|
|
Boolean endOfSequence; |
|
if (!in.getBoolean(endOfSequence)) |
|
return 0; |
|
|
|
String enumerationContext; |
|
if (!in.getString(enumerationContext)) |
|
return 0; |
|
|
|
CIMOpenQueryInstancesResponseMessage* msg = |
|
new CIMOpenQueryInstancesResponseMessage( |
|
messageId, |
|
cimException, |
|
CIMClass(), |
|
endOfSequence, |
|
enumerationContext, |
|
QueueIdStack()); |
|
|
|
// Instead of resolving the binary data here, delegate this |
|
// to a later point in time when the data is actually retrieved through |
|
// a call to CIMResponseData::getInstances, which |
|
// resolves the binary data as it is passed to the next interface. |
|
// This allows an alternate client implementation to gain direct access |
|
// to the binary data and pass this for example to the JNI implementation |
|
// of the JSR48 CIM Client for Java. |
|
CIMResponseData& responseData = msg->getResponseData(); |
|
responseData.setRemainingBinaryData(in); |
|
|
|
msg->binaryRequest=true; |
|
return msg; |
|
} |
| |
// EXP_PULL_END | // EXP_PULL_END |
| |
|
|
break; | break; |
//EXP_PULL_END | //EXP_PULL_END |
default: | default: |
// Unexpected message type |
PEGASUS_UNREACHABLE(PEGASUS_ASSERT(0);) |
PEGASUS_ASSERT(0); |
|
return 0; | return 0; |
} | } |
} | } |
|
|
case OP_CloseEnumeration: | case OP_CloseEnumeration: |
msg = _decodeCloseEnumerationResponse(buf, messageId); | msg = _decodeCloseEnumerationResponse(buf, messageId); |
break; | break; |
|
case OP_OpenQueryInstances: |
|
msg = _decodeCloseEnumerationResponse(buf, messageId); |
|
break; |
//EXP_PULL_END | //EXP_PULL_END |
default: | default: |
// Unexpected message type | // Unexpected message type |
PEGASUS_ASSERT(0); |
PEGASUS_UNREACHABLE(PEGASUS_ASSERT(0);) |
break; | break; |
} | } |
| |
|
|
const Buffer& body, | const Buffer& body, |
Uint64 serverResponseTime, | Uint64 serverResponseTime, |
Boolean isFirst, | Boolean isFirst, |
Boolean isLast) |
Boolean) |
{ | { |
Buffer out; | Buffer out; |
| |
|
|
{ | { |
out.append(body.getData(), body.size()); | out.append(body.getData(), body.size()); |
} | } |
// EXP_PULL TODO - TBD Review this. |
// EXP_PULL_BEGIN |
// If there are any parameters include them here. |
// If there are any output parameters include them here. |
// Assumes that it is prebuilt with all components | // Assumes that it is prebuilt with all components |
// | // |
if (rtnParams.size() != 0) | if (rtnParams.size() != 0) |
|
|
out << rtnParams; | out << rtnParams; |
} | } |
// | // |
// //EXP_PULL_END |
// EXP_PULL_END |
| |
return out; | return out; |
} | } |
|
|
(CIMEnumerationCountRequestMessage*)msg, name); | (CIMEnumerationCountRequestMessage*)msg, name); |
break; | break; |
} | } |
|
case CIM_OPEN_QUERY_INSTANCES_REQUEST_MESSAGE: |
|
{ |
|
_encodeOpenQueryInstancesRequest(buf, |
|
(CIMOpenQueryInstancesRequestMessage*)msg, name); |
|
break; |
|
} |
//EXP_PULL_END | //EXP_PULL_END |
| |
default: | default: |
// Unexpected message type | // Unexpected message type |
PEGASUS_ASSERT(0); |
PEGASUS_UNREACHABLE(PEGASUS_ASSERT(0);) |
return false; | return false; |
} | } |
| |
|
|
| |
default: | default: |
// Unexpected message type | // Unexpected message type |
PEGASUS_ASSERT(0); |
PEGASUS_UNREACHABLE(PEGASUS_ASSERT(0);) |
return false; | return false; |
} | } |
| |