version 1.9, 2012/05/16 08:45:16
|
version 1.10, 2013/06/29 17:55:08
|
|
|
| |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
|
// Call the appropriate handleQueryRequest handler for the defined |
|
// query language type or return false if the language type not supported. |
Boolean QuerySupportRouter::routeHandleExecQueryRequest( | Boolean QuerySupportRouter::routeHandleExecQueryRequest( |
CIMOperationRequestDispatcher* opThis, | CIMOperationRequestDispatcher* opThis, |
CIMExecQueryRequestMessage* msg) | CIMExecQueryRequestMessage* msg) |
|
|
else if(msg->queryLanguage == "DMTF:CQL") | else if(msg->queryLanguage == "DMTF:CQL") |
((CQLOperationRequestDispatcher*)opThis)->handleQueryRequest(msg); | ((CQLOperationRequestDispatcher*)opThis)->handleQueryRequest(msg); |
#endif | #endif |
else return false; |
else |
|
{ |
return true; |
return false; |
} | } |
| |
void QuerySupportRouter::routeHandleExecQueryResponseAggregation( |
return true; |
CIMOperationRequestDispatcher* opThis, |
|
OperationAggregate* poA) |
|
{ |
|
if (poA->_queryLanguage=="WQL") |
|
((WQLOperationRequestDispatcher*)opThis)-> |
|
handleQueryResponseAggregation(poA); |
|
#ifdef PEGASUS_ENABLE_CQL |
|
else if(poA->_queryLanguage == "DMTF:CQL") |
|
((CQLOperationRequestDispatcher*)opThis)-> |
|
handleQueryResponseAggregation(poA); |
|
#endif |
|
} | } |
| |
void QuerySupportRouter::routeApplyQueryToEnumeration( |
// Get pointer to the correct function. Note that since |
|
// the queryLanguage has already been tested in |
|
// routeHandleExecQueryRequest the assert should be unreachable. |
|
applyQueryFunctionPtr QuerySupportRouter::getFunctPtr( |
CIMOperationRequestDispatcher* opThis, | CIMOperationRequestDispatcher* opThis, |
CIMResponseMessage* msg, |
|
QueryExpressionRep* query) | QueryExpressionRep* query) |
{ | { |
if (query->getQueryLanguage()=="WQL") | if (query->getQueryLanguage()=="WQL") |
((WQLOperationRequestDispatcher*)opThis)-> |
{ |
applyQueryToEnumeration(msg,query); |
return &((WQLOperationRequestDispatcher*)opThis)-> |
|
applyQueryToEnumeration; |
|
} |
#ifdef PEGASUS_ENABLE_CQL | #ifdef PEGASUS_ENABLE_CQL |
else if(query->getQueryLanguage() == "DMTF:CQL") | else if(query->getQueryLanguage() == "DMTF:CQL") |
((CQLOperationRequestDispatcher*)opThis)-> |
{ |
applyQueryToEnumeration(msg,query); |
return &((CQLOperationRequestDispatcher*)opThis)-> |
|
applyQueryToEnumeration; |
|
} |
|
else |
|
{ |
|
PEGASUS_UNREACHABLE(PEGASUS_ASSERT(false);) |
|
} |
#endif | #endif |
} | } |
| |