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

 1 mike  1.1 //%/////////////////////////////////////////////////////////////////////////////
 2           //
 3 kumpf 1.3 // Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Company, IBM,
 4           // The Open Group, Tivoli Systems
 5 mike  1.1 //
 6           // Permission is hereby granted, free of charge, to any person obtaining a copy
 7 kumpf 1.3 // of this software and associated documentation files (the "Software"), to
 8           // deal in the Software without restriction, including without limitation the
 9           // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 mike  1.1 // sell copies of the Software, and to permit persons to whom the Software is
11           // furnished to do so, subject to the following conditions:
12           // 
13 kumpf 1.3 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
14 mike  1.1 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
15           // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
16 kumpf 1.3 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
17           // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
18           // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
19 mike  1.1 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20           // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21           //
22           //==============================================================================
23           //
24           // Author: Mike Brasher (mbrasher@bmc.com)
25           //
26 kumpf 1.4 // Modified By: Carol Ann Krug Graves, Hewlett-Packard Company
27           //                (carolann_graves@hp.com)
28 mike  1.1 //
29           //%/////////////////////////////////////////////////////////////////////////////
30           
31           #include "CIMStatusCode.h"
32           
33           PEGASUS_NAMESPACE_BEGIN
34           
35           static const char* _cimMessages[] =
36           {
37               "CIM_ERR_SUCCESS: successful",
38           
39               "CIM_ERR_FAILED: A general error occurred that is not covered by a more specific "
40               "error code",
41           
42               "CIM_ERR_ACCESS_DENIED: Access to a CIM resource was not available to the client",
43           
44               "CIM_ERR_INVALID_NAMESPACE: The target namespace does not exist",
45           
46               "CIM_ERR_INVALID_PARAMETER: One or more parameter values passed to the method "
47               "were invalid",
48           
49 mike  1.1     "CIM_ERR_INVALID_CLASS: The specified class does not exist",
50           
51               "CIM_ERR_NOT_FOUND: The requested object could not be found",
52           
53               "CIM_ERR_NOT_SUPPORTED: The requested operation is not supported",
54           
55               "CIM_ERR_CLASS_HAS_CHILDREN: Operation cannot be carried out on this class since "
56               "it has subclasses",
57           
58               "CIM_ERR_CLASS_HAS_INSTANCES: Operation cannot be carried out on this class since "
59               "it has instances",
60           
61               "CIM_ERR_INVALID_SUPERCLASS: Operation cannot be carried out since the specified "
62               "superclass does not exist",
63           
64               "CIM_ERR_ALREADY_EXISTS: Operation cannot be carried out because an object already "
65               "exists",
66           
67               "CIM_ERR_NO_SUCH_PROPERTY: The specified property does not exist",
68           
69               "CIM_ERR_TYPE_MISMATCH: The value supplied is incompatible with the type",
70 mike  1.1 
71               "CIM_ERR_QUERY_LANGUAGE_NOT_SUPPORTED: The query language is not recognized or "
72               "supported",
73           
74               "CIM_ERR_INVALID_QUERY: The query is not valid for the specified query language",
75           
76               "CIM_ERR_METHOD_NOT_AVAILABLE: The extrinsic method could not be executed",
77           
78               "CIM_ERR_METHOD_NOT_FOUND: The specified extrinsic method does not exist"
79           };
80           
81 kumpf 1.4 const char* cimStatusCodeToString(CIMStatusCode code)
82 mike  1.1 {
83               if (Uint32(code) < CIM_ERR_METHOD_NOT_FOUND)
84           	return _cimMessages[Uint32(code)];
85           
86 kumpf 1.2     return "Unrecognized CIM status code";
87 mike  1.1 }
88           
89           PEGASUS_NAMESPACE_END

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2