(file) Return to BinaryCodec.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/BinaryCodec.cpp between version 1.9 and 1.9.2.3

version 1.9, 2009/07/08 13:48:26 version 1.9.2.3, 2009/10/19 15:20:03
Line 341 
Line 341 
  
 static void _encodeEnumerateInstancesResponseBody( static void _encodeEnumerateInstancesResponseBody(
     CIMBuffer& out,     CIMBuffer& out,
     CIMInstancesResponseData& data,      CIMResponseData& data,
     CIMName& name)     CIMName& name)
 { {
     /* See ../Server/CIMOperationResponseEncoder.cpp */     /* See ../Server/CIMOperationResponseEncoder.cpp */
Line 372 
Line 372 
     // This allows an alternate client implementation to gain direct access     // This allows an alternate client implementation to gain direct access
     // to the binary data and pass this for example to the JNI implementation     // to the binary data and pass this for example to the JNI implementation
     // of the JSR48 CIM Client for Java.     // of the JSR48 CIM Client for Java.
     CIMInstancesResponseData& responseData = msg->getResponseData();      CIMResponseData& responseData = msg->getResponseData();
     responseData.setBinaryCimInstances(in,false);      responseData.setBinary(in,false);
  
     msg->binaryRequest=true;     msg->binaryRequest=true;
     return msg;     return msg;
Line 427 
Line 427 
     Uint32 flags,     Uint32 flags,
     const String& messageId)     const String& messageId)
 { {
     Array<CIMObjectPath> instanceNames;  /*    Array<CIMObjectPath> instanceNames;
  
     while (in.more())     while (in.more())
     {     {
Line 438 
Line 438 
  
         instanceNames.append(tmp.getData(), tmp.size());         instanceNames.append(tmp.getData(), tmp.size());
     }     }
   */
     CIMEnumerateInstanceNamesResponseMessage* msg;     CIMEnumerateInstanceNamesResponseMessage* msg;
     CIMException cimException;     CIMException cimException;
  
     msg = new CIMEnumerateInstanceNamesResponseMessage(     msg = new CIMEnumerateInstanceNamesResponseMessage(
         messageId,         messageId,
         cimException,         cimException,
         QueueIdStack(),          QueueIdStack());
         instanceNames);  
       // 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 getInstanceNames, 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.setBinary(in,false);
  
     msg->binaryRequest = true;     msg->binaryRequest = true;
     return msg;     return msg;
Line 473 
Line 482 
  
 static void _encodeEnumerateInstanceNamesResponseBody( static void _encodeEnumerateInstanceNamesResponseBody(
     CIMBuffer& out,     CIMBuffer& out,
     CIMEnumerateInstanceNamesResponseMessage* msg,      CIMResponseData& data,
     CIMName& name)     CIMName& name)
 { {
     static const CIMName NAME("EnumerateInstanceNames");     static const CIMName NAME("EnumerateInstanceNames");
     name = NAME;     name = NAME;
  
     out.putObjectPathA(msg->instanceNames, false);      data.encodeBinaryResponse(out);
 } }
  
 //============================================================================== //==============================================================================
Line 560 
Line 569 
     // This allows an alternate client implementation to gain direct access     // This allows an alternate client implementation to gain direct access
     // to the binary data and pass this for example to the JNI implementation     // to the binary data and pass this for example to the JNI implementation
     // of the JSR48 CIM Client for Java.     // of the JSR48 CIM Client for Java.
     CIMInstanceResponseData& responseData = msg->getResponseData();      CIMResponseData& responseData = msg->getResponseData();
     responseData.setBinaryCimInstance(in,false);      responseData.setBinary(in,false);
  
     msg->binaryRequest = true;     msg->binaryRequest = true;
     return msg;     return msg;
Line 599 
Line 608 
  
 static void _encodeGetInstanceResponseBody( static void _encodeGetInstanceResponseBody(
     CIMBuffer& out,     CIMBuffer& out,
     CIMInstanceResponseData& data,      CIMResponseData& data,
     CIMName& name)     CIMName& name)
 { {
     static const CIMName NAME("GetInstance");     static const CIMName NAME("GetInstance");
Line 1056 
Line 1065 
  
 static void _encodeAssociatorsResponseBody( static void _encodeAssociatorsResponseBody(
     CIMBuffer& out,     CIMBuffer& out,
     CIMObjectsResponseData& data,      CIMResponseData& data,
     CIMName& name)     CIMName& name)
 { {
     /* See ../Server/CIMOperationResponseEncoder.cpp */     /* See ../Server/CIMOperationResponseEncoder.cpp */
Line 1088 
Line 1097 
     // This allows an alternate client implementation to gain direct access     // This allows an alternate client implementation to gain direct access
     // to the binary data and pass this for example to the JNI implementation     // to the binary data and pass this for example to the JNI implementation
     // of the JSR48 CIM Client for Java.     // of the JSR48 CIM Client for Java.
     CIMObjectsResponseData& responseData = msg->getResponseData();      CIMResponseData& responseData = msg->getResponseData();
     responseData.setBinaryCimObjects(in,false);      responseData.setBinary(in,false);
  
     msg->binaryRequest = true;     msg->binaryRequest = true;
     return msg;     return msg;
Line 1207 
Line 1216 
  
 static void _encodeAssociatorNamesResponseBody( static void _encodeAssociatorNamesResponseBody(
     CIMBuffer& out,     CIMBuffer& out,
     CIMAssociatorNamesResponseMessage* msg,      CIMResponseData& data,
     CIMName& name)     CIMName& name)
 { {
     /* See ../Server/CIMOperationResponseEncoder.cpp */     /* See ../Server/CIMOperationResponseEncoder.cpp */
  
     static const CIMName NAME("AssociatorNames");     static const CIMName NAME("AssociatorNames");
     name = NAME;     name = NAME;
       data.encodeBinaryResponse(out);
     out.putObjectPathA(msg->objectNames);  
 } }
  
 static CIMAssociatorNamesResponseMessage* _decodeAssociatorNamesResponse( static CIMAssociatorNamesResponseMessage* _decodeAssociatorNamesResponse(
Line 1223 
Line 1231 
     Uint32 flags,     Uint32 flags,
     const String& messageId)     const String& messageId)
 { {
     /* See ../Client/CIMOperationResponseDecoder.cpp */  
   
     Array<CIMObjectPath> objectNames;  
   
     while (in.more())  
     {  
         Array<CIMObjectPath> tmp;  
   
         if (!in.getObjectPathA(tmp))  
             return 0;  
   
         objectNames.append(tmp.getData(), tmp.size());  
     }  
   
     CIMAssociatorNamesResponseMessage* msg;     CIMAssociatorNamesResponseMessage* msg;
     CIMException cimException;     CIMException cimException;
  
     msg = new CIMAssociatorNamesResponseMessage(     msg = new CIMAssociatorNamesResponseMessage(
         messageId,         messageId,
         cimException,         cimException,
         QueueIdStack(),          QueueIdStack());
         objectNames);  
       // 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.setBinary(in,false);
  
     msg->binaryRequest = true;     msg->binaryRequest = true;
     return msg;     return msg;
Line 1364 
Line 1367 
  
 static void _encodeReferencesResponseBody( static void _encodeReferencesResponseBody(
     CIMBuffer& out,     CIMBuffer& out,
     CIMReferencesResponseMessage* msg,      CIMResponseData& data,
     CIMName& name)     CIMName& name)
 { {
     /* See ../Server/CIMOperationResponseEncoder.cpp */     /* See ../Server/CIMOperationResponseEncoder.cpp */
Line 1372 
Line 1375 
     static const CIMName NAME("References");     static const CIMName NAME("References");
     name = NAME;     name = NAME;
  
     out.putObjectA(msg->cimObjects);      data.encodeBinaryResponse(out);
 } }
  
 static CIMReferencesResponseMessage* _decodeReferencesResponse( static CIMReferencesResponseMessage* _decodeReferencesResponse(
Line 1380 
Line 1383 
     Uint32 flags,     Uint32 flags,
     const String& messageId)     const String& messageId)
 { {
     /* See ../Client/CIMOperationResponseDecoder.cpp */  
   
     Array<CIMObject> cimObjects;  
   
     while (in.more())  
     {  
         Array<CIMObject> tmp;  
   
         if (!in.getObjectA(tmp))  
         {  
             return 0;  
         }  
   
         cimObjects.append(tmp.getData(), tmp.size());  
     }  
   
     CIMReferencesResponseMessage* msg;     CIMReferencesResponseMessage* msg;
     CIMException cimException;     CIMException cimException;
  
     msg = new CIMReferencesResponseMessage(     msg = new CIMReferencesResponseMessage(
         messageId,         messageId,
         cimException,         cimException,
         QueueIdStack(),          QueueIdStack());
         cimObjects);  
       // 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.setBinary(in,false);
  
     msg->binaryRequest = true;     msg->binaryRequest = true;
     return msg;     return msg;
Line 1499 
Line 1495 
  
 static void _encodeReferenceNamesResponseBody( static void _encodeReferenceNamesResponseBody(
     CIMBuffer& out,     CIMBuffer& out,
     CIMReferenceNamesResponseMessage* msg,      CIMResponseData& data,
     CIMName& name)     CIMName& name)
 { {
     /* See ../Server/CIMOperationResponseEncoder.cpp */     /* See ../Server/CIMOperationResponseEncoder.cpp */
  
     static const CIMName NAME("ReferenceNames");     static const CIMName NAME("ReferenceNames");
     name = NAME;     name = NAME;
       data.encodeBinaryResponse(out);
     out.putObjectPathA(msg->objectNames);  
 } }
  
 static CIMReferenceNamesResponseMessage* _decodeReferenceNamesResponse( static CIMReferenceNamesResponseMessage* _decodeReferenceNamesResponse(
Line 1517 
Line 1512 
 { {
     /* See ../Client/CIMOperationResponseDecoder.cpp */     /* See ../Client/CIMOperationResponseDecoder.cpp */
  
     Array<CIMObjectPath> objectNames;  
   
     while (in.more())  
     {  
         Array<CIMObjectPath> tmp;  
   
         if (!in.getObjectPathA(tmp))  
             return 0;  
   
         objectNames.append(tmp.getData(), tmp.size());  
     }  
   
     CIMReferenceNamesResponseMessage* msg;     CIMReferenceNamesResponseMessage* msg;
     CIMException cimException;     CIMException cimException;
  
     msg = new CIMReferenceNamesResponseMessage(     msg = new CIMReferenceNamesResponseMessage(
         messageId,         messageId,
         cimException,         cimException,
         QueueIdStack(),          QueueIdStack());
         objectNames);  
       // 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.setBinary(in,false);
  
     msg->binaryRequest = true;     msg->binaryRequest = true;
   
     return msg;     return msg;
 } }
  
Line 3063 
Line 3056 
  
 static void _encodeExecQueryResponseBody( static void _encodeExecQueryResponseBody(
     CIMBuffer& out,     CIMBuffer& out,
     CIMObjectsResponseData& data,      CIMResponseData& data,
     CIMName& name)     CIMName& name)
 { {
     /* See ../Server/CIMOperationResponseEncoder.cpp */     /* See ../Server/CIMOperationResponseEncoder.cpp */
Line 3094 
Line 3087 
     // This allows an alternate client implementation to gain direct access     // This allows an alternate client implementation to gain direct access
     // to the binary data and pass this for example to the JNI implementation     // to the binary data and pass this for example to the JNI implementation
     // of the JSR48 CIM Client for Java.     // of the JSR48 CIM Client for Java.
     CIMObjectsResponseData& responseData = msg->getResponseData();      CIMResponseData& responseData = msg->getResponseData();
     responseData.setBinaryCimObjects(in,false);      responseData.setBinary(in,false);
  
     msg->binaryRequest = true;     msg->binaryRequest = true;
     return msg;     return msg;
Line 3663 
Line 3656 
  
         case CIM_ENUMERATE_INSTANCE_NAMES_RESPONSE_MESSAGE:         case CIM_ENUMERATE_INSTANCE_NAMES_RESPONSE_MESSAGE:
         {         {
             _encodeEnumerateInstanceNamesResponseBody(buf,              _encodeEnumerateInstanceNamesResponseBody(
                 (CIMEnumerateInstanceNamesResponseMessage*)msg, name);              buf,
               ((CIMEnumerateInstanceNamesResponseMessage*)msg)->getResponseData(),
               name);
             break;             break;
         }         }
  
Line 3709 
Line 3704 
  
         case CIM_ASSOCIATOR_NAMES_RESPONSE_MESSAGE:         case CIM_ASSOCIATOR_NAMES_RESPONSE_MESSAGE:
         {         {
             _encodeAssociatorNamesResponseBody(buf,              _encodeAssociatorNamesResponseBody(
                 (CIMAssociatorNamesResponseMessage*)msg, name);                  buf,
                   ((CIMAssociatorNamesResponseMessage*)msg)->getResponseData(),
                   name);
             break;             break;
         }         }
  
         case CIM_REFERENCES_RESPONSE_MESSAGE:         case CIM_REFERENCES_RESPONSE_MESSAGE:
         {         {
             _encodeReferencesResponseBody(buf,              _encodeReferencesResponseBody(
                 (CIMReferencesResponseMessage*)msg, name);                  buf,
                   ((CIMReferencesResponseMessage*)msg)->getResponseData(),
                   name);
             break;             break;
         }         }
  
         case CIM_REFERENCE_NAMES_RESPONSE_MESSAGE:         case CIM_REFERENCE_NAMES_RESPONSE_MESSAGE:
         {         {
             _encodeReferenceNamesResponseBody(buf,              _encodeReferenceNamesResponseBody(
                 (CIMReferenceNamesResponseMessage*)msg, name);                  buf,
                   ((CIMReferenceNamesResponseMessage*)msg)->getResponseData(),
                   name);
             break;             break;
         }         }
  


Legend:
Removed from v.1.9  
changed lines
  Added in v.1.9.2.3

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2