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

Diff for /pegasus/src/Pegasus/Common/CIMStatusCode.cpp between version 1.18.14.1 and 1.19

version 1.18.14.1, 2007/08/13 08:27:50 version 1.19, 2007/08/03 18:57:43
Line 38 
Line 38 
  
 static const char* _cimMessages[] = static const char* _cimMessages[] =
 { {
     "CIM_ERR_SUCCESS: successful",      "CIM_ERR_SUCCESS",
       "CIM_ERR_FAILED",
     "CIM_ERR_FAILED: A general error occurred that is not covered by a more "      "CIM_ERR_ACCESS_DENIED",
         "specific error code",      "CIM_ERR_INVALID_NAMESPACE",
       "CIM_ERR_INVALID_PARAMETER",
     "CIM_ERR_ACCESS_DENIED: Access to a CIM resource was not available to the "      "CIM_ERR_INVALID_CLASS",
         "client",      "CIM_ERR_NOT_FOUND",
       "CIM_ERR_NOT_SUPPORTED",
     "CIM_ERR_INVALID_NAMESPACE: The target namespace does not exist",      "CIM_ERR_CLASS_HAS_CHILDREN",
       "CIM_ERR_CLASS_HAS_INSTANCES",
     "CIM_ERR_INVALID_PARAMETER: One or more parameter values passed to the "      "CIM_ERR_INVALID_SUPERCLASS",
         "method were invalid",      "CIM_ERR_ALREADY_EXISTS",
       "CIM_ERR_NO_SUCH_PROPERTY",
     "CIM_ERR_INVALID_CLASS: The specified class does not exist",      "CIM_ERR_TYPE_MISMATCH",
       "CIM_ERR_QUERY_LANGUAGE_NOT_SUPPORTED",
     "CIM_ERR_NOT_FOUND: The requested object could not be found",      "CIM_ERR_INVALID_QUERY",
       "CIM_ERR_METHOD_NOT_AVAILABLE",
     "CIM_ERR_NOT_SUPPORTED: The requested operation is not supported",      "CIM_ERR_METHOD_NOT_FOUND"
   
     "CIM_ERR_CLASS_HAS_CHILDREN: Operation cannot be carried out on this "  
         "class since it has subclasses",  
   
     "CIM_ERR_CLASS_HAS_INSTANCES: Operation cannot be carried out on this "  
         "class since it has instances",  
   
     "CIM_ERR_INVALID_SUPERCLASS: Operation cannot be carried out since the "  
         "specified superclass does not exist",  
   
     "CIM_ERR_ALREADY_EXISTS: Operation cannot be carried out because an "  
         "object already exists",  
   
     "CIM_ERR_NO_SUCH_PROPERTY: The specified property does not exist",  
   
     "CIM_ERR_TYPE_MISMATCH: The value supplied is incompatible with the type",  
   
     "CIM_ERR_QUERY_LANGUAGE_NOT_SUPPORTED: The query language is not "  
         "recognized or supported",  
   
     "CIM_ERR_INVALID_QUERY: The query is not valid for the specified query "  
         "language",  
   
     "CIM_ERR_METHOD_NOT_AVAILABLE: The extrinsic method could not be executed",  
   
     "CIM_ERR_METHOD_NOT_FOUND: The specified extrinsic method does not exist",  
     "Common.CIMStatusCode.CIM_ERR_DACIM_NOT_SUPPORTED: Non-CMPI \  
      Provider not supported",  
     "Common.CIMStatusCode.CIM_ERR_DACIM_REDIRECT: Request redirected"  
 };  
   
 // l10n - keys for cimstatus messages  
 static const char* _cimMessageKeys[] =  
 {  
     "Common.CIMStatusCode.CIM_ERR_SUCCESS",  
   
     "Common.CIMStatusCode.CIM_ERR_FAILED",  
   
     "Common.CIMStatusCode.CIM_ERR_ACCESS_DENIED",  
   
     "Common.CIMStatusCode.CIM_ERR_INVALID_NAMESPACE",  
   
     "Common.CIMStatusCode.CIM_ERR_INVALID_PARAMETER",  
   
     "Common.CIMStatusCode.CIM_ERR_INVALID_CLASS",  
   
     "Common.CIMStatusCode.CIM_ERR_NOT_FOUND",  
   
     "Common.CIMStatusCode.CIM_ERR_NOT_SUPPORTED",  
   
     "Common.CIMStatusCode.CIM_ERR_CLASS_HAS_CHILDREN",  
   
     "Common.CIMStatusCode.CIM_ERR_CLASS_HAS_INSTANCES",  
   
     "Common.CIMStatusCode.CIM_ERR_INVALID_SUPERCLASS",  
   
     "Common.CIMStatusCode.CIM_ERR_ALREADY_EXISTS",  
   
     "Common.CIMStatusCode.CIM_ERR_NO_SUCH_PROPERTY",  
   
     "Common.CIMStatusCode.CIM_ERR_TYPE_MISMATCH",  
   
     "Common.CIMStatusCode.CIM_ERR_QUERY_LANGUAGE_NOT_SUPPORTED",  
   
     "Common.CIMStatusCode.CIM_ERR_INVALID_QUERY",  
   
     "Common.CIMStatusCode.CIM_ERR_METHOD_NOT_AVAILABLE",  
   
     "Common.CIMStatusCode.CIM_ERR_METHOD_NOT_FOUND",  
     "Common.CIMStatusCode.CIM_ERR_DACIM_NOT_SUPPORTED",  
     "Common.CIMStatusCode.CIM_ERR_DACIM_REDIRECT"  
 }; };
  
 // l10n TODO - the first func should go away when all Pegasus is globalized // l10n TODO - the first func should go away when all Pegasus is globalized
  
 const char* cimStatusCodeToString(CIMStatusCode code) const char* cimStatusCodeToString(CIMStatusCode code)
 { {
     if (Uint32(code) < (sizeof(_cimMessageKeys)/sizeof(_cimMessageKeys[0])))      if (Uint32(code) < (sizeof(_cimMessages)/sizeof(_cimMessages[0])))
       {
         return _cimMessages[Uint32(code)];         return _cimMessages[Uint32(code)];
       }
  
     return "Unrecognized CIM status code";     return "Unrecognized CIM status code";
 } }
