//
-// Open Service Platform
// Copyright (c) 2012 Samsung Electronics Co., Ltd.
//
// Licensed under the Apache License, Version 2.0 (the License);
* @file FBaseResult.cpp
* @brief This is the implementation file of Result class.
*/
-
#include <stdlib.h>
#include <FBaseResult.h>
#include <FBaseErrorDefine.h>
"E_ALREADY_OPENED", //(ERR_SRC_FRAMEWORK + SET_E_CAUSE(1103))
"E_AUTHENTICATION", //(ERR_SRC_FRAMEWORK + SET_E_CAUSE(1104))
"E_APP_NOT_INSTALLED", //(ERR_SRC_FRAMEWORK + SET_E_CAUSE(1105))
- "E_ALREADY_SET", //(ERR_SRC_FRAMEWORK + SET_E_CAUSE(1106))
+ "E_ALREADY_SET", //(ERR_SRC_FRAMEWORK + SET_E_CAUSE(1106))
"E_ACCOUNT_ALREADY_EXIST", //(ERR_SRC_FRAMEWORK + SET_E_CAUSE(1107))
"E_ACCOUNT_NOT_FOUND" //(ERR_SRC_FRAMEWORK + SET_E_CAUSE(1108))
};
"E_CONNECTION_FAILED", //(ERR_SRC_FRAMEWORK + SET_E_CAUSE(1302))
"E_CONNECTION_RESET", //(ERR_SRC_FRAMEWORK + SET_E_CAUSE(1303))
"E_CREDENTIAL_EXPIRED", //(ERR_SRC_FRAMEWORK + SET_E_CAUSE(1304))
- "E_CERTIFICATE_VERIFICATION_FAILED", //(ERR_SRC_FRAMEWORK + SET_E_CAUSE(1305))
+ "E_CERTIFICATE_VERIFICATION_FAILED", //(ERR_SRC_FRAMEWORK + SET_E_CAUSE(1305))
"E_CONTEXT_UNAVAILABLE" //(ERR_SRC_FRAMEWORK + SET_E_CAUSE(1306))
};
"E_DIMENSION_CHANGED", //(ERR_SRC_FRAMEWORK + SET_E_CAUSE(1408))
"E_DNS", //(ERR_SRC_FRAMEWORK + SET_E_CAUSE(1409))
"E_DNS_NOT_FOUND", //(ERR_SRC_FRAMEWORK + SET_E_CAUSE(1410))
- "E_DATA_NOT_ENOUGH" //(ERR_SRC_FRAMEWORK + SET_E_CAUSE(1411))
- "E_DISPLAY_RIGHT_VIOLATED" //(ERR_SRC_FRAMEWORK + SET_E_CAUSE(1412))
+ "E_DATA_NOT_ENOUGH", //(ERR_SRC_FRAMEWORK + SET_E_CAUSE(1411))
+ "E_DISPLAY_RIGHT_VIOLATED" //(ERR_SRC_FRAMEWORK + SET_E_CAUSE(1412))
};
const char* __errTable1500[] =
"E_OUT_OF_MEMORY", //(ERR_SRC_FRAMEWORK + SET_E_CAUSE(2506))
"E_OUT_OF_RANGE", //(ERR_SRC_FRAMEWORK + SET_E_CAUSE(2507))
"E_OVERFLOW", //(ERR_SRC_FRAMEWORK + SET_E_CAUSE(2508))
- "E_OPENGL_ERROR" //(ERR_SRC_FRAMEWORK + SET_E_CAUSE(2509))
+ "E_OPENGL_ERROR", //(ERR_SRC_FRAMEWORK + SET_E_CAUSE(2509))
+ "E_OBJ_NOT_REGISTERED" //(ERR_SRC_FRAMEWORK + SET_E_CAUSE(2510))
};
const char* __errTable2600[] =
}
#define MAX_CHECK_COUNT 100
-_OSP_EXPORT_ result TransExceptionsExclusiveInternal(result r, result e, int num,...);
+_OSP_EXPORT_ result TransExceptionsExclusiveInternal(result r, result e, int num, ...);
-_OSP_EXPORT_ result TransExceptionsInclusiveInternal(result r, result e, int num,...);
+_OSP_EXPORT_ result TransExceptionsInclusiveInternal(result r, result e, int num, ...);
-result
+result
TransExceptionsExclusiveInternal(result r, result e, int num, ...)
{
va_list ap;
bool ref = false;
int count = 0;
- if(r == E_SUCCESS)
+ if (r == E_SUCCESS)
+ {
return r;
+ }
- va_start(ap,num);
- for(count; count < num; count++ )
+ va_start(ap, num);
+ for (; count < num; count++)
{
if (r == va_arg(ap, result))
- {
+ {
ref = true;
break;
- }
+ }
}
va_end(ap);
- if(ref)
+ if (ref)
+ {
return r;
-
- return e;
+ }
+
+ return e;
}
-result
+result
TransExceptionsInclusiveInternal(result r, result e, int num, ...)
{
va_list ap;
bool ref = false;
int count = 0;
-
- if(r == E_SUCCESS)
+
+ if (r == E_SUCCESS)
+ {
return r;
+ }
- va_start(ap,num);
- for(count; count < num ; count++ )
+ va_start(ap, num);
+ for (; count < num; count++)
{
if (r == va_arg(ap, result))
- {
+ {
ref = true;
break;
- }
+ }
}
va_end(ap);
- if(ref)
+ if (ref)
+ {
return e;
-
- return r;
-
-}
-
-
+ }
+ return r;
+}