Add missing stack errors to android code 52/181752/1
authorharish_kumar <harish.191@samsung.com>
Fri, 8 Jun 2018 12:36:05 +0000 (18:06 +0530)
committerAmit KS <amit.s12@samsung.com>
Mon, 18 Jun 2018 06:05:36 +0000 (11:35 +0530)
Add missing OCStackResult enum values to errorcode.java file
and JniUtils.h.

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/291
(cherry picked from commit e2545fc58de379f686ac60c43cffb1d032620c77)

Change-Id: Iebba2b63ed1805f1c1bed09aaa1e4f3792ea220a
Signed-off-by: harish_kumar <harish.191@samsung.com>
Signed-off-by: Amit KS <amit.s12@samsung.com>
android/android_api/base/jni/JniUtils.h
android/android_api/base/src/main/java/org/iotivity/base/ErrorCode.java

index 0fe8578..6175f41 100644 (file)
@@ -243,6 +243,9 @@ public:
                 return "UNAUTHORIZED_REQ";
             case OC_STACK_TOO_MANY_REQUESTS:
                 return "TOO_MANY_REQUESTS";
+           
+            case OC_STACK_TOO_LARGE_REQ:
+               return "TOO_LARGE_REQ";
             /** Error code from PDM */
             case OC_STACK_PDM_IS_NOT_INITIALIZED:
                 return "PDM_IS_NOT_INITIALIZED";
@@ -255,6 +258,9 @@ public:
             /** Error code from OTM */
             case OC_STACK_AUTHENTICATION_FAILURE:
                 return "AUTHENTICATION_FAILURE";
+       
+           case OC_STACK_NOT_ALLOWED_OXM:
+               return "NOT_ALLOWED_OXM";
             /** Insert all new error codes here!.*/
 #ifdef WITH_PRESENCE
             case OC_STACK_PRESENCE_STOPPED:
@@ -264,6 +270,29 @@ public:
             case OC_STACK_PRESENCE_DO_NOT_HANDLE:
                 return "PRESENCE_DO_NOT_HANDLE";
 #endif
+        
+           /** Request is denied by the user*/
+           case OC_STACK_USER_DENIED_REQ:
+               return "USER_DENIED_REQUEST";
+           case OC_STACK_METHOD_NOT_ALLOWED: 
+               return "METHOD_NOT_ALLOWED";
+       
+           /** ERROR code from server */
+           case OC_STACK_FORBIDDEN_REQ:
+               return "FORBIDDEN_REQUEST";
+           case OC_STACK_INTERNAL_SERVER_ERROR:
+               return "INTERNAL_SERVER_ERROR"; 
+           case OC_STACK_NOT_IMPLEMENTED:
+               return "NOT_IMPLEMENTED";
+           case OC_STACK_BAD_GATEWAY:
+               return "BAD_GATEWAY";
+           case OC_STACK_SERVICE_UNAVAILABLE:
+               return "SERVICE_UNAVAILABLE";
+           case OC_STACK_GATEWAY_TIMEOUT:
+               return "GATEWAY_TIMEOUT";
+           case OC_STACK_PROXY_NOT_SUPPORTED:
+               return "PROXY_NOT_SUPPORTED";    
             case OC_STACK_ERROR:
                 return "ERROR";
 
index 964674e..6bbed5a 100644 (file)
@@ -58,18 +58,37 @@ public enum ErrorCode {
     INVALID_DEVICE_INFO("INVALID_DEVICE_INFO", ""),
     INVALID_JSON("INVALID_JSON", ""),
     UNAUTHORIZED_REQ("UNAUTHORIZED_REQ", "Request is not authorized by Resource Server"),
+    NOT_ACCEPTABLE("NOT_ACCEPTABLE",""),
+    TOO_LARGE_REQ("TOO_LARGE_REQ",""),
     TOO_MANY_REQUESTS("TOO_MANY_REQUESTS", "Request is not served by Server; Request again after retry timer (in seconds)"),
     /** Error code from PDM */
     PDM_IS_NOT_INITIALIZED("PDM_IS_NOT_INITIALIZED", ""),
     DUPLICATE_UUID("DUPLICATE_UUID", ""),
     INCONSISTENT_DB("INCONSISTENT_DB", ""),
+    
+    SVR_DB_NOT_EXIST("SVR_DB_NOT_EXIST",""),    
     /** Error code from OTM */
     AUTHENTICATION_FAILURE("AUTHENTICATION_FAILURE",
         "This error is pushed from DTLS interface when handshake failure happens"),
+   
+    NOT_ALLOWED_OXM("NOT_ALLOWED_OXM",""),
     /** Insert all new error codes here!.*/
     PRESENCE_STOPPED("PRESENCE_STOPPED", ""),
     PRESENCE_TIMEOUT("PRESENCE_TIMEOUT", ""),
     PRESENCE_DO_NOT_HANDLE("PRESENCE_DO_NOT_HANDLE", ""),
+    
+    /** Request is denied by the user*/
+    USER_DENIED_REQUEST("USER_DENIED_REQUEST",""),
+    METHOD_NOT_ALLOWED("METHOD_NOT_ALLOWED",""),
+    /** ERROR code from server */
+    FORBIDDEN_REQUEST("FORBIDDEN_REQUEST",""),
+    INTERNAL_SERVER_ERROR("INTERNAL_SERVER_ERROR",""),
+    NOT_IMPLEMENTED("NOT_IMPLEMENTED",""),
+    BAD_GATEWAY("BAD_GATEWAY",""),
+    SERVICE_UNAVAILABLE("SERVICE_UNAVAILABLE",""),
+    GATEWAY_TIMEOUT("GATEWAY_TIMEOUT",""),
+    PROXY_NOT_SUPPORTED("PROXY_NOT_SUPPORTED",""),
+         
     /** ERROR in stack.*/
     ERROR("ERROR", "Generic error"),