Line 144 
Line 75 
     CIMStatusCode code,     CIMStatusCode code,
     const ContentLanguageList& contentLanguages)     const ContentLanguageList& contentLanguages)
 { {
     MessageLoaderParms parms;      if (Uint32(code) < (sizeof(_cimMessages)/sizeof(_cimMessages[0])))
   
     if (Uint32(code) < (sizeof(_cimMessageKeys)/sizeof(_cimMessageKeys[0])))  
     {     {
         parms = MessageLoaderParms(          return _cimMessages[Uint32(code)];
             _cimMessageKeys[Uint32(code)], _cimMessages[Uint32(code)]);  
     }     }
     else  
     {      MessageLoaderParms parms(
         parms = MessageLoaderParms(  
             "Common.CIMStatusCode.UNRECOGNIZED_STATUS_CODE",             "Common.CIMStatusCode.UNRECOGNIZED_STATUS_CODE",
             "Unrecognized CIM status code \"$0\"", Uint32(code));             "Unrecognized CIM status code \"$0\"", Uint32(code));
     }  
  
     if (contentLanguages.size() > 0)     if (contentLanguages.size() > 0)
     {     {
Line 172 
Line 98 
     String & message,     String & message,
     CIMStatusCode code)     CIMStatusCode code)
 { {
     MessageLoaderParms parms;      if (Uint32(code) < (sizeof(_cimMessages)/sizeof(_cimMessages[0])))
   
     if (Uint32(code) < (sizeof(_cimMessageKeys)/sizeof(_cimMessageKeys[0])))  
     {     {
         parms = MessageLoaderParms(          message = _cimMessages[Uint32(code)];
             _cimMessageKeys[Uint32(code)], _cimMessages[Uint32(code)]);          return ContentLanguageList();
     }     }
     else  
     {      MessageLoaderParms parms(
         parms = MessageLoaderParms(  
             "Common.CIMStatusCode.UNRECOGNIZED_STATUS_CODE",             "Common.CIMStatusCode.UNRECOGNIZED_STATUS_CODE",
             "Unrecognized CIM status code \"$0\"", Uint32(code));             "Unrecognized CIM status code \"$0\"", Uint32(code));
     }  
  
     //parms.useThreadLocale = true;     //parms.useThreadLocale = true;
     message = MessageLoader::getMessage(parms);     message = MessageLoader::getMessage(parms);


Legend:
Removed from v.1.18.14.1  
changed lines
  Added in v.1.19

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2