Updating translation files...
[pub/Android/ownCloud.git] / src / com / owncloud / android / operations / RemoteOperationResult.java
index d8fbe46..718988a 100644 (file)
@@ -1,9 +1,10 @@
 /* ownCloud Android client application
  *   Copyright (C) 2012 Bartek Przybylski
+ *   Copyright (C) 2012-2013 ownCloud Inc.
  *
  *   This program is free software: you can redistribute it and/or modify
  *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation, either version 3 of the License, or
+ *   the Free Software Foundation, either version 2 of the License, or
  *   (at your option) any later version.
  *
  *   This program is distributed in the hope that it will be useful,
@@ -44,7 +45,7 @@ import com.owncloud.android.network.CertificateCombinedException;
  */
 public class RemoteOperationResult implements Serializable {
     
-    /** Generated - to refresh every time the class changes */
+    /** Generated - should be refreshed every time the class changes!! */
     private static final long serialVersionUID = -7805531062432602444L;
 
     
@@ -65,18 +66,20 @@ public class RemoteOperationResult implements Serializable {
         SSL_ERROR,
         SSL_RECOVERABLE_PEER_UNVERIFIED,
         BAD_OC_VERSION,
-        STORAGE_ERROR_MOVING_FROM_TMP,
         CANCELLED, 
         INVALID_LOCAL_FILE_NAME, 
         INVALID_OVERWRITE,
-        CONFLICT
+        CONFLICT, 
+        SYNC_CONFLICT,
+        LOCAL_STORAGE_FULL, 
+        LOCAL_STORAGE_NOT_MOVED, 
+        LOCAL_STORAGE_NOT_COPIED
     }
 
     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;
@@ -174,14 +177,6 @@ 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) {
@@ -253,8 +248,11 @@ public class RemoteOperationResult implements Serializable {
         } else if (mCode == ResultCode.BAD_OC_VERSION) {
             return "No valid ownCloud version was found at the server";
             
-        } else if (mCode == ResultCode.STORAGE_ERROR_MOVING_FROM_TMP) {
-            return "Error while moving file from temporal to final directory";
+        } else if (mCode == ResultCode.LOCAL_STORAGE_FULL) {
+            return "Local storage full";
+            
+        } else if (mCode == ResultCode.LOCAL_STORAGE_NOT_MOVED) {
+            return "Error while moving file to final directory";
         }
         
         return "Operation finished with HTTP status code " + mHttpCode + " (" + (isSuccess()?"success":"fail") + ")";