00001 #ifndef COMMON_OUTCOMES_CLASS
00002 #define COMMON_OUTCOMES_CLASS
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #include "outcome.h"
00019
00020 namespace basis {
00021
00023 class common
00024 {
00025 public:
00027
00029 enum outcomes {
00030 DEFINE_API_OUTCOME(OKAY, 0, "Everything is just fine"),
00031 DEFINE_API_OUTCOME(NOT_IMPLEMENTED, -1,
00032 "The invoked method is unimplemented"),
00033 DEFINE_API_OUTCOME(OUT_OF_RANGE, -2, "The value specified was out "
00034 "of bounds"),
00035 DEFINE_API_OUTCOME(NOT_FOUND, -3, "The item sought is not present"),
00036 DEFINE_API_OUTCOME(BAD_INPUT, -4, "Precondition failure--the parameters "
00037 "were inappropriate"),
00038 DEFINE_API_OUTCOME(BAD_TYPE, -5, "The objects are of incompatible types"),
00039 DEFINE_API_OUTCOME(IS_FULL, -6, "There is no room in the storage facility"),
00040 DEFINE_API_OUTCOME(IS_EMPTY, -7, "The container is empty currently"),
00041 DEFINE_API_OUTCOME(IS_NEW, -8, "The item is new"),
00042 DEFINE_API_OUTCOME(EXISTING, -9, "The item was already present"),
00043 DEFINE_API_OUTCOME(FAILURE, -10, "A failure has occurred"),
00044 DEFINE_API_OUTCOME(OUT_OF_MEMORY, -11, "There is not enough memory for the "
00045 "request according to the operating system"),
00046 DEFINE_API_OUTCOME(ACCESS_DENIED, -12, "The request was denied, possibly "
00047 "by the operating system"),
00048 DEFINE_API_OUTCOME(IN_USE, -13, "The object is already in exclusive use"),
00049 DEFINE_API_OUTCOME(UNINITIALIZED, -14, "The object has not been "
00050 "constructed properly"),
00051 DEFINE_API_OUTCOME(TIMED_OUT, -15, "The allowed time has now elapsed"),
00052 DEFINE_API_OUTCOME(GARBAGE, -16, "The request or response has been "
00053 "corrupted"),
00054 DEFINE_API_OUTCOME(NO_SPACE, -17, "A programmatic limit on storage space "
00055 "has been reached"),
00056 DEFINE_API_OUTCOME(DISALLOWED, -18, "The method denied the request"),
00057 DEFINE_API_OUTCOME(INCOMPLETE, -19, "The operation did not finish or the "
00058 "object is not completed"),
00059 DEFINE_API_OUTCOME(NO_HANDLER, -20, "The object type passed in was not "
00060 "understood by the invoked method"),
00061 DEFINE_API_OUTCOME(NONE_READY, -21, "There were no objects available"),
00062 DEFINE_API_OUTCOME(INVALID, -22, "That request or object was invalid"),
00063 DEFINE_API_OUTCOME(PARTIAL, -23, "The request was only partially finished"),
00064 DEFINE_API_OUTCOME(NO_LICENSE, -24, "The software license does not permit"
00065 "this request"),
00066 DEFINE_API_OUTCOME(UNEXPECTED, -25, "This item was unexpected, although "
00067 "not necessarily erroneous"),
00068 DEFINE_API_OUTCOME(ENCRYPTION_MISMATCH, -26, "The request failed due to a "
00069 "mismatch between encryption expected and encryption provided")
00070 };
00071
00072 static const char *outcome_name(const outcome &to_name);
00074
00077 };
00078
00079 }
00080
00081 #endif // outer guard.
00082