/usr/src/startcom/BUILD/pegasus/src/Pegasus/Common/CIMStatusCode.h

00001 //%LICENSE////////////////////////////////////////////////////////////////
00002 //
00003 // Licensed to The Open Group (TOG) under one or more contributor license
00004 // agreements.  Refer to the OpenPegasusNOTICE.txt file distributed with
00005 // this work for additional information regarding copyright ownership.
00006 // Each contributor licenses this file to you under the OpenPegasus Open
00007 // Source License; you may not use this file except in compliance with the
00008 // License.
00009 //
00010 // Permission is hereby granted, free of charge, to any person obtaining a
00011 // copy of this software and associated documentation files (the "Software"),
00012 // to deal in the Software without restriction, including without limitation
00013 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
00014 // and/or sell copies of the Software, and to permit persons to whom the
00015 // Software is furnished to do so, subject to the following conditions:
00016 //
00017 // The above copyright notice and this permission notice shall be included
00018 // in all copies or substantial portions of the Software.
00019 //
00020 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
00021 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00022 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
00023 // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
00024 // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
00025 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
00026 // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00027 //
00029 //
00030 //%/////////////////////////////////////////////////////////////////////////////
00031 
00032 #ifndef Pegasus_CIMStatusCode_h
00033 #define Pegasus_CIMStatusCode_h
00034 
00035 #include <Pegasus/Common/Config.h>
00036 #include <Pegasus/Common/Linkage.h>
00037 #include <Pegasus/Common/ContentLanguageList.h>
00038 
00039 PEGASUS_NAMESPACE_BEGIN
00040 
00045 enum CIMStatusCode
00046 {
00050     CIM_ERR_SUCCESS = 0,
00051 
00056     CIM_ERR_FAILED = 1,
00057 
00061     CIM_ERR_ACCESS_DENIED = 2,
00062 
00066     CIM_ERR_INVALID_NAMESPACE = 3,
00067 
00071     CIM_ERR_INVALID_PARAMETER = 4,
00072 
00076     CIM_ERR_INVALID_CLASS = 5,
00077 
00081     CIM_ERR_NOT_FOUND = 6,
00082 
00086     CIM_ERR_NOT_SUPPORTED = 7,
00087 
00091     CIM_ERR_CLASS_HAS_CHILDREN = 8,
00092 
00096     CIM_ERR_CLASS_HAS_INSTANCES = 9,
00097 
00102     CIM_ERR_INVALID_SUPERCLASS = 10,
00103 
00107     CIM_ERR_ALREADY_EXISTS = 11,
00108 
00112     CIM_ERR_NO_SUCH_PROPERTY = 12,
00113 
00117     CIM_ERR_TYPE_MISMATCH = 13,
00118 
00122     CIM_ERR_QUERY_LANGUAGE_NOT_SUPPORTED = 14,
00123 
00127     CIM_ERR_INVALID_QUERY = 15,
00128 
00132     CIM_ERR_METHOD_NOT_AVAILABLE = 16,
00133 
00137     CIM_ERR_METHOD_NOT_FOUND = 17
00138 };
00139 
00140 PEGASUS_COMMON_LINKAGE const char* cimStatusCodeToString(CIMStatusCode code);
00141 
00142 #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
00143 
00146 PEGASUS_COMMON_LINKAGE String cimStatusCodeToString(
00147     CIMStatusCode code,
00148     const ContentLanguageList &contentLanguages);
00149 
00153 PEGASUS_COMMON_LINKAGE ContentLanguageList cimStatusCodeToString_Thread(
00154     String & message,
00155     CIMStatusCode code);
00156 #endif  //    PEGASUS_USE_EXPERIMENTAL_INTERFACES
00157 
00158 PEGASUS_NAMESPACE_END
00159 
00160 #endif /* Pegasus_CIMStatusCode_h */