SIMULATOR_RESOURCE_CREATED,
SIMULATOR_RESOURCE_DELETED,
SIMULATOR_CONTINUE,
+ SIMULATOR_RESOURCE_CHANGED,
SIMULATOR_INVALID_URI = 20,
SIMULATOR_INVALID_QUERY,
SIMULATOR_INVALID_IP,
SIMULATOR_INVALID_DEVICE_INFO,
SIMULATOR_INVALID_JSON,
SIMULATOR_UNAUTHORIZED_REQ,
+ SIMULATOR_TOO_LARGE_REQ,
+ SIMULATOR_PDM_IS_NOT_INITIALIZED,
+ SIMULATOR_DUPLICATE_UUID,
+ SIMULATOR_INCONSISTENT_DB,
+ SIMULATOR_AUTHENTICATION_FAILURE,
#ifdef WITH_PRESENCE
SIMULATOR_PRESENCE_STOPPED = 128,
SIMULATOR_PRESENCE_TIMEOUT,
public void onGetResponse(final String uid,
final SimulatorResult result,
final SimulatorResourceModel resourceModelN) {
- if (result != SimulatorResult.SIMULATOR_OK) {
+ if (result.ordinal() > SimulatorResult.SIMULATOR_RESOURCE_CHANGED.ordinal()) {
Activator
.getDefault()
.getLogManager()
public void onPutResponse(final String uid,
final SimulatorResult result,
final SimulatorResourceModel resourceModelN) {
- if (result != SimulatorResult.SIMULATOR_OK) {
+ if (result.ordinal() > SimulatorResult.SIMULATOR_RESOURCE_CHANGED.ordinal()) {
Activator
.getDefault()
.getLogManager()
public void onPostResponse(final String uid,
final SimulatorResult result,
final SimulatorResourceModel resourceModelN) {
- if (result != SimulatorResult.SIMULATOR_OK) {
+ if (result.ordinal() > SimulatorResult.SIMULATOR_RESOURCE_CHANGED.ordinal()) {
Activator
.getDefault()
.getLogManager()
"SIMULATOR_CONTINUE", "Lorg/oic/simulator/SimulatorResult;");
return env->GetStaticObjectField(gSimulatorClassRefs.simulatorResultCls, fieldID);
}
+ case SIMULATOR_RESOURCE_CHANGED:
+ {
+ static jfieldID fieldID = env->GetStaticFieldID(gSimulatorClassRefs.simulatorResultCls,
+ "SIMULATOR_RESOURCE_CHANGED", "Lorg/oic/simulator/SimulatorResult;");
+ return env->GetStaticObjectField(gSimulatorClassRefs.simulatorResultCls, fieldID);
+ }
case SIMULATOR_INVALID_URI:
{
static jfieldID fieldID = env->GetStaticFieldID(gSimulatorClassRefs.simulatorResultCls,
"SIMULATOR_UNAUTHORIZED_REQ", "Lorg/oic/simulator/SimulatorResult;");
return env->GetStaticObjectField(gSimulatorClassRefs.simulatorResultCls, fieldID);
}
+ case SIMULATOR_TOO_LARGE_REQ:
+ {
+ static jfieldID fieldID = env->GetStaticFieldID(gSimulatorClassRefs.simulatorResultCls,
+ "SIMULATOR_TOO_LARGE_REQ", "Lorg/oic/simulator/SimulatorResult;");
+ return env->GetStaticObjectField(gSimulatorClassRefs.simulatorResultCls, fieldID);
+ }
+ case SIMULATOR_PDM_IS_NOT_INITIALIZED:
+ {
+ static jfieldID fieldID = env->GetStaticFieldID(gSimulatorClassRefs.simulatorResultCls,
+ "SIMULATOR_PDM_IS_NOT_INITIALIZED", "Lorg/oic/simulator/SimulatorResult;");
+ return env->GetStaticObjectField(gSimulatorClassRefs.simulatorResultCls, fieldID);
+ }
+ case SIMULATOR_DUPLICATE_UUID:
+ {
+ static jfieldID fieldID = env->GetStaticFieldID(gSimulatorClassRefs.simulatorResultCls,
+ "SIMULATOR_DUPLICATE_UUID", "Lorg/oic/simulator/SimulatorResult;");
+ return env->GetStaticObjectField(gSimulatorClassRefs.simulatorResultCls, fieldID);
+ }
+ case SIMULATOR_INCONSISTENT_DB:
+ {
+ static jfieldID fieldID = env->GetStaticFieldID(gSimulatorClassRefs.simulatorResultCls,
+ "SIMULATOR_INCONSISTENT_DB", "Lorg/oic/simulator/SimulatorResult;");
+ return env->GetStaticObjectField(gSimulatorClassRefs.simulatorResultCls, fieldID);
+ }
+ case SIMULATOR_AUTHENTICATION_FAILURE:
+ {
+ static jfieldID fieldID = env->GetStaticFieldID(gSimulatorClassRefs.simulatorResultCls,
+ "SIMULATOR_AUTHENTICATION_FAILURE", "Lorg/oic/simulator/SimulatorResult;");
+ return env->GetStaticObjectField(gSimulatorClassRefs.simulatorResultCls, fieldID);
+ }
#ifdef WITH_PRESENCE
case SIMULATOR_PRESENCE_STOPPED:
{
*/
public enum SimulatorResult {
/** STACK error codes - START */
- SIMULATOR_OK, SIMULATOR_RESOURCE_CREATED, SIMULATOR_RESOURCE_DELETED, SIMULATOR_CONTINUE, SIMULATOR_INVALID_URI, SIMULATOR_INVALID_QUERY, SIMULATOR_INVALID_IP, SIMULATOR_INVALID_PORT, SIMULATOR_INVALID_CALLBACK, SIMULATOR_INVALID_METHOD, SIMULATOR_INVALID_PARAM, SIMULATOR_INVALID_OBSERVE_PARAM, SIMULATOR_NO_MEMORY, SIMULATOR_COMM_ERROR, SIMULATOR_TIMEOUT, SIMULATOR_ADAPTER_NOT_ENABLED, SIMULATOR_NOTIMPL, SIMULATOR_NO_RESOURCE, SIMULATOR_RESOURCE_ERROR, SIMULATOR_SLOW_RESOURCE, SIMULATOR_DUPLICATE_REQUEST, SIMULATOR_NO_OBSERVERS, SIMULATOR_OBSERVER_NOT_FOUND, SIMULATOR_VIRTUAL_DO_NOT_HANDLE, SIMULATOR_INVALID_OPTION, SIMULATOR_MALFORMED_RESPONSE, SIMULATOR_PERSISTENT_BUFFER_REQUIRED, SIMULATOR_INVALID_REQUEST_HANDLE, SIMULATOR_INVALID_DEVICE_INFO, SIMULATOR_INVALID_JSON, SIMULATOR_UNAUTHORIZED_REQ,
+ SIMULATOR_OK, SIMULATOR_RESOURCE_CREATED, SIMULATOR_RESOURCE_DELETED, SIMULATOR_CONTINUE, SIMULATOR_RESOURCE_CHANGED, SIMULATOR_INVALID_URI, SIMULATOR_INVALID_QUERY, SIMULATOR_INVALID_IP, SIMULATOR_INVALID_PORT, SIMULATOR_INVALID_CALLBACK, SIMULATOR_INVALID_METHOD, SIMULATOR_INVALID_PARAM, SIMULATOR_INVALID_OBSERVE_PARAM, SIMULATOR_NO_MEMORY, SIMULATOR_COMM_ERROR, SIMULATOR_TIMEOUT, SIMULATOR_ADAPTER_NOT_ENABLED, SIMULATOR_NOTIMPL, SIMULATOR_NO_RESOURCE, SIMULATOR_RESOURCE_ERROR, SIMULATOR_SLOW_RESOURCE, SIMULATOR_DUPLICATE_REQUEST, SIMULATOR_NO_OBSERVERS, SIMULATOR_OBSERVER_NOT_FOUND, SIMULATOR_VIRTUAL_DO_NOT_HANDLE, SIMULATOR_INVALID_OPTION, SIMULATOR_MALFORMED_RESPONSE, SIMULATOR_PERSISTENT_BUFFER_REQUIRED, SIMULATOR_INVALID_REQUEST_HANDLE, SIMULATOR_INVALID_DEVICE_INFO, SIMULATOR_INVALID_JSON, SIMULATOR_UNAUTHORIZED_REQ, SIMULATOR_TOO_LARGE_REQ,
+
+ /** Error code from PDM */
+ SIMULATOR_PDM_IS_NOT_INITIALIZED, SIMULATOR_DUPLICATE_UUID, SIMULATOR_INCONSISTENT_DB,
+
+ /** Error code from OTM */
+ SIMULATOR_AUTHENTICATION_FAILURE,
SIMULATOR_PRESENCE_STOPPED, SIMULATOR_PRESENCE_TIMEOUT, SIMULATOR_PRESENCE_DO_NOT_HANDLE,
/** STACK error codes - END */