X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/5af0fb44b4c859f9f7f7aca39376686f091b496e..ccfd7772dfd9bb5ab6bb340ffca0ed090cae1231:/src/com/owncloud/android/operations/RemoteOperationResult.java diff --git a/src/com/owncloud/android/operations/RemoteOperationResult.java b/src/com/owncloud/android/operations/RemoteOperationResult.java index b371fb81..be62ba1f 100644 --- a/src/com/owncloud/android/operations/RemoteOperationResult.java +++ b/src/com/owncloud/android/operations/RemoteOperationResult.java @@ -1,5 +1,6 @@ /* 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 @@ -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,10 +66,14 @@ 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 + INVALID_OVERWRITE, + CONFLICT, + SYNC_CONFLICT, + LOCAL_STORAGE_FULL, + LOCAL_STORAGE_NOT_MOVED, + LOCAL_STORAGE_NOT_COPIED } private boolean mSuccess = false; @@ -99,6 +104,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; } @@ -240,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") + ")";