Fixed local path NULL when making favourite a file not down ; fixed change of local...
[pub/Android/ownCloud.git] / src / com / owncloud / android / operations / RemoteOperationResult.java
index 60b2b1a..d8fbe46 100644 (file)
@@ -66,13 +66,17 @@ public class RemoteOperationResult implements Serializable {
         SSL_RECOVERABLE_PEER_UNVERIFIED,
         BAD_OC_VERSION,
         STORAGE_ERROR_MOVING_FROM_TMP,
-        CANCELLED
+        CANCELLED, 
+        INVALID_LOCAL_FILE_NAME, 
+        INVALID_OVERWRITE,
+        CONFLICT
     }
 
     private boolean mSuccess = false;
     private int mHttpCode = -1;
     private Exception mException = null;
     private ResultCode mCode = ResultCode.UNKNOWN_ERROR;
+    private Object mExtraData = null;
     
     public RemoteOperationResult(ResultCode code) {
         mCode = code;
@@ -97,6 +101,9 @@ public class RemoteOperationResult implements Serializable {
                 case HttpStatus.SC_INTERNAL_SERVER_ERROR:
                     mCode = ResultCode.INSTANCE_NOT_CONFIGURED;
                     break;
+                case HttpStatus.SC_CONFLICT:
+                    mCode = ResultCode.CONFLICT;
+                    break;
                 default:
                     mCode = ResultCode.UNHANDLED_HTTP_CODE;
             }
@@ -167,6 +174,14 @@ public class RemoteOperationResult implements Serializable {
         return mCode == ResultCode.SSL_RECOVERABLE_PEER_UNVERIFIED;
     }
     
+    public void setExtraData(Object data) {
+        mExtraData = data;
+    }
+    
+    public Object getExtraData() {
+        return mExtraData;
+    }
+    
     private CertificateCombinedException getCertificateCombinedException(Exception e) {
         CertificateCombinedException result = null;
         if (e instanceof CertificateCombinedException) {