ソースを参照

Merge branch 'develop' into refactor_remote_operation_to_read_file

Conflicts:
	src/com/owncloud/android/utils/FileStorageUtils.java
masensio 11 年 前
コミット
44e3288168
55 ファイル変更1250 行追加240 行削除
  1. 5 3
      oc_framework-test-project/AndroidManifest.xml
  2. BIN
      oc_framework-test-project/assets/fileToUpload.png
  3. BIN
      oc_framework-test-project/assets/fileToUploadChunks.MP4
  4. 17 0
      oc_framework-test-project/oc_framework-test-test/src/com/owncloud/android/oc_framework_test_project/test/CreateFolderTest.java
  5. 23 0
      oc_framework-test-project/oc_framework-test-test/src/com/owncloud/android/oc_framework_test_project/test/DeleteFileTest.java
  6. 123 0
      oc_framework-test-project/oc_framework-test-test/src/com/owncloud/android/oc_framework_test_project/test/DownloadFileTest.java
  7. 17 1
      oc_framework-test-project/oc_framework-test-test/src/com/owncloud/android/oc_framework_test_project/test/ReadFolderTest.java
  8. 17 0
      oc_framework-test-project/oc_framework-test-test/src/com/owncloud/android/oc_framework_test_project/test/RenameFileTest.java
  9. 161 0
      oc_framework-test-project/oc_framework-test-test/src/com/owncloud/android/oc_framework_test_project/test/UploadFileTest.java
  10. 65 0
      oc_framework-test-project/src/com/owncloud/android/oc_framework_test_project/TestActivity.java
  11. 17 20
      oc_framework/src/com/owncloud/android/oc_framework/operations/remote/ChunkedUploadRemoteFileOperation.java
  12. 169 0
      oc_framework/src/com/owncloud/android/oc_framework/operations/remote/DownloadRemoteFileOperation.java
  13. 7 7
      oc_framework/src/com/owncloud/android/oc_framework/operations/remote/ExistenceCheckRemoteOperation.java
  14. 147 0
      oc_framework/src/com/owncloud/android/oc_framework/operations/remote/UploadRemoteFileOperation.java
  15. 2 0
      res/values-ak/strings.xml
  16. 24 0
      res/values-ar/strings.xml
  17. 6 1
      res/values-be/strings.xml
  18. 1 0
      res/values-ca/strings.xml
  19. 1 0
      res/values-cs-rCZ/strings.xml
  20. 15 0
      res/values-da/strings.xml
  21. 1 0
      res/values-de-rDE/strings.xml
  22. 1 0
      res/values-de/strings.xml
  23. 14 0
      res/values-el/strings.xml
  24. 1 0
      res/values-en-rGB/strings.xml
  25. 15 0
      res/values-es-rCL/strings.xml
  26. 232 1
      res/values-es-rMX/strings.xml
  27. 1 0
      res/values-es/strings.xml
  28. 1 0
      res/values-et-rEE/strings.xml
  29. 1 0
      res/values-fi-rFI/strings.xml
  30. 2 1
      res/values-fr/strings.xml
  31. 1 0
      res/values-gl/strings.xml
  32. 3 0
      res/values-hu-rHU/strings.xml
  33. 1 1
      res/values-id/strings.xml
  34. 1 0
      res/values-it/strings.xml
  35. 1 0
      res/values-ja-rJP/strings.xml
  36. 9 1
      res/values-ko/strings.xml
  37. 1 0
      res/values-nl/strings.xml
  38. 1 0
      res/values-pl/strings.xml
  39. 1 0
      res/values-pt-rBR/strings.xml
  40. 1 0
      res/values-ru/strings.xml
  41. 1 0
      res/values-sk-rSK/strings.xml
  42. 6 1
      res/values-sk/strings.xml
  43. 1 0
      res/values-sl/strings.xml
  44. 16 15
      res/values-tr/strings.xml
  45. 2 0
      res/values-ur/strings.xml
  46. 8 8
      src/com/owncloud/android/authentication/AuthenticatorActivity.java
  47. 4 4
      src/com/owncloud/android/files/services/FileDownloader.java
  48. 5 13
      src/com/owncloud/android/files/services/FileUploader.java
  49. 39 103
      src/com/owncloud/android/operations/DownloadFileOperation.java
  50. 43 51
      src/com/owncloud/android/operations/UploadFileOperation.java
  51. 0 1
      src/com/owncloud/android/syncadapter/ContactSyncAdapter.java
  52. 2 3
      src/com/owncloud/android/syncadapter/FileSyncAdapter.java
  53. 0 2
      src/com/owncloud/android/syncadapter/FileSyncService.java
  54. 0 3
      src/com/owncloud/android/ui/activity/Uploader.java
  55. 17 0
      src/com/owncloud/android/utils/FileStorageUtils.java

+ 5 - 3
oc_framework-test-project/AndroidManifest.xml

@@ -9,9 +9,11 @@
     <uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
     <uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />
     <uses-permission android:name="android.permission.INTERNET"/>
-        <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
-    
-    <uses-sdk
+    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
+    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
+    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
+
+	<uses-sdk
         android:minSdkVersion="8"
         android:targetSdkVersion="19" />
 

BIN
oc_framework-test-project/assets/fileToUpload.png


BIN
oc_framework-test-project/assets/fileToUploadChunks.MP4


+ 17 - 0
oc_framework-test-project/oc_framework-test-test/src/com/owncloud/android/oc_framework_test_project/test/CreateFolderTest.java

@@ -1,3 +1,20 @@
+/* ownCloud Android client application
+ *   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 version 2,
+ *   as published by the Free Software Foundation.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
 package com.owncloud.android.oc_framework_test_project.test;
 
 import java.text.SimpleDateFormat;

+ 23 - 0
oc_framework-test-project/oc_framework-test-test/src/com/owncloud/android/oc_framework_test_project/test/DeleteFileTest.java

@@ -1,3 +1,20 @@
+/* ownCloud Android client application
+ *   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 version 2,
+ *   as published by the Free Software Foundation.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
 package com.owncloud.android.oc_framework_test_project.test;
 
 import com.owncloud.android.oc_framework.operations.RemoteOperationResult;
@@ -6,6 +23,12 @@ import com.owncloud.android.oc_framework_test_project.TestActivity;
 
 import android.test.ActivityInstrumentationTestCase2;
 
+/**
+ * Class to test Delete a File Operation
+ * @author masensio
+ *
+ */
+
 public class DeleteFileTest extends ActivityInstrumentationTestCase2<TestActivity> {
 
 	/* Folder data to delete. */

+ 123 - 0
oc_framework-test-project/oc_framework-test-test/src/com/owncloud/android/oc_framework_test_project/test/DownloadFileTest.java

@@ -0,0 +1,123 @@
+/* ownCloud Android client application
+ *   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 version 2,
+ *   as published by the Free Software Foundation.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+package com.owncloud.android.oc_framework_test_project.test;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import com.owncloud.android.oc_framework.operations.RemoteFile;
+import com.owncloud.android.oc_framework.operations.RemoteOperationResult;
+import com.owncloud.android.oc_framework_test_project.TestActivity;
+
+import android.test.ActivityInstrumentationTestCase2;
+
+/**
+ * Class to test Download File Operation
+ * @author masensio
+ *
+ */
+
+public class DownloadFileTest extends ActivityInstrumentationTestCase2<TestActivity> {
+
+	
+	/* Files to download. These files must exist on the account */
+	private final String mRemoteFilePng = "/fileToDownload.png";
+	private final String mRemoteFileChunks = "/fileToDownload.mp4";
+	private final String mRemoteFileSpecialChars = "/@file@download.png";
+	private final String mRemoteFileSpecialCharsChunks = "/@file@download.mp4";
+	private final String mRemoteFileNotFound = "/fileNotFound.png"; /* This file mustn't exist on the account */
+	
+	private String mCurrentDate;
+	
+	
+	private TestActivity mActivity;
+	
+	public DownloadFileTest() {
+	    super(TestActivity.class);
+	    
+		SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd_HHmmss");
+		mCurrentDate = sdf.format(new Date());
+	}
+	
+	@Override
+	  protected void setUp() throws Exception {
+	    super.setUp();
+	    setActivityInitialTouchMode(false);
+	    mActivity = getActivity();
+	}
+
+	/**
+	 * Test Download a File
+	 */
+	public void testDownloadFile() {
+		String temporalFolder = "/download" + mCurrentDate;
+		
+		RemoteFile remoteFile= new RemoteFile(mRemoteFilePng);
+
+		RemoteOperationResult result = mActivity.downloadFile(remoteFile, temporalFolder);
+		assertTrue(result.isSuccess());
+	}
+	
+	/**
+	 * Test Download a File with chunks
+	 */
+	public void testDownloadFileChunks() {
+		String temporalFolder = "/download" + mCurrentDate;
+		
+		RemoteFile remoteFile= new RemoteFile(mRemoteFileChunks);
+
+		RemoteOperationResult result = mActivity.downloadFile(remoteFile, temporalFolder);
+		assertTrue(result.isSuccess());
+	}
+	
+	/**
+	 * Test Download a File with special chars
+	 */
+	public void testDownloadFileSpecialChars() {
+		String temporalFolder = "/download" + mCurrentDate;
+		
+		RemoteFile remoteFile= new RemoteFile(mRemoteFileSpecialChars);
+
+		RemoteOperationResult result = mActivity.downloadFile(remoteFile, temporalFolder);
+		assertTrue(result.isSuccess());
+	}
+	
+	/**
+	 * Test Download a File with special chars and chunks
+	 */
+	public void testDownloadFileSpecialCharsChunks() {
+		String temporalFolder = "/download" + mCurrentDate;
+		
+		RemoteFile remoteFile= new RemoteFile(mRemoteFileSpecialCharsChunks);
+
+		RemoteOperationResult result = mActivity.downloadFile(remoteFile, temporalFolder);
+		assertTrue(result.isSuccess());
+	}
+	
+	/**
+	 * Test Download a Not Found File 
+	 */
+	public void testDownloadFileNotFound() {
+		String temporalFolder = "/download" + mCurrentDate;
+
+		RemoteFile remoteFile = new RemoteFile(mRemoteFileNotFound);
+
+		RemoteOperationResult result = mActivity.downloadFile(remoteFile, temporalFolder);
+		assertFalse(result.isSuccess());
+	}
+}

+ 17 - 1
oc_framework-test-project/oc_framework-test-test/src/com/owncloud/android/oc_framework_test_project/test/ReadFolderTest.java

@@ -1,5 +1,21 @@
-package com.owncloud.android.oc_framework_test_project.test;
+/* ownCloud Android client application
+ *   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 version 2,
+ *   as published by the Free Software Foundation.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
 
+package com.owncloud.android.oc_framework_test_project.test;
 
 import com.owncloud.android.oc_framework.operations.RemoteOperationResult;
 import com.owncloud.android.oc_framework_test_project.TestActivity;

+ 17 - 0
oc_framework-test-project/oc_framework-test-test/src/com/owncloud/android/oc_framework_test_project/test/RenameFileTest.java

@@ -1,3 +1,20 @@
+/* ownCloud Android client application
+ *   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 version 2,
+ *   as published by the Free Software Foundation.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
 package com.owncloud.android.oc_framework_test_project.test;
 
 import com.owncloud.android.oc_framework.operations.RemoteOperationResult;

+ 161 - 0
oc_framework-test-project/oc_framework-test-test/src/com/owncloud/android/oc_framework_test_project/test/UploadFileTest.java

@@ -0,0 +1,161 @@
+/* ownCloud Android client application
+ *   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 version 2,
+ *   as published by the Free Software Foundation.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+package com.owncloud.android.oc_framework_test_project.test;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import android.content.res.AssetManager;
+import android.os.Environment;
+import android.test.ActivityInstrumentationTestCase2;
+import android.util.Log;
+
+import com.owncloud.android.oc_framework.operations.RemoteOperationResult;
+import com.owncloud.android.oc_framework_test_project.TestActivity;
+
+/**
+ * Class to test Update File Operation
+ * @author masensio
+ *
+ */
+
+public class UploadFileTest extends ActivityInstrumentationTestCase2<TestActivity> {
+
+	/* Files to upload. These files must exists on the device */	
+	private final String mFileToUpload = "fileToUpload.png";
+	private final String mMimeType = "image/png";
+	
+	private final String mFileToUploadWithChunks = "fileToUploadChunks.MP4";
+	private final String mMimeTypeWithChunks = "video/mp4";
+	
+	private final String mFileNotFound = "fileNotFound.png";
+	
+	private final String mStoragePath = "/owncloud/tmp/uploadTest";
+	private String mPath;
+	
+	private String mCurrentDate;
+	
+	private TestActivity mActivity;
+	
+	public UploadFileTest() {
+	    super(TestActivity.class);
+	   
+	}
+	
+	@Override
+	  protected void setUp() throws Exception {
+	    super.setUp();
+	    setActivityInitialTouchMode(false);
+	    mActivity = getActivity();
+	    
+	    SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd_HHmmss");
+	    mCurrentDate = sdf.format(new Date());
+	    
+	    File sdCard = Environment.getExternalStorageDirectory();
+        mPath =  sdCard.getAbsolutePath() + "/" + mStoragePath + mCurrentDate;
+        
+		//mActivity.createFolder(mPath, true);
+        
+	    copyAssets();
+	}
+
+	/**
+	 * Copy Files to ulpload to SdCard
+	 */
+	private void copyAssets() {
+		AssetManager assetManager = getActivity().getAssets();
+		String[] files = { mFileToUpload, mFileToUploadWithChunks }; 
+	    
+	    // Folder with contents
+        File folder = new File(mPath);
+        folder.mkdirs();
+        
+        
+	    for(String filename : files) {
+	        InputStream in = null;
+	        OutputStream out = null;
+	        try {
+	          in = assetManager.open(filename);
+	          File outFile = new File(folder, filename);
+	          out = new FileOutputStream(outFile);
+	          copyFile(in, out);
+	          in.close();
+	          in = null;
+	          out.flush();
+	          out.close();
+	          out = null;
+	        } catch(IOException e) {
+	            Log.e("tag", "Failed to copy asset file: " + filename, e);
+	        }       
+	    }
+	}
+	
+	private void copyFile(InputStream in, OutputStream out) throws IOException {
+	    byte[] buffer = new byte[1024];
+	    int read;
+	    while((read = in.read(buffer)) != -1){
+	      out.write(buffer, 0, read);
+	    }
+	}
+	
+	
+	/**
+	 * Test Upload File without chunks
+	 */
+	public void testUploadFile() {
+
+		String storagePath = mPath + "/" + mFileToUpload;
+		//String remotePath = "/uploadTest" + mCurrentDate + "/" + mFileToUpload;
+		String remotePath = "/" + mFileToUpload;
+		
+		RemoteOperationResult result = mActivity.uploadFile(storagePath, remotePath, mMimeType);
+		assertTrue(result.isSuccess());
+	}
+	
+	/**
+	 * Test Upload File with chunks
+	 */
+	public void testUploadFileWithChunks() {
+
+		String storagePath = mPath + "/" + mFileToUploadWithChunks;
+		//String remotePath = "/uploadTest" + mCurrentDate + "/" +mFileToUploadWithChunks;
+		String remotePath = "/" + mFileToUploadWithChunks;
+		
+		RemoteOperationResult result = mActivity.uploadFile(storagePath, remotePath, mMimeTypeWithChunks);
+		assertTrue(result.isSuccess());
+	}
+	
+	/**
+	 * Test Upload Not Found File
+	 */
+	public void testUploadFileNotFound() {
+
+		String storagePath = mPath + "/" + mFileNotFound;
+		//String remotePath = "/uploadTest" + mCurrentDate + "/" + mFileToUpload;
+		String remotePath = "/" + mFileNotFound;
+		
+		RemoteOperationResult result = mActivity.uploadFile(storagePath, remotePath, mMimeType);
+		assertFalse(result.isSuccess());
+	}
+	
+}

+ 65 - 0
oc_framework-test-project/src/com/owncloud/android/oc_framework_test_project/TestActivity.java

@@ -1,15 +1,39 @@
+/* ownCloud Android client application
+ *   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 version 2,
+ *   as published by the Free Software Foundation.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
 package com.owncloud.android.oc_framework_test_project;
 
+import java.io.File;
+
 import com.owncloud.android.oc_framework.network.webdav.OwnCloudClientFactory;
 import com.owncloud.android.oc_framework.network.webdav.WebdavClient;
+import com.owncloud.android.oc_framework.operations.RemoteFile;
 import com.owncloud.android.oc_framework.operations.RemoteOperationResult;
+import com.owncloud.android.oc_framework.operations.remote.ChunkedUploadRemoteFileOperation;
 import com.owncloud.android.oc_framework.operations.remote.CreateRemoteFolderOperation;
+import com.owncloud.android.oc_framework.operations.remote.DownloadRemoteFileOperation;
 import com.owncloud.android.oc_framework.operations.remote.ReadRemoteFolderOperation;
 import com.owncloud.android.oc_framework.operations.remote.RemoveRemoteFileOperation;
 import com.owncloud.android.oc_framework.operations.remote.RenameRemoteFileOperation;
+import com.owncloud.android.oc_framework.operations.remote.UploadRemoteFileOperation;
 
 import android.net.Uri;
 import android.os.Bundle;
+import android.os.Environment;
 import android.app.Activity;
 import android.view.Menu;
 
@@ -18,12 +42,14 @@ import android.view.Menu;
  * @author masensio
  * @author David A. Velasco
  */
+
 public class TestActivity extends Activity {
 	
 	// This account must exists on the simulator / device
 	private static final String mServerUri = "https://beta.owncloud.com/owncloud/remote.php/webdav";
 	private static final String mUser = "testandroid";
 	private static final String mPass = "testandroid";
+	private static final boolean mChunked = true;
 	
 	//private Account mAccount = null;
 	private WebdavClient mClient;
@@ -105,4 +131,43 @@ public class TestActivity extends Activity {
 		return result;
 	}
 	
+	/**
+	 * Access to the library method to Download a File
+	 * @param remotePath
+	 * 
+	 * @return
+	 */
+	public RemoteOperationResult downloadFile(RemoteFile remoteFile, String temporalFolder) {
+		// Create folder 
+		String path =  "/owncloud/tmp/" + temporalFolder;
+		File sdCard = Environment.getExternalStorageDirectory();
+		File folder = new File(sdCard.getAbsolutePath() + "/" + path);
+		folder.mkdirs();
+		
+		DownloadRemoteFileOperation downloadOperation = new DownloadRemoteFileOperation(remoteFile, folder.getAbsolutePath());
+		RemoteOperationResult result = downloadOperation.execute(mClient);
+
+		return result;
+	}
+	
+	/** Access to the library method to Upload a File 
+	 * @param storagePath
+	 * @param remotePath
+	 * @param mimeType
+	 * 
+	 * @return
+	 */
+	public RemoteOperationResult uploadFile(String storagePath, String remotePath, String mimeType) {
+
+		UploadRemoteFileOperation uploadOperation;
+		if ( mChunked && (new File(storagePath)).length() > ChunkedUploadRemoteFileOperation.CHUNK_SIZE ) {
+            uploadOperation = new ChunkedUploadRemoteFileOperation(storagePath, remotePath, mimeType);
+        } else {
+            uploadOperation = new UploadRemoteFileOperation(storagePath, remotePath, mimeType);
+        }
+		
+		RemoteOperationResult result = uploadOperation.execute(mClient);
+		
+		return result;
+	}
 }

+ 17 - 20
src/com/owncloud/android/operations/ChunkedUploadFileOperation.java → oc_framework/src/com/owncloud/android/oc_framework/operations/remote/ChunkedUploadRemoteFileOperation.java

@@ -16,7 +16,7 @@
  *
  */
 
-package com.owncloud.android.operations;
+package com.owncloud.android.oc_framework.operations.remote;
 
 import java.io.File;
 import java.io.IOException;
@@ -27,32 +27,25 @@ import java.util.Random;
 import org.apache.commons.httpclient.HttpException;
 import org.apache.commons.httpclient.methods.PutMethod;
 
-import com.owncloud.android.datamodel.OCFile;
 import com.owncloud.android.oc_framework.network.ProgressiveDataTransferer;
 import com.owncloud.android.oc_framework.network.webdav.ChunkFromFileChannelRequestEntity;
 import com.owncloud.android.oc_framework.network.webdav.WebdavClient;
 import com.owncloud.android.oc_framework.network.webdav.WebdavUtils;
-import com.owncloud.android.utils.Log_OC;
 
 
-import android.accounts.Account;
+import android.util.Log;
 
 
-public class ChunkedUploadFileOperation extends UploadFileOperation {
+public class ChunkedUploadRemoteFileOperation extends UploadRemoteFileOperation {
     
     public static final long CHUNK_SIZE = 1024000;
     private static final String OC_CHUNKED_HEADER = "OC-Chunked";
-    private static final String TAG = ChunkedUploadFileOperation.class.getSimpleName();
-
-    public ChunkedUploadFileOperation(  Account account,
-                                        OCFile file,
-                                        boolean isInstant, 
-                                        boolean forceOverwrite,
-                                        int localBehaviour) {
-        
-        super(account, file, isInstant, forceOverwrite, localBehaviour);
-    }
+    private static final String TAG = ChunkedUploadRemoteFileOperation.class.getSimpleName();
 
+    public ChunkedUploadRemoteFileOperation(String storagePath, String remotePath, String mimeType) {
+		 super(storagePath, remotePath, mimeType);	
+	}
+    
     @Override
     protected int uploadFile(WebdavClient client) throws HttpException, IOException {
         int status = -1;
@@ -60,13 +53,17 @@ public class ChunkedUploadFileOperation extends UploadFileOperation {
         FileChannel channel = null;
         RandomAccessFile raf = null;
         try {
-            File file = new File(getStoragePath());
+            File file = new File(mStoragePath);
             raf = new RandomAccessFile(file, "r");
             channel = raf.getChannel();
-            mEntity = new ChunkFromFileChannelRequestEntity(channel, getMimeType(), CHUNK_SIZE, file);
-            ((ProgressiveDataTransferer)mEntity).addDatatransferProgressListeners(getDataTransferListeners());
+            mEntity = new ChunkFromFileChannelRequestEntity(channel, mMimeType, CHUNK_SIZE, file);
+            //((ProgressiveDataTransferer)mEntity).addDatatransferProgressListeners(getDataTransferListeners());
+            synchronized (mDataTransferListeners) {
+				((ProgressiveDataTransferer)mEntity).addDatatransferProgressListeners(mDataTransferListeners);
+			}
+            
             long offset = 0;
-            String uriPrefix = client.getBaseUri() + WebdavUtils.encodePath(getRemotePath()) + "-chunking-" + Math.abs((new Random()).nextInt(9000)+1000) + "-" ;
+            String uriPrefix = client.getBaseUri() + WebdavUtils.encodePath(mRemotePath) + "-chunking-" + Math.abs((new Random()).nextInt(9000)+1000) + "-" ;
             long chunkCount = (long) Math.ceil((double)file.length() / CHUNK_SIZE);
             for (int chunkIndex = 0; chunkIndex < chunkCount ; chunkIndex++, offset += CHUNK_SIZE) {
                 if (mPutMethod != null) {
@@ -78,7 +75,7 @@ public class ChunkedUploadFileOperation extends UploadFileOperation {
                 mPutMethod.setRequestEntity(mEntity);
                 status = client.executeMethod(mPutMethod);
                 client.exhaustResponse(mPutMethod.getResponseBodyAsStream());
-                Log_OC.d(TAG, "Upload of " + getStoragePath() + " to " + getRemotePath() + ", chunk index " + chunkIndex + ", count " + chunkCount + ", HTTP result status " + status);
+                Log.d(TAG, "Upload of " + mStoragePath + " to " + mRemotePath + ", chunk index " + chunkIndex + ", count " + chunkCount + ", HTTP result status " + status);
                 if (!isSuccess(status))
                     break;
             }

+ 169 - 0
oc_framework/src/com/owncloud/android/oc_framework/operations/remote/DownloadRemoteFileOperation.java

@@ -0,0 +1,169 @@
+/* ownCloud Android client application
+ *   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 version 2,
+ *   as published by the Free Software Foundation.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+package com.owncloud.android.oc_framework.operations.remote;
+
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import org.apache.commons.httpclient.Header;
+import org.apache.commons.httpclient.HttpException;
+import org.apache.commons.httpclient.methods.GetMethod;
+import org.apache.http.HttpStatus;
+
+import android.util.Log;
+
+import com.owncloud.android.oc_framework.network.webdav.OnDatatransferProgressListener;
+import com.owncloud.android.oc_framework.network.webdav.WebdavClient;
+import com.owncloud.android.oc_framework.network.webdav.WebdavUtils;
+import com.owncloud.android.oc_framework.operations.OperationCancelledException;
+import com.owncloud.android.oc_framework.operations.RemoteFile;
+import com.owncloud.android.oc_framework.operations.RemoteOperation;
+import com.owncloud.android.oc_framework.operations.RemoteOperationResult;
+
+/**
+ * Remote operation performing the download of a remote file in the ownCloud server.
+ * 
+ * @author David A. Velasco
+ * @author masensio
+ */
+
+public class DownloadRemoteFileOperation extends RemoteOperation {
+	
+	private static final String TAG = DownloadRemoteFileOperation.class.getSimpleName();
+    
+	private Set<OnDatatransferProgressListener> mDataTransferListeners = new HashSet<OnDatatransferProgressListener>();
+    private final AtomicBoolean mCancellationRequested = new AtomicBoolean(false);
+    private long mModificationTimestamp = 0;
+    private GetMethod mGet;
+    
+    private RemoteFile mRemoteFile;
+    private String mTemporalFolder;
+	
+	public DownloadRemoteFileOperation(RemoteFile remoteFile, String temporalFolder) {
+		mRemoteFile = remoteFile;
+		mTemporalFolder = temporalFolder;
+	}
+
+	@Override
+	protected RemoteOperationResult run(WebdavClient client) {
+		RemoteOperationResult result = null;
+        
+        /// download will be performed to a temporal file, then moved to the final location
+        File tmpFile = new File(getTmpPath());
+        
+        /// perform the download
+        try {
+        	tmpFile.getParentFile().mkdirs();
+        	int status = downloadFile(client, tmpFile);
+        	result = new RemoteOperationResult(isSuccess(status), status, (mGet != null ? mGet.getResponseHeaders() : null));
+        	Log.i(TAG, "Download of " + mRemoteFile.getRemotePath() + " to " + getTmpPath() + ": " + result.getLogMessage());
+
+        } catch (Exception e) {
+            result = new RemoteOperationResult(e);
+            Log.e(TAG, "Download of " + mRemoteFile.getRemotePath() + " to " + getTmpPath() + ": " + result.getLogMessage(), e);
+        }
+        
+        return result;
+	}
+
+	
+    protected int downloadFile(WebdavClient client, File targetFile) throws HttpException, IOException, OperationCancelledException {
+        int status = -1;
+        boolean savedFile = false;
+        mGet = new GetMethod(client.getBaseUri() + WebdavUtils.encodePath(mRemoteFile.getRemotePath()));
+        Iterator<OnDatatransferProgressListener> it = null;
+        
+        FileOutputStream fos = null;
+        try {
+            status = client.executeMethod(mGet);
+            if (isSuccess(status)) {
+                targetFile.createNewFile();
+                BufferedInputStream bis = new BufferedInputStream(mGet.getResponseBodyAsStream());
+                fos = new FileOutputStream(targetFile);
+                long transferred = 0;
+
+                byte[] bytes = new byte[4096];
+                int readResult = 0;
+                while ((readResult = bis.read(bytes)) != -1) {
+                    synchronized(mCancellationRequested) {
+                        if (mCancellationRequested.get()) {
+                            mGet.abort();
+                            throw new OperationCancelledException();
+                        }
+                    }
+                    fos.write(bytes, 0, readResult);
+                    transferred += readResult;
+                    synchronized (mDataTransferListeners) {
+                        it = mDataTransferListeners.iterator();
+                        while (it.hasNext()) {
+                            it.next().onTransferProgress(readResult, transferred, mRemoteFile.getLength(), targetFile.getName());
+                        }
+                    }
+                }
+                savedFile = true;
+                Header modificationTime = mGet.getResponseHeader("Last-Modified");
+                if (modificationTime != null) {
+                    Date d = WebdavUtils.parseResponseDate((String) modificationTime.getValue());
+                    mModificationTimestamp = (d != null) ? d.getTime() : 0;
+                }
+                
+            } else {
+                client.exhaustResponse(mGet.getResponseBodyAsStream());
+            }
+                
+        } finally {
+            if (fos != null) fos.close();
+            if (!savedFile && targetFile.exists()) {
+                targetFile.delete();
+            }
+            mGet.releaseConnection();    // let the connection available for other methods
+        }
+        return status;
+    }
+    
+    private boolean isSuccess(int status) {
+        return (status == HttpStatus.SC_OK);
+    }
+    
+    private String getTmpPath() {
+        return mTemporalFolder + mRemoteFile.getRemotePath();
+    }
+    
+    public void addDatatransferProgressListener (OnDatatransferProgressListener listener) {
+        synchronized (mDataTransferListeners) {
+            mDataTransferListeners.add(listener);
+        }
+    }
+    
+    public void removeDatatransferProgressListener(OnDatatransferProgressListener listener) {
+        synchronized (mDataTransferListeners) {
+            mDataTransferListeners.remove(listener);
+        }
+    }
+    
+    public void cancel() {
+        mCancellationRequested.set(true);   // atomic set; there is no need of synchronizing it
+    }
+}

+ 7 - 7
src/com/owncloud/android/operations/ExistenceCheckOperation.java → oc_framework/src/com/owncloud/android/oc_framework/operations/remote/ExistenceCheckRemoteOperation.java

@@ -15,7 +15,7 @@
  *
  */
 
-package com.owncloud.android.operations;
+package com.owncloud.android.oc_framework.operations.remote;
 
 import org.apache.commons.httpclient.HttpStatus;
 import org.apache.commons.httpclient.methods.HeadMethod;
@@ -24,22 +24,22 @@ import com.owncloud.android.oc_framework.network.webdav.WebdavClient;
 import com.owncloud.android.oc_framework.operations.RemoteOperation;
 import com.owncloud.android.oc_framework.operations.RemoteOperationResult;
 import com.owncloud.android.oc_framework.network.webdav.WebdavUtils;
-import com.owncloud.android.utils.Log_OC;
 
 import android.content.Context;
 import android.net.ConnectivityManager;
+import android.util.Log;
 
 /**
  * Operation to check the existence or absence of a path in a remote server.
  * 
  * @author David A. Velasco
  */
-public class ExistenceCheckOperation extends RemoteOperation {
+public class ExistenceCheckRemoteOperation extends RemoteOperation {
     
     /** Maximum time to wait for a response from the server in MILLISECONDs.  */
     public static final int TIMEOUT = 10000;
     
-    private static final String TAG = ExistenceCheckOperation.class.getSimpleName();
+    private static final String TAG = ExistenceCheckRemoteOperation.class.getSimpleName();
     
     private String mPath;
     private Context mContext;
@@ -53,7 +53,7 @@ public class ExistenceCheckOperation extends RemoteOperation {
      * @param context           Android application context.
      * @param successIfAbsent   When 'true', the operation finishes in success if the path does NOT exist in the remote server (HTTP 404).
      */
-    public ExistenceCheckOperation(String path, Context context, boolean successIfAbsent) {
+    public ExistenceCheckRemoteOperation(String path, Context context, boolean successIfAbsent) {
         mPath = (path != null) ? path : "";
         mContext = context;
         mSuccessIfAbsent = successIfAbsent;
@@ -73,11 +73,11 @@ public class ExistenceCheckOperation extends RemoteOperation {
             client.exhaustResponse(head.getResponseBodyAsStream());
             boolean success = (status == HttpStatus.SC_OK && !mSuccessIfAbsent) || (status == HttpStatus.SC_NOT_FOUND && mSuccessIfAbsent);
             result = new RemoteOperationResult(success, status, head.getResponseHeaders());
-            Log_OC.d(TAG, "Existence check for " + client.getBaseUri() + WebdavUtils.encodePath(mPath) + " targeting for " + (mSuccessIfAbsent ? " absence " : " existence ") + "finished with HTTP status " + status + (!success?"(FAIL)":""));
+            Log.d(TAG, "Existence check for " + client.getBaseUri() + WebdavUtils.encodePath(mPath) + " targeting for " + (mSuccessIfAbsent ? " absence " : " existence ") + "finished with HTTP status " + status + (!success?"(FAIL)":""));
             
         } catch (Exception e) {
             result = new RemoteOperationResult(e);
-            Log_OC.e(TAG, "Existence check for " + client.getBaseUri() + WebdavUtils.encodePath(mPath) + " targeting for " + (mSuccessIfAbsent ? " absence " : " existence ") + ": " + result.getLogMessage(), result.getException());
+            Log.e(TAG, "Existence check for " + client.getBaseUri() + WebdavUtils.encodePath(mPath) + " targeting for " + (mSuccessIfAbsent ? " absence " : " existence ") + ": " + result.getLogMessage(), result.getException());
             
         } finally {
             if (head != null)

+ 147 - 0
oc_framework/src/com/owncloud/android/oc_framework/operations/remote/UploadRemoteFileOperation.java

@@ -0,0 +1,147 @@
+/* ownCloud Android client application
+ *   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 version 2,
+ *   as published by the Free Software Foundation.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+package com.owncloud.android.oc_framework.operations.remote;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import org.apache.commons.httpclient.HttpException;
+import org.apache.commons.httpclient.methods.PutMethod;
+import org.apache.commons.httpclient.methods.RequestEntity;
+import org.apache.http.HttpStatus;
+
+import com.owncloud.android.oc_framework.network.ProgressiveDataTransferer;
+import com.owncloud.android.oc_framework.network.webdav.FileRequestEntity;
+import com.owncloud.android.oc_framework.network.webdav.OnDatatransferProgressListener;
+import com.owncloud.android.oc_framework.network.webdav.WebdavClient;
+import com.owncloud.android.oc_framework.network.webdav.WebdavUtils;
+import com.owncloud.android.oc_framework.operations.OperationCancelledException;
+import com.owncloud.android.oc_framework.operations.RemoteOperation;
+import com.owncloud.android.oc_framework.operations.RemoteOperationResult;
+
+/**
+ * Remote operation performing the upload of a remote file to the ownCloud server.
+ * 
+ * @author David A. Velasco
+ * @author masensio
+ */
+
+public class UploadRemoteFileOperation extends RemoteOperation {
+
+
+	protected String mStoragePath;
+	protected String mRemotePath;
+	protected String mMimeType;
+	protected PutMethod mPutMethod = null;
+	
+	private final AtomicBoolean mCancellationRequested = new AtomicBoolean(false);
+	protected Set<OnDatatransferProgressListener> mDataTransferListeners = new HashSet<OnDatatransferProgressListener>();
+
+	protected RequestEntity mEntity = null;
+
+	public UploadRemoteFileOperation(String storagePath, String remotePath, String mimeType) {
+		mStoragePath = storagePath;
+		mRemotePath = remotePath;
+		mMimeType = mimeType;	
+	}
+
+	@Override
+	protected RemoteOperationResult run(WebdavClient client) {
+		RemoteOperationResult result = null;
+
+		try {
+			// / perform the upload
+			synchronized (mCancellationRequested) {
+				if (mCancellationRequested.get()) {
+					throw new OperationCancelledException();
+				} else {
+					mPutMethod = new PutMethod(client.getBaseUri() + WebdavUtils.encodePath(mRemotePath));
+				}
+			}
+
+			int status = uploadFile(client);
+
+			result  = new RemoteOperationResult(isSuccess(status), status, (mPutMethod != null ? mPutMethod.getResponseHeaders() : null));
+
+		} catch (Exception e) {
+			// TODO something cleaner with cancellations
+			if (mCancellationRequested.get()) {
+				result = new RemoteOperationResult(new OperationCancelledException());
+			} else {
+				result = new RemoteOperationResult(e);
+			}
+		}
+		return result;
+	}
+
+	public boolean isSuccess(int status) {
+		return ((status == HttpStatus.SC_OK || status == HttpStatus.SC_CREATED || status == HttpStatus.SC_NO_CONTENT));
+	}
+
+	protected int uploadFile(WebdavClient client) throws HttpException, IOException, OperationCancelledException {
+		int status = -1;
+		try {
+			File f = new File(mStoragePath);
+			mEntity  = new FileRequestEntity(f, mMimeType);
+			synchronized (mDataTransferListeners) {
+				((ProgressiveDataTransferer)mEntity).addDatatransferProgressListeners(mDataTransferListeners);
+			}
+			mPutMethod.setRequestEntity(mEntity);
+			status = client.executeMethod(mPutMethod);
+			client.exhaustResponse(mPutMethod.getResponseBodyAsStream());
+
+		} finally {
+			mPutMethod.releaseConnection(); // let the connection available for other methods
+		}
+		return status;
+	}
+	
+    public Set<OnDatatransferProgressListener> getDataTransferListeners() {
+        return mDataTransferListeners;
+    }
+    
+    public void addDatatransferProgressListener (OnDatatransferProgressListener listener) {
+        synchronized (mDataTransferListeners) {
+            mDataTransferListeners.add(listener);
+        }
+        if (mEntity != null) {
+            ((ProgressiveDataTransferer)mEntity).addDatatransferProgressListener(listener);
+        }
+    }
+    
+    public void removeDatatransferProgressListener(OnDatatransferProgressListener listener) {
+        synchronized (mDataTransferListeners) {
+            mDataTransferListeners.remove(listener);
+        }
+        if (mEntity != null) {
+            ((ProgressiveDataTransferer)mEntity).removeDatatransferProgressListener(listener);
+        }
+    }
+    
+    public void cancel() {
+        synchronized (mCancellationRequested) {
+            mCancellationRequested.set(true);
+            if (mPutMethod != null)
+                mPutMethod.abort();
+        }
+    }
+
+}

+ 2 - 0
res/values-ak/strings.xml

@@ -0,0 +1,2 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<resources/>

+ 24 - 0
res/values-ar/strings.xml

@@ -7,6 +7,7 @@
   <string name="actionbar_upload_files">الملفات</string>
   <string name="actionbar_mkdir">إنشاء دليل</string>
   <string name="actionbar_settings">تعديلات</string>
+  <string name="actionbar_see_details">تفاصيل</string>
   <string name="prefs_category_general">عام</string>
   <string name="prefs_category_more">المزيد</string>
   <string name="prefs_accounts">حسابات</string>
@@ -31,19 +32,23 @@
   <string name="filedetails_type">النوع</string>
   <string name="filedetails_modified">عُدل</string>
   <string name="filedetails_download">انزال</string>
+  <string name="filedetails_sync_file">تحديث ملف</string>
   <string name="filedetails_renamed_in_upload_msg">تم تغيير اسم الملف إلى  %1$s أثناء الرفع</string>
   <string name="common_yes">نعم</string>
   <string name="common_no">لا</string>
   <string name="common_ok">تم</string>
+  <string name="common_cancel_download">إلغاء تحميل</string>
   <string name="common_cancel_upload">إلغاء رفع الملفات</string>
   <string name="common_cancel">الغاء</string>
   <string name="common_error">خطأ</string>
+  <string name="common_loading">تحميل ...</string>
   <string name="common_error_unknown">حدث خطأ غير معروف. </string>
   <string name="about_title">حول</string>
   <string name="change_password">عدل كلمة السر</string>
   <string name="delete_account">حذف الحساب</string>
   <string name="create_account">حساب جديد</string>
   <string name="upload_chooser_title">رفع من</string>
+  <string name="uploader_info_dirname">اسم المسار</string>
   <string name="uploader_upload_in_progress_ticker">يتم الرفع</string>
   <string name="uploader_upload_in_progress_content">%1$d%% رفع %2$s</string>
   <string name="uploader_upload_succeeded_ticker">تم الرفع بنجاح</string>
@@ -55,6 +60,7 @@
   <string name="downloader_download_succeeded_content">تم تحميل %1$s  بنجاح </string>
   <string name="downloader_download_failed_ticker">فشل التحميل</string>
   <string name="downloader_download_failed_content"> تحميل %1$s قد لا يكون كاملاَ</string>
+  <string name="downloader_not_downloaded_yet">لم يتم تحميلها بعد</string>
   <string name="common_choose_account">اختر حساب</string>
   <string name="sync_fail_content">تعذر إكمال التزامن لـ %1$s  </string>
   <string name="sync_fail_content_unauthorized">كلمة السر غير صالحة لـ %1$s</string>
@@ -78,9 +84,27 @@
   <string name="common_remove">الغى</string>
   <string name="confirmation_remove_alert">هل تود حقاَ إزالة %1$s ؟ </string>
   <string name="confirmation_remove_folder_alert">هل ترغب في إزالة %1$s و جهات الاتصال التابعة له؟ </string>
+  <string name="confirmation_remove_folder_local">المحتويات المحلية فقط</string>
   <string name="confirmation_remove_remote">حذف من الخادم</string>
   <string name="remove_success_msg">يتم الحذف بنجاح</string>
   <string name="remove_fail_msg">لقد فشل الحذف</string>
+  <string name="rename_dialog_title">أدخل اسما جديدا</string>
   <string name="wait_a_moment">فضلاً, انتظر</string>
   <string name="filedisplay_no_file_selected">لم يتم اختيار أي ملف</string>
+  <string name="ssl_validator_btn_details_see">تفاصيل</string>
+  <string name="ssl_validator_btn_details_hide">إخفاء</string>
+  <string name="ssl_validator_label_CN">الاسم الشائع:</string>
+  <string name="ssl_validator_label_O">منظمة:</string>
+  <string name="ssl_validator_label_OU">الوحدة التنظيمية:</string>
+  <string name="ssl_validator_label_C">البلد:</string>
+  <string name="ssl_validator_label_L">المكان:</string>
+  <string name="ssl_validator_label_validity_from">من:</string>
+  <string name="ssl_validator_label_validity_to">إلى:</string>
+  <string name="ssl_validator_label_signature">التوقيع:</string>
+  <string name="ssl_validator_label_signature_algorithm">الخوارزمية:</string>
+  <string name="placeholder_filesize">389 KB</string>
+  <string name="placeholder_media_time">12:23:45</string>
+  <string name="preview_image_description">معاينة الصورة</string>
+  <string name="preview_image_error_unknown_format">هذه الصورة لا يمكن أن تظهر</string>
+  <string name="failed_upload_all_cb">تحديد الكل</string>
 </resources>

+ 6 - 1
res/values-be/strings.xml

@@ -1,2 +1,7 @@
 <?xml version='1.0' encoding='UTF-8'?>
-<resources/>
+<resources>
+  <string name="actionbar_settings">Налады</string>
+  <string name="common_yes">Так</string>
+  <string name="common_no">Не</string>
+  <string name="common_error">Памылка</string>
+</resources>

+ 1 - 0
res/values-ca/strings.xml

@@ -30,6 +30,7 @@
   <string name="recommend_subject">Proveu %1$s a un telèfon avançat!</string>
   <string name="recommend_text">Vull convidar-te a usar l\'aplicació %1$s al teu telèfon avançat!\nBaixa\'l aquí: %2$s</string>
   <string name="auth_check_server">Comprova el servidor</string>
+  <string name="auth_host_url">Adreça del servidor https://…</string>
   <string name="auth_username">Nom d\'usuari</string>
   <string name="auth_password">Contrasenya</string>
   <string name="auth_register">Nou a %1$s?</string>

+ 1 - 0
res/values-cs-rCZ/strings.xml

@@ -30,6 +30,7 @@
   <string name="recommend_subject">Zkuste %1$s na vašem smartphonu!</string>
   <string name="recommend_text">Chtěl bych vás pozvat k používání %1$s na vašem smartphonu.\nKe stažení zde:  %2$s</string>
   <string name="auth_check_server">Zkontrolovat server</string>
+  <string name="auth_host_url">Adresa serveru https://...</string>
   <string name="auth_username">Uživatelské jméno</string>
   <string name="auth_password">Heslo</string>
   <string name="auth_register">Nováček s %1$s?</string>

+ 15 - 0
res/values-da/strings.xml

@@ -24,8 +24,13 @@
   <string name="prefs_log_summary_history">Dette viser de optagne logger</string>
   <string name="prefs_log_delete_history_button">Slet Historik</string>
   <string name="prefs_help">Hjælp</string>
+  <string name="prefs_recommend">Anbefal til en ven</string>
+  <string name="prefs_feedback">Feedback</string>
   <string name="prefs_imprint">Imprint</string>
+  <string name="recommend_subject">Prøv %1$s på din smartphone!</string>
+  <string name="recommend_text">Jeg ønsker at invitere dig til at bruge %1$s på din smartphone!\nHent den her: %2$s</string>
   <string name="auth_check_server">Check Server</string>
+  <string name="auth_host_url">Server addresse https://…</string>
   <string name="auth_username">Brugernavn</string>
   <string name="auth_password">Kodeord</string>
   <string name="auth_register">Uvant med %1$s</string>
@@ -90,6 +95,7 @@
   <string name="sync_foreign_files_forgotten_ticker">Visse lokale filer blev glemt</string>
   <string name="sync_foreign_files_forgotten_content">%1$d filer ud af %2$s mappe kunne ikke kopieres ind i</string>
   <string name="sync_foreign_files_forgotten_explanation">Fra version 1.3.16 bliver filer uploadet fra denne enhed kopieret til mappen %1$s for at forhindre datatab når en enkelt fil synkroniseres med flere konti.\n\nPå grund af denne ændring blev alle filer uploadet i tidligere versioner af denne app kopieret til mappen %2$s. Imidlertid forhindrede en fejl færdiggørelsen af denne operation under konto-synkronisering. Du kan enten lade filerne være som de er og fjerne linket til %3$s eller flytte filerne til mappen %1$s og beholde linket til %4$s.\n\nHerunder er en liste med de lokale filer og de eksterne filer i %5$s, som de var knyttet til.</string>
+  <string name="sync_current_folder_was_removed">Mappen %1$s eksistere ikke længere</string>
   <string name="foreign_files_move">Flyt alle</string>
   <string name="foreign_files_success">Alle filer blev flyttet</string>
   <string name="foreign_files_fail">Visse filer kunne ikke flyttes</string>
@@ -129,12 +135,14 @@
   <string name="auth_connection_established">Forbindelse oprettet</string>
   <string name="auth_testing_connection">Afprøver forbindelse ...</string>
   <string name="auth_not_configured_title">Misdannet server konfiguration</string>
+  <string name="auth_account_not_new">En konto for den samme bruger og server eksisterer allerede på enheden</string>
   <string name="auth_unknown_error_title">Ukendt fejl opstod!</string>
   <string name="auth_unknown_host_title">Kunne ikke finde host</string>
   <string name="auth_incorrect_path_title">Server instans blev ikke fundet</string>
   <string name="auth_timeout_title">Serveren var for længe om at svare</string>
   <string name="auth_incorrect_address_title">Deform URL</string>
   <string name="auth_ssl_general_error_title">SSL initialisering fejlede</string>
+  <string name="auth_ssl_unverified_server_title">Kunne ikke bekræfte SSl-serverens identitet</string>
   <string name="auth_bad_oc_version_title">Ikke genkendt server version</string>
   <string name="auth_wrong_connection_title">Ikke ikke oprette forbindelse</string>
   <string name="auth_secure_connection">Sikker forbindelse oprettet</string>
@@ -142,7 +150,12 @@
   <string name="auth_oauth_error">Mislykket godkendelse</string>
   <string name="auth_oauth_error_access_denied">Adgang afvist af autorisationsserver</string>
   <string name="auth_wtf_reenter_URL">Uventet tilstand; angiv server-URL\'en igen</string>
+  <string name="auth_expired_oauth_token_toast">Din godkendelse udløb. Gentag godkendelse</string>
   <string name="auth_expired_basic_auth_toast">Indtast venligst dit nuværende kodeord</string>
+  <string name="auth_expired_saml_sso_token_toast">Din session udløb. Forbind venligst igen</string>
+  <string name="auth_connecting_auth_server">Forbinder til godkendelsesserver ...</string>
+  <string name="auth_unsupported_auth_method">Serveren understøtter ikke denne godkendelsesmetode</string>
+  <string name="auth_unsupported_multiaccount">%1$s understøtter ikke multiple konti</string>
   <string name="fd_keep_in_sync">Hold fil opdateret</string>
   <string name="common_rename">Omdøb</string>
   <string name="common_remove">Fjern</string>
@@ -160,9 +173,11 @@
   <string name="sync_file_fail_msg">Ekstern fil kunne ikke kontrolleres</string>
   <string name="sync_file_nothing_to_do_msg">Filindholdet allerede synkroniseret</string>
   <string name="create_dir_fail_msg">Mappe kunne ikke oprettes</string>
+  <string name="filename_forbidden_characters">Ugyldige tegn: / \\ &lt; &gt; : \" | ? *</string>
   <string name="wait_a_moment">Vent et øjeblik</string>
   <string name="filedisplay_unexpected_bad_get_content">Uforventet problem; prøv venligst anden applikation til at vælge filen</string>
   <string name="filedisplay_no_file_selected">Ingen fil blev valgt</string>
+  <string name="oauth_check_onoff">Log på med oAuth2</string>
   <string name="oauth_login_connection">Forbinder til oAuth2 server...</string>
   <string name="ssl_validator_header">Sidens identitet kunne ikke verificeres</string>
   <string name="ssl_validator_reason_cert_not_trusted">- Serverens certifikat er ikke troværdigt</string>

+ 1 - 0
res/values-de-rDE/strings.xml

@@ -30,6 +30,7 @@
   <string name="recommend_subject">Probieren Sie %1$s auf Ihrem Smartphone!</string>
   <string name="recommend_text">Ich möchte Sie zum Benutzen von %1$s auf Ihrem Smartphone einladen!\nLaden Sie es hier herunter: %2$s</string>
   <string name="auth_check_server">Server überprüfen</string>
+  <string name="auth_host_url">Server-Adresse https://…</string>
   <string name="auth_username">Benutzername</string>
   <string name="auth_password">Passwort</string>
   <string name="auth_register">Ist %1$s neu für Sie?</string>

+ 1 - 0
res/values-de/strings.xml

@@ -30,6 +30,7 @@
   <string name="recommend_subject">Probiere %1$s auf Deinem Smartphone!</string>
   <string name="recommend_text">Ich möchte Dich zu %1$s für Dein Smartphone einladen!\nLade es hier herunter: %2$s</string>
   <string name="auth_check_server">Überprüfe den Server</string>
+  <string name="auth_host_url">Server-Adresse https://…</string>
   <string name="auth_username">Benutzername</string>
   <string name="auth_password">Passwort</string>
   <string name="auth_register">Ist %1$s neu für dich?</string>

+ 14 - 0
res/values-el/strings.xml

@@ -30,8 +30,10 @@
   <string name="recommend_subject">Δοκιμάστε %1$s στο κινητό σας!</string>
   <string name="recommend_text">Θέλω να σας προσκαλέσω να χρησιμοποιήσετε το %1$s στο κινητό σας!\nΚατεβάστε το εδώ: %2$s</string>
   <string name="auth_check_server">Έλεγχος Διακομιστή</string>
+  <string name="auth_host_url">Διεύθυνση εξυπηρέτη https://…</string>
   <string name="auth_username">Όνομα χρήστη</string>
   <string name="auth_password">Συνθηματικό</string>
+  <string name="auth_register">Νέος στο %1$s;</string>
   <string name="sync_string_files">Αρχεία</string>
   <string name="setup_btn_connect">Σύνδεση</string>
   <string name="uploader_btn_upload_text">Μεταφόρτωση</string>
@@ -109,6 +111,10 @@
   <string name="pincode_wrong">Εσφαλμένο PIN της εφαρμογής</string>
   <string name="pincode_removed">Αφαιρέθηκε το PIN της εφαρμογής</string>
   <string name="pincode_stored">Το PIN της εφαρμογής αποθηκεύτηκε</string>
+  <string name="media_notif_ticker">%1$s αναπαραγωγή μουσικής</string>
+  <string name="media_state_playing">%1$s (αναπαραγωγή)</string>
+  <string name="media_state_loading">%1$s (φόρτωση)</string>
+  <string name="media_event_done">%1$s αναπαραγωγή τελείωσε</string>
   <string name="media_err_nothing_to_play">Δεν βρέθηκε αρχείο πολυμέσων</string>
   <string name="media_err_no_account">Δεν δόθηκε λογαριασμός</string>
   <string name="media_err_not_in_owncloud">Το αρχείο δεν βρίσκεται σε έγκυρο λογαριασμό</string>
@@ -118,7 +124,12 @@
   <string name="media_err_timeout">Λήξη χρόνου κατά την προσπάθεια αναπαραγωγής</string>
   <string name="media_err_invalid_progressive_playback">Το αρχείο πολυμέσων δεν μπορεί να μεταδοθεί</string>
   <string name="media_err_unknown">Το αρχείο πολυμέσων δεν μπορεί να αναπαραχθεί με την παρεχόμενη εφαρμογή αναπαραγωγής πολυμέσων</string>
+  <string name="media_err_security_ex">Σφάλμα ασφαλείας κατά την προσπάθεια αναπαραγωγής του %1$s</string>
+  <string name="media_err_io_ex">Σφάλμα εισόδου κατά την προσπάθεια αναπαραγωγής του %1$s</string>
+  <string name="media_err_unexpected">Απροσδόκτο σφάλμα κατά την προσπάθεια αναπαραγωγής του %1$s</string>
+  <string name="media_rewind_description">Κουμπί επαναφοράς</string>
   <string name="media_play_pause_description">Κουμπί αναπαραγωγής ή παύσης</string>
+  <string name="media_forward_description">Κουμπί προώθησης</string>
   <string name="auth_trying_to_login">Προσπάθεια σύνδεσης...</string>
   <string name="auth_no_net_conn_title">Δεν υπάρχει σύνδεση στο δίκτυο</string>
   <string name="auth_nossl_plain_ok_title">Μη διαθέσιμη ασφαλής σύνδεση.</string>
@@ -208,6 +219,9 @@
   <string name="preview_image_description">Προεπισκόπηση εικόνας</string>
   <string name="preview_image_error_unknown_format">Αυτή η εικόνε δεν μπόρεσε να προβληθεί</string>
   <string name="error__upload__local_file_not_copied">%1$s δεν μπορεσε να αντιγραφθεί στον %2$s τοπικο καταλόγο </string>
+  <string name="actionbar_failed_instant_upload">Αποτυχημένη στιγμιαία φόρτωση</string>
+  <string name="failed_upload_headline_text">Αποτυχημένες στιγμιαίες φορτώσεις</string>
+  <string name="failed_upload_headline_hint">Σύνοψη όλων των αποτυχημένων φορτώσεων</string>
   <string name="failed_upload_all_cb">επιλογή όλων</string>
   <string name="failed_upload_headline_retryall_btn">επανάληψη για όλα τα επιλεγμένα</string>
   <string name="failed_upload_headline_delete_all_btn">διαγραφή όλων των επιλεγμένων από τη λίστα προς μεταφόρτωση</string>

+ 1 - 0
res/values-en-rGB/strings.xml

@@ -30,6 +30,7 @@
   <string name="recommend_subject">Try %1$s on your smartphone!</string>
   <string name="recommend_text">I want to invite you to use %1$s on your smartphone!\nDownload here: %2$s</string>
   <string name="auth_check_server">Check Server</string>
+  <string name="auth_host_url">Server address https://…</string>
   <string name="auth_username">Username</string>
   <string name="auth_password">Password</string>
   <string name="auth_register">New to %1$s?</string>

+ 15 - 0
res/values-es-rCL/strings.xml

@@ -0,0 +1,15 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<resources>
+  <string name="actionbar_upload">Subir</string>
+  <string name="actionbar_upload_files">Archivos</string>
+  <string name="actionbar_mkdir">Crear directorio</string>
+  <string name="actionbar_settings">Configuración</string>
+  <string name="prefs_category_general">General</string>
+  <string name="prefs_accounts">Cuentas</string>
+  <string name="auth_username">Usuario</string>
+  <string name="auth_password">Clave</string>
+  <string name="sync_string_files">Archivos</string>
+  <string name="setup_btn_connect">Conectar</string>
+  <string name="uploader_btn_upload_text">Subir</string>
+  <string name="uploader_wrn_no_account_title">No se encuentra la cuenta</string>
+</resources>

+ 232 - 1
res/values-es-rMX/strings.xml

@@ -1,2 +1,233 @@
 <?xml version='1.0' encoding='UTF-8'?>
-<resources/>
+<resources>
+  <string name="about_android">App Android %1$s</string>
+  <string name="about_version">versión %1$s</string>
+  <string name="actionbar_sync">Actualizar cuenta</string>
+  <string name="actionbar_upload">Subir archivo</string>
+  <string name="actionbar_upload_from_apps">Contenido de otras aplicaciones</string>
+  <string name="actionbar_upload_files">Archivos</string>
+  <string name="actionbar_open_with">Abrir con</string>
+  <string name="actionbar_mkdir">Crear directorio</string>
+  <string name="actionbar_settings">Ajustes</string>
+  <string name="actionbar_see_details">Detalles</string>
+  <string name="prefs_category_general">General</string>
+  <string name="prefs_category_more">Más</string>
+  <string name="prefs_accounts">Cuentas</string>
+  <string name="prefs_manage_accounts">Gestionar cuentas</string>
+  <string name="prefs_pincode">PIN de aplicación </string>
+  <string name="prefs_pincode_summary">Proteja su cliente</string>
+  <string name="prefs_instant_upload">Habilita la subida instantánea</string>
+  <string name="prefs_instant_upload_summary">Subir instantáneamente las fotos tomadas por la cámara</string>
+  <string name="prefs_log_title">Habilitar registro</string>
+  <string name="prefs_log_summary">Esto es usado para registrar problemas</string>
+  <string name="prefs_log_title_history">Historia del Registro</string>
+  <string name="prefs_log_summary_history">Esto muestra los registros grabados</string>
+  <string name="prefs_log_delete_history_button">Eliminar Historial</string>
+  <string name="prefs_help">Ayuda</string>
+  <string name="prefs_recommend">Recomendar a un amigo</string>
+  <string name="prefs_feedback">Mensajes de retroalimentación</string>
+  <string name="prefs_imprint">Imprint</string>
+  <string name="recommend_subject">Prueba  %1$s en tu smarthphone!</string>
+  <string name="recommend_text">Quiero invitarte a usar %1$s en tu smarthphone!⏎\nDescargalo aquí: %2$s</string>
+  <string name="auth_check_server">Compruebe el servidor.</string>
+  <string name="auth_host_url">Dirección del servidor https://…</string>
+  <string name="auth_username">Nombre de usuario</string>
+  <string name="auth_password">Contraseña</string>
+  <string name="auth_register">New to %1$s?</string>
+  <string name="sync_string_files">Archivos</string>
+  <string name="setup_btn_connect">Conectar</string>
+  <string name="uploader_btn_upload_text">Subir</string>
+  <string name="uploader_top_message">Escoja el directorio de carga:</string>
+  <string name="uploader_wrn_no_account_title">No se encontraron cuentas</string>
+  <string name="uploader_wrn_no_account_text">No hay cuentas de %1$s en tu dispositivo. Por favor configura una cuenta primero.</string>
+  <string name="uploader_wrn_no_account_setup_btn_text">Configuración</string>
+  <string name="uploader_wrn_no_account_quit_btn_text">Salir</string>
+  <string name="uploader_wrn_no_content_title">No hay contenido para subir</string>
+  <string name="uploader_wrn_no_content_text">Ningún contenido ha sido recibido. No hay nada que subir.</string>
+  <string name="uploader_error_forbidden_content">%1$s no está autorizado para acceder al contenido compartido</string>
+  <string name="uploader_info_uploading">Enviando</string>
+  <string name="file_list_empty">No hay archivos en esta carpeta.\nPuedes añadir nuevos archivos con la opción \"Subir\" del menú.</string>
+  <string name="filedetails_select_file">Pulsa sobre un archivo para mostrar información adicional.</string>
+  <string name="filedetails_size">Tamaño:</string>
+  <string name="filedetails_type">Tipo:</string>
+  <string name="filedetails_created">Creado:</string>
+  <string name="filedetails_modified">Modificado:</string>
+  <string name="filedetails_download">Descargar</string>
+  <string name="filedetails_sync_file">Actualizar archivo</string>
+  <string name="filedetails_renamed_in_upload_msg">El archivo fue renombrado como %1$s durante la subida</string>
+  <string name="common_yes">Sí</string>
+  <string name="common_no">No</string>
+  <string name="common_ok">Aceptar</string>
+  <string name="common_cancel_download">Cancelar descarga</string>
+  <string name="common_cancel_upload">Cancelar subida</string>
+  <string name="common_cancel">Cancelar</string>
+  <string name="common_save_exit">Guardar &amp; Salir</string>
+  <string name="common_error">Error</string>
+  <string name="common_loading">Cargando ...</string>
+  <string name="common_error_unknown">Error desconocido</string>
+  <string name="about_title">Acerca de</string>
+  <string name="change_password">Cambiar contraseña</string>
+  <string name="delete_account">Eliminar cuenta</string>
+  <string name="create_account">Crear cuenta</string>
+  <string name="upload_chooser_title">Subir</string>
+  <string name="uploader_info_dirname">Nombre de directorio</string>
+  <string name="uploader_upload_in_progress_ticker">Subiendo...</string>
+  <string name="uploader_upload_in_progress_content">%1$d%% Subiendo %2$s</string>
+  <string name="uploader_upload_succeeded_ticker">Subido con éxito</string>
+  <string name="uploader_upload_succeeded_content_single">%1$s se ha subido con éxito</string>
+  <string name="uploader_upload_failed_ticker">Error en la subida</string>
+  <string name="uploader_upload_failed_content_single">La subida de %1$s no se pudo completar</string>
+  <string name="downloader_download_in_progress_ticker">Descargando ...</string>
+  <string name="downloader_download_in_progress_content">%1$s Descargada de %2$s</string>
+  <string name="downloader_download_succeeded_ticker">Descarga completa</string>
+  <string name="downloader_download_succeeded_content">%1$s se ha descargado con éxito</string>
+  <string name="downloader_download_failed_ticker">Falló la descarga</string>
+  <string name="downloader_download_failed_content">La descarga de %1$s no se pudo completar</string>
+  <string name="downloader_not_downloaded_yet">No descargado</string>
+  <string name="common_choose_account">Elige una cuenta</string>
+  <string name="sync_fail_ticker">Falló la sincronización</string>
+  <string name="sync_fail_content">La sincronización de %1$s s no se pudo completar</string>
+  <string name="sync_fail_content_unauthorized">Contraseña no válida para %1$s</string>
+  <string name="sync_conflicts_in_favourites_ticker">Se encontraron conflictos</string>
+  <string name="sync_conflicts_in_favourites_content">Falló la sincronización de contenidos de %1$d archivos</string>
+  <string name="sync_fail_in_favourites_ticker">Fallos en la sincronización de contenidos</string>
+  <string name="sync_fail_in_favourites_content">Los contenidos de %1$d archivos no fueron sincronizados (%2$d conflictos)</string>
+  <string name="sync_foreign_files_forgotten_ticker">Algunos archivos locales se han perdido</string>
+  <string name="sync_foreign_files_forgotten_content">%1$d archivos de %2$s no han podido ser copiados</string>
+  <string name="sync_foreign_files_forgotten_explanation">Como versión 1.3.16, los archivos subidos desde este dispositivo son copiados a un archivo %1$s local para prevenir perdida de datos cuando un simple archivo es sincronizado con multiples cuentas.\n\nDebido a este cambio, todos los archivos subidos en versiones previas de esta aplicación han sido copiados a la carpeta %2$s. No obtante, un error previno el completado de esta operación durante la sincronización de cuenta. Debería dejar el o los archivos así y eliminar el enlace a %3$s o mover el o los archivos al %1$s directorio y conservar el enlace a %4$s.\n\nListado abajo tiene los enlaces a los archivos locales y archivos remotos en %5$s </string>
+  <string name="sync_current_folder_was_removed">La carpeta local %1$s no existe.</string>
+  <string name="foreign_files_move">Mover todo</string>
+  <string name="foreign_files_success">Todos los archivos fueron movidos</string>
+  <string name="foreign_files_fail">Algunos archivos no han podido ser movidos</string>
+  <string name="foreign_files_local_text">Local: %1$s</string>
+  <string name="foreign_files_remote_text">Remoto: %1$s</string>
+  <string name="upload_query_move_foreign_files">No hay suficiente espacio para copiar los archivos seleccionados en la carpeta %1$s. ¿Quiere moverlos en lugar de copiarlos?</string>
+  <string name="pincode_enter_pin_code">Por favor, inserta tu PIN de aplicación</string>
+  <string name="pincode_configure_your_pin">Introduzca un PIN para la aplicación</string>
+  <string name="pincode_configure_your_pin_explanation">Se solicitará el PIN cada vez que se inicie la aplicación</string>
+  <string name="pincode_reenter_your_pincode">Repita el PIN para la aplicación, por favor</string>
+  <string name="pincode_remove_your_pincode">Borre su PIN de aplicación</string>
+  <string name="pincode_mismatch">Los PIN introducidos no son iguales</string>
+  <string name="pincode_wrong">PIN de aplicación incorrecto</string>
+  <string name="pincode_removed">PIN de aplicación borrado</string>
+  <string name="pincode_stored">PIN de aplicación guardado</string>
+  <string name="media_notif_ticker">Reproductor de música %1$s</string>
+  <string name="media_state_playing">%1$s (reproduciendo)</string>
+  <string name="media_state_loading">%1$s (cargando)</string>
+  <string name="media_event_done">%1$s reproducción finalizada</string>
+  <string name="media_err_nothing_to_play">No se encuentra archivo de medio</string>
+  <string name="media_err_no_account">No se ha proporcionado cuenta</string>
+  <string name="media_err_not_in_owncloud">El archivo no esta en una cuenta valida </string>
+  <string name="media_err_unsupported">Codec No Soportado</string>
+  <string name="media_err_io">El archivo de medios no pudo ser leído </string>
+  <string name="media_err_malformed">Archivo no codificado correctamente</string>
+  <string name="media_err_timeout">Tiempo de espera agotado en el intento de reproducción</string>
+  <string name="media_err_invalid_progressive_playback">Archivo de medio no puede ser transmitido</string>
+  <string name="media_err_unknown">El archivo de medios no se puede reproducir con el reproductor de medios por defecto </string>
+  <string name="media_err_security_ex">Error de seguridad al intentar reproducir %1$s</string>
+  <string name="media_err_io_ex">Error de entrada al intentar reproducir %1$s</string>
+  <string name="media_err_unexpected">Error inesperado intentando reproducir %1$s</string>
+  <string name="media_rewind_description">Botón Rebobinado</string>
+  <string name="media_play_pause_description">Botón de reproducción o pausa </string>
+  <string name="media_forward_description">Botón avance rápido</string>
+  <string name="auth_trying_to_login">Intentado iniciar sesión...</string>
+  <string name="auth_no_net_conn_title">Sin conexión de red</string>
+  <string name="auth_nossl_plain_ok_title">Conexión segura no disponible.</string>
+  <string name="auth_connection_established">Conexión establecida</string>
+  <string name="auth_testing_connection">Probando conexión...</string>
+  <string name="auth_not_configured_title">Configuración de servidor en formato incorrecto</string>
+  <string name="auth_account_not_new">Una cuenta para el mismo usuario y servidor ya existen en el dispositivo</string>
+  <string name="auth_account_not_the_same">El usuario introducido no concuerda con el usuario de esta cuenta</string>
+  <string name="auth_unknown_error_title">Ocurrió un error desconocido</string>
+  <string name="auth_unknown_host_title">No se pudo encontrar la dirección</string>
+  <string name="auth_incorrect_path_title">Instancia de servidor no encontrada</string>
+  <string name="auth_timeout_title">El servidor ha tardado demasiado en responder</string>
+  <string name="auth_incorrect_address_title">URL no válida</string>
+  <string name="auth_ssl_general_error_title">Falló la inicialización SSL</string>
+  <string name="auth_ssl_unverified_server_title">No fue posible verificar la identidad del servidor SLL</string>
+  <string name="auth_bad_oc_version_title">No se reconoce  la versión del servidor </string>
+  <string name="auth_wrong_connection_title">No se ha podido establecer la conexión</string>
+  <string name="auth_secure_connection">Conexión segura establecida</string>
+  <string name="auth_unauthorized">Nombre de usuario o contraseña incorrecta</string>
+  <string name="auth_oauth_error">Autorización no satisfactoria</string>
+  <string name="auth_oauth_error_access_denied">Acceso denegado por servidor de autorización</string>
+  <string name="auth_wtf_reenter_URL">Estado inesperado; por favor, introduzca la URL del servidor de nuevo</string>
+  <string name="auth_expired_oauth_token_toast">Su autorización ha expirado. Por favor, autorice de nuevo</string>
+  <string name="auth_expired_basic_auth_toast">Por favor, introduzca la contraseña actual.</string>
+  <string name="auth_expired_saml_sso_token_toast">Su sesión ha expirado. Favor de conectarse de nuevo</string>
+  <string name="auth_connecting_auth_server">Conectando al servidor de autenticación...</string>
+  <string name="auth_unsupported_auth_method">El servidor no soporta este método de autenticación</string>
+  <string name="auth_unsupported_multiaccount">%1$s no soporta cuentas múltiples</string>
+  <string name="fd_keep_in_sync">Mantener el archivo actualizado</string>
+  <string name="common_rename">Renombrar</string>
+  <string name="common_remove">Borrar</string>
+  <string name="confirmation_remove_alert">¿Está seguro que desea borrar %1$s ?</string>
+  <string name="confirmation_remove_folder_alert">¿Desea elimiar %1$s y sus descendientes?</string>
+  <string name="confirmation_remove_local">Sólo local</string>
+  <string name="confirmation_remove_folder_local">Sólo archivos locales</string>
+  <string name="confirmation_remove_remote">Eliminar del servidor</string>
+  <string name="confirmation_remove_remote_and_local">Tanto remoto como local</string>
+  <string name="remove_success_msg">Borrado correctamente</string>
+  <string name="remove_fail_msg">El borrado no pudo ser completado</string>
+  <string name="rename_dialog_title">Introduzca un nombre nuevo</string>
+  <string name="rename_local_fail_msg">No se pudo cambiar el nombre de la copia local, trata con un nombre differente</string>
+  <string name="rename_server_fail_msg">No se pudo cambiar el nombre</string>
+  <string name="sync_file_fail_msg">No pudo comprobarse el archivo remoto</string>
+  <string name="sync_file_nothing_to_do_msg">Ya está sincronizado</string>
+  <string name="create_dir_fail_msg">El directorio no pudo ser creado</string>
+  <string name="filename_forbidden_characters">Carácteres ilegales: / \\ &lt; &gt; : \" | ? *</string>
+  <string name="wait_a_moment">Espere un momento</string>
+  <string name="filedisplay_unexpected_bad_get_content">Problema inesperado; por favor, prueba otra app para seleccionar el archivo</string>
+  <string name="filedisplay_no_file_selected">No fué seleccionado ningún archivo</string>
+  <string name="oauth_check_onoff">Ingresar con oAuth2</string>
+  <string name="oauth_login_connection">Conectando al servidor oAuth2...</string>
+  <string name="ssl_validator_header">La identidad del sitio no puede ser verificada</string>
+  <string name="ssl_validator_reason_cert_not_trusted">- El certificado del servidor no es de confianza</string>
+  <string name="ssl_validator_reason_cert_expired">- El certificado del servidor expiró</string>
+  <string name="ssl_validator_reason_cert_not_yet_valid">- El certificado del servidor es demasiado reciente</string>
+  <string name="ssl_validator_reason_hostname_not_verified">- La URL no coincide con el nombre de dominio del certificado</string>
+  <string name="ssl_validator_question">¿Confías de todas formas en este certificado?</string>
+  <string name="ssl_validator_not_saved">El certificado no pudo ser guardado</string>
+  <string name="ssl_validator_btn_details_see">Detalles</string>
+  <string name="ssl_validator_btn_details_hide">Ocultar</string>
+  <string name="ssl_validator_label_subject">Emitido para:</string>
+  <string name="ssl_validator_label_issuer">Emitido por:</string>
+  <string name="ssl_validator_label_CN">Nombre común:</string>
+  <string name="ssl_validator_label_O">Organización:</string>
+  <string name="ssl_validator_label_OU">Unidad organizativa</string>
+  <string name="ssl_validator_label_C">Pais:</string>
+  <string name="ssl_validator_label_ST">Estado:</string>
+  <string name="ssl_validator_label_L">Ubicación:</string>
+  <string name="ssl_validator_label_validity">Validez:</string>
+  <string name="ssl_validator_label_validity_from">De:</string>
+  <string name="ssl_validator_label_validity_to">A:</string>
+  <string name="ssl_validator_label_signature">Firma:</string>
+  <string name="ssl_validator_label_signature_algorithm">Algoritmo:</string>
+  <string name="placeholder_sentence">Esto es un marcador de posición</string>
+  <string name="placeholder_filename">marcadordeposición.txt</string>
+  <string name="placeholder_filetype">Imagen PNG</string>
+  <string name="placeholder_filesize">389 KB</string>
+  <string name="placeholder_timestamp">2012/05/18 12:23 PM</string>
+  <string name="placeholder_media_time">12:23:45</string>
+  <string name="instant_upload_on_wifi">Subir imágenes sólo via WiFi</string>
+  <string name="instant_upload_path">/SubidasInstantáneas</string>
+  <string name="conflict_title">Conflicto en la actualización</string>
+  <string name="conflict_message">El archivo remoto %s no está sincronizado con el archivo local. Si continúa, se reemplazará el contenido del archivo en el servidor.</string>
+  <string name="conflict_keep_both">Mantener ambas</string>
+  <string name="conflict_overwrite">Sobrescribir</string>
+  <string name="conflict_dont_upload">No subir</string>
+  <string name="preview_image_description">Previsualización de imagen</string>
+  <string name="preview_image_error_unknown_format">No se puede mostrar la imagen</string>
+  <string name="error__upload__local_file_not_copied">%1$s no puede ser copiado al %2$s directorio local </string>
+  <string name="actionbar_failed_instant_upload">Carga instantánea fallida</string>
+  <string name="failed_upload_headline_text">Cargas instantáneas fallidas</string>
+  <string name="failed_upload_headline_hint">Resumen de todas las cargas instantáneas fallidas</string>
+  <string name="failed_upload_all_cb">Seleccionar todos</string>
+  <string name="failed_upload_headline_retryall_btn">Reintentar todos los seleccionados</string>
+  <string name="failed_upload_headline_delete_all_btn">Eliminar todo de la cola de subida</string>
+  <string name="failed_upload_retry_text">Reintentar subida de imagen:</string>
+  <string name="failed_upload_load_more_images">Cargar mas imágenes</string>
+  <string name="failed_upload_retry_do_nothing_text">No hacer nada no está conectado para subida instantánea</string>
+  <string name="failed_upload_failure_text">Mensaje de error:</string>
+  <string name="failed_upload_quota_exceeded_text">Por favor revise su configuración de servidor, posiblemente su cuota se haya excedido.</string>
+</resources>

+ 1 - 0
res/values-es/strings.xml

@@ -30,6 +30,7 @@
   <string name="recommend_subject">Prueba  %1$s en tu smarthphone!</string>
   <string name="recommend_text">Quiero invitarte a usar %1$s en tu smarthphone!⏎\nDescargalo aquí: %2$s</string>
   <string name="auth_check_server">Compruebe el servidor.</string>
+  <string name="auth_host_url">Dirección del servidor https://…</string>
   <string name="auth_username">Nombre de usuario</string>
   <string name="auth_password">Contraseña</string>
   <string name="auth_register">New to %1$s?</string>

+ 1 - 0
res/values-et-rEE/strings.xml

@@ -30,6 +30,7 @@
   <string name="recommend_subject">Proovi oma nutitelefonil rakendust %1$s!</string>
   <string name="recommend_text">Soovin sind kutsuda kasutama oma nutitelefonil rakendust %1$s!\nLae alla siit: %2$s</string>
   <string name="auth_check_server">Kontrolli serverit</string>
+  <string name="auth_host_url">Serveri aadress https://...</string>
   <string name="auth_username">Kasutajanimi</string>
   <string name="auth_password">Parool</string>
   <string name="auth_register">Uus %1$s kasutaja?</string>

+ 1 - 0
res/values-fi-rFI/strings.xml

@@ -27,6 +27,7 @@
   <string name="recommend_subject">Kokeile %1$sia älypuhelimellasi!</string>
   <string name="recommend_text">Ota %1$s käyttöösi älypuhelimessa!\nLataa tästä: %2$s</string>
   <string name="auth_check_server">Tarkista palvelin</string>
+  <string name="auth_host_url">Palvelinosoite https://…</string>
   <string name="auth_username">Käyttäjätunnus</string>
   <string name="auth_password">Salasana</string>
   <string name="auth_register">Onko %1$s uusi tuttavuus sinulle?</string>

+ 2 - 1
res/values-fr/strings.xml

@@ -3,7 +3,7 @@
   <string name="about_android">%1$s Android App</string>
   <string name="about_version">version %1$s</string>
   <string name="actionbar_sync">Actualiser le compte</string>
-  <string name="actionbar_upload">Téléverser</string>
+  <string name="actionbar_upload">Charger</string>
   <string name="actionbar_upload_from_apps">Contenu d\'une autre application</string>
   <string name="actionbar_upload_files">Fichiers</string>
   <string name="actionbar_open_with">Ouvrir avec</string>
@@ -30,6 +30,7 @@
   <string name="recommend_subject">Essayez %1$s sur votre smartphone !</string>
   <string name="recommend_text">J\'aimerais vous inviter à utiliser %1$s sur votre smartphone !\nTéléchargez-le ici : %2$s</string>
   <string name="auth_check_server">Vérifier le serveur</string>
+  <string name="auth_host_url">Adresse du serveur https://...</string>
   <string name="auth_username">Nom d\'utilisateur</string>
   <string name="auth_password">Mot de passe</string>
   <string name="auth_register">Nouveau dans %1$s ?</string>

+ 1 - 0
res/values-gl/strings.xml

@@ -30,6 +30,7 @@
   <string name="recommend_subject">Tente %1$s no seu teléfono intelixente!</string>
   <string name="recommend_text">Quero convidalo a empregar %1$s no seu teléfono intelixente!⏎\nDescárgueo de aquí:%2$s</string>
   <string name="auth_check_server">Comprobar o servidor</string>
+  <string name="auth_host_url">Enderezo do servidor https://…</string>
   <string name="auth_username">Nome de usuario</string>
   <string name="auth_password">Contrasinal</string>
   <string name="auth_register">Novo en %1$s?</string>

+ 3 - 0
res/values-hu-rHU/strings.xml

@@ -30,6 +30,7 @@
   <string name="recommend_subject">Próbálja ki %1$s-t az okostelefonján!</string>
   <string name="recommend_text">Kérem próbálja ki %1$s-t az okostelefonján!\nInnen tölthető le: %2$s</string>
   <string name="auth_check_server">Szerver állapot ellenörzés</string>
+  <string name="auth_host_url">Kiszolgáló címe https://...</string>
   <string name="auth_username">Felhasználói név</string>
   <string name="auth_password">Jelszó</string>
   <string name="auth_register">Új vagy a %1$s területen?</string>
@@ -174,6 +175,7 @@
   <string name="sync_file_fail_msg">A távoli fájl nem volt ellenőrizhető</string>
   <string name="sync_file_nothing_to_do_msg">Az állományok már szinkonizálva vannak</string>
   <string name="create_dir_fail_msg">A mappa nem hozható létre</string>
+  <string name="filename_forbidden_characters">Nem megendedett karakterek: / \\ &lt; &gt; : \" | ? *</string>
   <string name="wait_a_moment">Egy pillanat...</string>
   <string name="filedisplay_unexpected_bad_get_content">Váratlan hiba; válassza ki a fájlt más programból</string>
   <string name="filedisplay_no_file_selected">Egy fájl sincs kiválasztva</string>
@@ -217,6 +219,7 @@
   <string name="preview_image_description">Előnézeti kép</string>
   <string name="preview_image_error_unknown_format">Ez a kép nem jelenik meg</string>
   <string name="error__upload__local_file_not_copied">%1$s-t nem sikerült átmásolni ide: %2$s </string>
+  <string name="actionbar_failed_instant_upload">Sikertelen azonnali feltöltés\"</string>
   <string name="failed_upload_headline_text">Sikertelen Azonnali feltöltés</string>
   <string name="failed_upload_headline_hint">Összefoglaló az összes sikertelen instant feltöltésről</string>
   <string name="failed_upload_all_cb">Összes kijelölése</string>

+ 1 - 1
res/values-id/strings.xml

@@ -18,7 +18,7 @@
   <string name="uploader_btn_upload_text">Unggah</string>
   <string name="uploader_top_message">Pilih folder unggah</string>
   <string name="uploader_wrn_no_account_title">Tidak ada akun yang ditemukan</string>
-  <string name="uploader_wrn_no_account_text">Belum ada akun %1$s pada perangkat Anda. Silahkan membuat akun terlebih dahulu.</string>
+  <string name="uploader_wrn_no_account_text">Belum ada akun %1$s pada perangkat Anda. Silahkan buat akun terlebih dahulu.</string>
   <string name="uploader_wrn_no_account_setup_btn_text">Pengaturan</string>
   <string name="uploader_wrn_no_account_quit_btn_text">Keluar</string>
   <string name="uploader_info_uploading">Mengunggah</string>

+ 1 - 0
res/values-it/strings.xml

@@ -30,6 +30,7 @@
   <string name="recommend_subject">Prova %1$s sul tuo smartphone!</string>
   <string name="recommend_text">Vorrei invitarti ad usare %1$s sul tuo smartphone!⏎\nScarica qui: %2$s</string>
   <string name="auth_check_server">Verifica server</string>
+  <string name="auth_host_url">Indirizzo server https://...</string>
   <string name="auth_username">Nome utente</string>
   <string name="auth_password">Password</string>
   <string name="auth_register">Prima volta su %1$s?</string>

+ 1 - 0
res/values-ja-rJP/strings.xml

@@ -30,6 +30,7 @@
   <string name="recommend_subject">スマートフォンで %1$s を試してください!</string>
   <string name="recommend_text">スマートフォンで %1$s を利用してみませんか!\nここからダウンロードしてください: %2$s</string>
   <string name="auth_check_server">サーバーを確認する</string>
+  <string name="auth_host_url">サーバーアドレス https://…</string>
   <string name="auth_username">ユーザー名</string>
   <string name="auth_password">パスワード</string>
   <string name="auth_register">%1$sは初めてですか?</string>

+ 9 - 1
res/values-ko/strings.xml

@@ -28,7 +28,9 @@
   <string name="prefs_feedback">피드백</string>
   <string name="prefs_imprint">임프린트</string>
   <string name="recommend_subject">%1$s 을 스마트폰에서 사용해보세요!</string>
+  <string name="recommend_text">당신을 %1$s 로 초대합니다!\n여기서 받으세요: %2$s</string>
   <string name="auth_check_server">서버 확인</string>
+  <string name="auth_host_url">서버 주소 https://…</string>
   <string name="auth_username">사용자 이름</string>
   <string name="auth_password">암호</string>
   <string name="auth_register">%1$s의 새로운 사용자입니까?</string>
@@ -119,6 +121,7 @@
   <string name="media_err_unsupported">지원하지 않는 미디어 코덱</string>
   <string name="media_err_io">미디어 파일을 읽을수 </string>
   <string name="media_err_malformed">미디어 파일이 제대로 인코드 되지 않았습니다</string>
+  <string name="media_err_timeout">재생 시도 중 시간이 초과됨</string>
   <string name="media_err_invalid_progressive_playback">미디어 파일을 스트리밍 할수 없습니다</string>
   <string name="media_err_unknown">내장된 미디어 플레이어에서는 이 미디어 파일을 재생할수 없습니다</string>
   <string name="media_err_security_ex">%1$s 를 재생하는 중에 보안오류가 발생함</string>
@@ -133,6 +136,8 @@
   <string name="auth_connection_established">연결됨</string>
   <string name="auth_testing_connection">연결 테스트 중...</string>
   <string name="auth_not_configured_title">서버 설정이 잘못됨</string>
+  <string name="auth_account_not_new">같은 사용자와 서버에 대한 계정이 이미 존재합니다</string>
+  <string name="auth_account_not_the_same">입력된 사용자가 이 계정의 사용자와 일치하지 않음</string>
   <string name="auth_unknown_error_title">알 수 없는 오류가 발생하였습니다!</string>
   <string name="auth_unknown_host_title">호스트를 찾을 수 없음</string>
   <string name="auth_incorrect_path_title">서버 인스턴스를 찾을 수 없음</string>
@@ -170,6 +175,7 @@
   <string name="sync_file_fail_msg">원격 파일을 확인할 수 없었습니다</string>
   <string name="sync_file_nothing_to_do_msg">파일 내용이 이미 동기화되었습니다</string>
   <string name="create_dir_fail_msg">디렉터리를 만들 수 없었습니다</string>
+  <string name="filename_forbidden_characters">사용할수 없는 문자들: / \\ &lt; &gt; : \" | ? *</string>
   <string name="wait_a_moment">잠시 기다려 주십시오</string>
   <string name="filedisplay_unexpected_bad_get_content">예상하지 못한 오류입니다. 다른 앱에서 파일을 선택하십시오</string>
   <string name="filedisplay_no_file_selected">선택한 파일 없음</string>
@@ -199,7 +205,7 @@
   <string name="ssl_validator_label_signature_algorithm">알고리즘:</string>
   <string name="placeholder_sentence">이것은 플레이스홀더입니다</string>
   <string name="placeholder_filename">placeholder.txt</string>
-  <string name="placeholder_filetype">PNG 파일</string>
+  <string name="placeholder_filetype">PNG 그림</string>
   <string name="placeholder_filesize">389 KB</string>
   <string name="placeholder_timestamp">2012/05/18 12:23 PM</string>
   <string name="placeholder_media_time">12:23:45</string>
@@ -213,6 +219,7 @@
   <string name="preview_image_description">그림 미리보기</string>
   <string name="preview_image_error_unknown_format">이 그림을 볼수 없습니다</string>
   <string name="error__upload__local_file_not_copied">%1$s를 %2$s 로컬 디렉토리로 복사하지 못했습니다.</string>
+  <string name="actionbar_failed_instant_upload">자동 업로드가 실패했습니다</string>
   <string name="failed_upload_headline_text">자동 업로드 실패함</string>
   <string name="failed_upload_headline_hint">실패된 자동 업로드 전체 요약</string>
   <string name="failed_upload_all_cb">전체 선택</string>
@@ -220,6 +227,7 @@
   <string name="failed_upload_headline_delete_all_btn">선택된 업로드 큐 전체 삭제</string>
   <string name="failed_upload_retry_text">이미지 업로드 재시도:</string>
   <string name="failed_upload_load_more_images">더 많은 사진 불러오기</string>
+  <string name="failed_upload_retry_do_nothing_text">현재 온라인이 아니셔서 자동 업로드를 할수 없습니다</string>
   <string name="failed_upload_failure_text">실패 메시지:</string>
   <string name="failed_upload_quota_exceeded_text">서버 설정을 확인해주세요, 아마 업로드 제한을 초과하셨을겁니다.</string>
 </resources>

+ 1 - 0
res/values-nl/strings.xml

@@ -30,6 +30,7 @@
   <string name="recommend_subject">Probeer %1$s op uw smartphone!</string>
   <string name="recommend_text">Uitnodiging om %1$s op uw smartphone uit te proberen!\nDownload hier: %2$s</string>
   <string name="auth_check_server">Controleer server</string>
+  <string name="auth_host_url">Serveradres https://…</string>
   <string name="auth_username">Gebruikersnaam</string>
   <string name="auth_password">Wachtwoord</string>
   <string name="auth_register">Nieuw bij %1$s?</string>

+ 1 - 0
res/values-pl/strings.xml

@@ -30,6 +30,7 @@
   <string name="recommend_subject">Wypróbuj %1$s na swoim smartphonie!</string>
   <string name="recommend_text">Chcę was zaprosić do korzystania z %1$ s na twoim smartfonie!\nPobierz tutaj: %2$s</string>
   <string name="auth_check_server">Sprawdź serwer</string>
+  <string name="auth_host_url">Adres serwera https://...</string>
   <string name="auth_username">Nazwa użytkownika</string>
   <string name="auth_password">Hasło</string>
   <string name="auth_register">Nowe %1$s?</string>

+ 1 - 0
res/values-pt-rBR/strings.xml

@@ -30,6 +30,7 @@
   <string name="recommend_subject">Tentar %1$s em seu smartfone!</string>
   <string name="recommend_text">Gostaria de lhe convidar para usar %1$s em seu smartfone!\nBaixe aqui: %2$s</string>
   <string name="auth_check_server">Verificar Servidor</string>
+  <string name="auth_host_url">Endereço do servidor https://...</string>
   <string name="auth_username">Nome de usuário</string>
   <string name="auth_password">Senha</string>
   <string name="auth_register">Novo para %1$s?</string>

+ 1 - 0
res/values-ru/strings.xml

@@ -30,6 +30,7 @@
   <string name="recommend_subject">Попробуйте %1$s на вашем смартфоне!</string>
   <string name="recommend_text">Хочу предложить вам пользоваться %1$s на вашем смартфоне!\nДля загрузки: %2$s</string>
   <string name="auth_check_server">Проверить сервер</string>
+  <string name="auth_host_url">Адрес сервера https://...</string>
   <string name="auth_username">Пользователь</string>
   <string name="auth_password">Пароль</string>
   <string name="auth_register">Впервые с %1$s?</string>

+ 1 - 0
res/values-sk-rSK/strings.xml

@@ -30,6 +30,7 @@
   <string name="recommend_subject">Skúste %1$s na vašom telefóne!</string>
   <string name="recommend_text">Chcem vás pozvať na používanie %1$s na vašom smartphone!\nNa stiahnutie tu: %2$s</string>
   <string name="auth_check_server">Skontrolovať Server</string>
+  <string name="auth_host_url">Adresa servera https://...</string>
   <string name="auth_username">Používateľské meno</string>
   <string name="auth_password">Heslo</string>
   <string name="auth_register">Ste nový v %1$s?</string>

+ 6 - 1
res/values-sk/strings.xml

@@ -1,2 +1,7 @@
 <?xml version='1.0' encoding='UTF-8'?>
-<resources/>
+<resources>
+  <string name="actionbar_settings">Nastavenia</string>
+  <string name="prefs_category_general">Všeobecné</string>
+  <string name="filedetails_download">Stiahnuť</string>
+  <string name="common_cancel">Zrušiť</string>
+</resources>

+ 1 - 0
res/values-sl/strings.xml

@@ -30,6 +30,7 @@
   <string name="recommend_subject">Preizkusi %1$s na pametnem telefonu!</string>
   <string name="recommend_text">Želim ti predstaviti program %1$s za pametni telefon!\nPrejmeš ga lahko na: %2$s</string>
   <string name="auth_check_server">Preveri strežnik</string>
+  <string name="auth_host_url">Naslov strežnika https://…</string>
   <string name="auth_username">Uporabniško ime</string>
   <string name="auth_password">Geslo</string>
   <string name="auth_register">Ali ste novi uporabnik sistema %1$s?</string>

+ 16 - 15
res/values-tr/strings.xml

@@ -3,11 +3,11 @@
   <string name="about_android">%1$s Android Uygulaması</string>
   <string name="about_version">sürüm %1$s</string>
   <string name="actionbar_sync">Hesabı yenile</string>
-  <string name="actionbar_upload">Dosya yükle</string>
+  <string name="actionbar_upload">Yükle</string>
   <string name="actionbar_upload_from_apps">Diğer uygulamalardan içerik</string>
   <string name="actionbar_upload_files">Dosyalar</string>
   <string name="actionbar_open_with">ile aç</string>
-  <string name="actionbar_mkdir">Klasör oluştur</string>
+  <string name="actionbar_mkdir">Dizin oluştur</string>
   <string name="actionbar_settings">Ayarlar</string>
   <string name="actionbar_see_details">Detaylar</string>
   <string name="prefs_category_general">Genel</string>
@@ -30,6 +30,7 @@
   <string name="recommend_subject">%1$s uygulamasını akıllı telefonunda dene!</string>
   <string name="recommend_text">Sana, akıllı telefonunda kullanmak üzere %1$s daveti yapıyorum!\nBuradan indirebilirsin: %2$s</string>
   <string name="auth_check_server">Sunucuyu kontrol et</string>
+  <string name="auth_host_url">Sunucu Adresi https://…</string>
   <string name="auth_username">Kullanıcı Adi:</string>
   <string name="auth_password">Şifre:</string>
   <string name="auth_register">%1$s senin için yeni mi?</string>
@@ -37,8 +38,8 @@
   <string name="setup_btn_connect">Bağlan</string>
   <string name="uploader_btn_upload_text">Yükle</string>
   <string name="uploader_top_message">Yükleme dizinini seçiniz:</string>
-  <string name="uploader_wrn_no_account_title">Hesap bulunamadi</string>
-  <string name="uploader_wrn_no_account_text">Cihazınızda %1$s hesabı bulunmamaktadır. Lütfen öncelikle bir hesap ayarı giriniz.</string>
+  <string name="uploader_wrn_no_account_title">Hesap bulunamadı</string>
+  <string name="uploader_wrn_no_account_text">Cihazınızda %1$s hesabı bulunmamaktadır. Lütfen öncelikle bir hesap ayarlayın.</string>
   <string name="uploader_wrn_no_account_setup_btn_text">Kurulum</string>
   <string name="uploader_wrn_no_account_quit_btn_text">Çıkış</string>
   <string name="uploader_wrn_no_content_title">Yüklenecek içerik yok</string>
@@ -46,7 +47,7 @@
   <string name="uploader_error_forbidden_content">%1$s, paylaşılan içeriğe erişim izni vermiyor</string>
   <string name="uploader_info_uploading">Yükleniyor</string>
   <string name="file_list_empty">Klasörde dosya yok. Yeni dosyalar yükle\'ye tıklayarak eklenebilir.</string>
-  <string name="filedetails_select_file">Ek bilgileri görmek için dosyaya tıklayınız.</string>
+  <string name="filedetails_select_file">Ek bilgileri görmek için dosyaya dokunun.</string>
   <string name="filedetails_size">Boyut:</string>
   <string name="filedetails_type">Tür:</string>
   <string name="filedetails_created">Oluşturulma:</string>
@@ -85,12 +86,12 @@
   <string name="downloader_not_downloaded_yet">Henüz indirilemedi</string>
   <string name="common_choose_account">Hesap seçiniz</string>
   <string name="sync_fail_ticker">Eşitleme başarısız</string>
-  <string name="sync_fail_content">%1$s Senkronizasyonu tamamlanamadı</string>
+  <string name="sync_fail_content">%1$s eşitlemesi tamamlanamadı</string>
   <string name="sync_fail_content_unauthorized">%1$s için geçersiz parola</string>
   <string name="sync_conflicts_in_favourites_ticker">Çakışma bulundu</string>
-  <string name="sync_conflicts_in_favourites_content">%1$d korumalı senkronizasyon dosyası, senkronize edilemedi</string>
-  <string name="sync_fail_in_favourites_ticker">Korunan dosya senkronizasyonu başarısız</string>
-  <string name="sync_fail_in_favourites_content">%1$d dosya  senkronize edilemedi  (%2$d hata)</string>
+  <string name="sync_conflicts_in_favourites_content">%1$d korumalı eşitleme dosyası, eşitlenemedi</string>
+  <string name="sync_fail_in_favourites_ticker">Korunan dosya eşitlemesi başarısız</string>
+  <string name="sync_fail_in_favourites_content">%1$d dosya eşitlenemedi (%2$d çakışma)</string>
   <string name="sync_foreign_files_forgotten_ticker">Bazı yerel dosyalar unutuldu</string>
   <string name="sync_foreign_files_forgotten_content">%1$d dosya %2$s dizinine kopyalanamadı</string>
   <string name="sync_foreign_files_forgotten_explanation">1.3.16 sürümünden sonra, bu aygıttan yüklenen dosyalar bir dosya birden fazla hesapla eşitlendiğinde veri kaybının önlenebilmesi için %1$s yerel klasörüne kopyalanır.\n\nBu değişiklikten dolayı, bu uygulamanın yüklenmiş tüm önceki sürümündeki dosyalar %2$s klasörüne kopyalandı. Ancak hesap eşitlenmesi sırasında bu işlemin tamamlanmasını engelleyen bir hata oluştu. Dosyayı/dosyaları olduğu gibi bırakabilir ve %3$s bağlantısını kaldırabilirsiniz veya dosyayı/dosyaları %1$s dizinine taşıyıp %4$s bağlantılarını koruyabilirsiniz.\n\nAşağıda listelenenler yerel dosyalar ve bağlı oldukları %5$s içerisindeki uzak dosyalardır.</string>
@@ -126,9 +127,9 @@
   <string name="media_err_security_ex">%1$s oynatılmaya çalışılırken güvenlik hatası oluştu</string>
   <string name="media_err_io_ex">%1$s oynatılmaya çalışılırken girdi hatası oluştu</string>
   <string name="media_err_unexpected">%1$s oynatılmaya çalışılırken beklenmeyen bir hata oluştu</string>
-  <string name="media_rewind_description">Başa sar butonu</string>
-  <string name="media_play_pause_description">Oynat veya duraklat butonu</string>
-  <string name="media_forward_description">Hızlı ileri butonu</string>
+  <string name="media_rewind_description">Başa sar düğmesi</string>
+  <string name="media_play_pause_description">Oynat veya duraklat düğmesi</string>
+  <string name="media_forward_description">Hızlı ileri düğmesi</string>
   <string name="auth_trying_to_login">Giriş için deneniyor</string>
   <string name="auth_no_net_conn_title">Ağ bağlantısı yok</string>
   <string name="auth_nossl_plain_ok_title">Günvenli bağlantı mevcut değil.</string>
@@ -139,7 +140,7 @@
   <string name="auth_account_not_the_same">Girilen kullanıcı bu hesabın kullanıcısı ile eşleşmiyor</string>
   <string name="auth_unknown_error_title">Bilinmeyen hata oluştu.</string>
   <string name="auth_unknown_host_title">Anabilgisayar bulunamadı</string>
-  <string name="auth_incorrect_path_title">sunucu servisi bulunamadı.</string>
+  <string name="auth_incorrect_path_title">Sunucu örneği bulunamadı.</string>
   <string name="auth_timeout_title">Sunucu çok geç cevap veriyor</string>
   <string name="auth_incorrect_address_title">Hatalı biçimlendirilmiş URL</string>
   <string name="auth_ssl_general_error_title">SSL başlatılmasında hata</string>
@@ -172,7 +173,7 @@
   <string name="rename_local_fail_msg">Yerel kopya adlandırılamaz; farklı bir ad deneyin</string>
   <string name="rename_server_fail_msg">Yeniden  adlandırılma tamamlanmadı</string>
   <string name="sync_file_fail_msg">Dosya teslim edilemedi</string>
-  <string name="sync_file_nothing_to_do_msg">Dosyalar başarıyla senkronize edildi</string>
+  <string name="sync_file_nothing_to_do_msg">Dosya içerikleri zaten eşitlenmiş</string>
   <string name="create_dir_fail_msg">Dizin oluşturulamadı</string>
   <string name="filename_forbidden_characters">Yasaklı karakterler: / \\ &lt; &gt; : \" | ? *</string>
   <string name="wait_a_moment">Bir süre bekleyin</string>
@@ -211,7 +212,7 @@
   <string name="instant_upload_on_wifi">Resimleri sadece WiFi bağlantısında yükle</string>
   <string name="instant_upload_path">/AnındaYükle</string>
   <string name="conflict_title">Çakışmayı güncelle</string>
-  <string name="conflict_message">Uzaktaki %s dosyası, yerel dosya ile senkronize edilemedi.  işleme devam etmek sunucudaki dosyanın içeriğini değiştirecektir.</string>
+  <string name="conflict_message">Uzaktaki %s dosyası, yerel dosya ile eşitlenemedi. İşleme devam etmek sunucudaki dosyanın içeriğini değiştirecektir.</string>
   <string name="conflict_keep_both">İkisini de koru</string>
   <string name="conflict_overwrite">Üzerine yaz</string>
   <string name="conflict_dont_upload">Yükleme</string>

+ 2 - 0
res/values-ur/strings.xml

@@ -0,0 +1,2 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<resources/>

+ 8 - 8
src/com/owncloud/android/authentication/AuthenticatorActivity.java

@@ -57,13 +57,13 @@ import com.owncloud.android.oc_framework.accounts.AccountTypeUtils;
 import com.owncloud.android.oc_framework.accounts.OwnCloudAccount;
 import com.owncloud.android.oc_framework.network.webdav.OwnCloudClientFactory;
 import com.owncloud.android.oc_framework.network.webdav.WebdavClient;
-import com.owncloud.android.operations.ExistenceCheckOperation;
 import com.owncloud.android.operations.OAuth2GetAccessToken;
 import com.owncloud.android.oc_framework.operations.OnRemoteOperationListener;
 import com.owncloud.android.operations.OwnCloudServerCheckOperation;
 import com.owncloud.android.oc_framework.operations.RemoteOperation;
 import com.owncloud.android.oc_framework.operations.RemoteOperationResult;
 import com.owncloud.android.oc_framework.operations.RemoteOperationResult.ResultCode;
+import com.owncloud.android.oc_framework.operations.remote.ExistenceCheckRemoteOperation;
 import com.owncloud.android.ui.dialog.SamlWebViewDialog;
 import com.owncloud.android.ui.dialog.SslValidatorDialog;
 import com.owncloud.android.ui.dialog.SslValidatorDialog.OnSslValidatorListener;
@@ -131,7 +131,7 @@ implements  OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
     private final Handler mHandler = new Handler();
     private Thread mOperationThread;
     private OwnCloudServerCheckOperation mOcServerChkOperation;
-    private ExistenceCheckOperation mAuthCheckOperation;
+    private ExistenceCheckRemoteOperation mAuthCheckOperation;
     private RemoteOperationResult mLastSslUntrustedServerResult;
 
     private Uri mNewCapturedUriFromOAuth2Redirection;
@@ -716,7 +716,7 @@ implements  OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
         showDialog(DIALOG_LOGIN_PROGRESS);
 
         /// test credentials accessing the root folder
-        mAuthCheckOperation = new  ExistenceCheckOperation("", this, false);
+        mAuthCheckOperation = new  ExistenceCheckRemoteOperation("", this, false);
         WebdavClient client = OwnCloudClientFactory.createOwnCloudClient(Uri.parse(mHostBaseUrl + webdav_path), this, true);
         client.setBasicCredentials(username, password);
         mOperationThread = mAuthCheckOperation.execute(client, this, mHandler);
@@ -765,7 +765,7 @@ implements  OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
         String webdav_path = AccountUtils.getWebdavPath(mDiscoveredVersion, mAuthTokenType);
 
         /// test credentials accessing the root folder
-        mAuthCheckOperation = new  ExistenceCheckOperation("", this, false);
+        mAuthCheckOperation = new  ExistenceCheckRemoteOperation("", this, false);
         WebdavClient client = OwnCloudClientFactory.createOwnCloudClient(Uri.parse(mHostBaseUrl + webdav_path), this, false);
         mOperationThread = mAuthCheckOperation.execute(client, this, mHandler);
       
@@ -785,12 +785,12 @@ implements  OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
         } else if (operation instanceof OAuth2GetAccessToken) {
             onGetOAuthAccessTokenFinish((OAuth2GetAccessToken)operation, result);
 
-        } else if (operation instanceof ExistenceCheckOperation)  {
+        } else if (operation instanceof ExistenceCheckRemoteOperation)  {
             if (AccountTypeUtils.getAuthTokenTypeSamlSessionCookie(MainApp.getAccountType()).equals(mAuthTokenType)) {
                 onSamlBasedFederatedSingleSignOnAuthorizationStart(operation, result);
                 
             } else {
-                onAuthorizationCheckFinish((ExistenceCheckOperation)operation, result);
+                onAuthorizationCheckFinish((ExistenceCheckRemoteOperation)operation, result);
             }
         }
     }
@@ -1084,7 +1084,7 @@ implements  OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
             /// time to test the retrieved access token on the ownCloud server
             mAuthToken = ((OAuth2GetAccessToken)operation).getResultTokenMap().get(OAuth2Constants.KEY_ACCESS_TOKEN);
             Log_OC.d(TAG, "Got ACCESS TOKEN: " + mAuthToken);
-            mAuthCheckOperation = new ExistenceCheckOperation("", this, false);
+            mAuthCheckOperation = new ExistenceCheckRemoteOperation("", this, false);
             WebdavClient client = OwnCloudClientFactory.createOwnCloudClient(Uri.parse(mHostBaseUrl + webdav_path), this, true);
             client.setBearerCredentials(mAuthToken);
             mAuthCheckOperation.execute(client, this, mHandler);
@@ -1105,7 +1105,7 @@ implements  OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
      * @param operation     Access check performed.
      * @param result        Result of the operation.
      */
-    private void onAuthorizationCheckFinish(ExistenceCheckOperation operation, RemoteOperationResult result) {
+    private void onAuthorizationCheckFinish(ExistenceCheckRemoteOperation operation, RemoteOperationResult result) {
         try {
             dismissDialog(DIALOG_LOGIN_PROGRESS);
         } catch (IllegalArgumentException e) {

+ 4 - 4
src/com/owncloud/android/files/services/FileDownloader.java

@@ -440,10 +440,10 @@ public class FileDownloader extends Service implements OnDatatransferProgressLis
     public void onTransferProgress(long progressRate, long totalTransferredSoFar, long totalToTransfer, String fileName) {
         int percent = (int)(100.0*((double)totalTransferredSoFar)/((double)totalToTransfer));
         if (percent != mLastPercent) {
-          mNotification.contentView.setProgressBar(R.id.status_progress, 100, percent, totalToTransfer < 0);
-          String text = String.format(getString(R.string.downloader_download_in_progress_content), percent, fileName);
-          mNotification.contentView.setTextViewText(R.id.status_text, text);
-          mNotificationManager.notify(R.string.downloader_download_in_progress_ticker, mNotification);
+            mNotification.contentView.setProgressBar(R.id.status_progress, 100, percent, totalToTransfer < 0);
+            String text = String.format(getString(R.string.downloader_download_in_progress_content), percent, fileName);
+            mNotification.contentView.setTextViewText(R.id.status_text, text);
+            mNotificationManager.notify(R.string.downloader_download_in_progress_ticker, mNotification);
         }
         mLastPercent = percent;
     }

+ 5 - 13
src/com/owncloud/android/files/services/FileUploader.java

@@ -38,17 +38,15 @@ import com.owncloud.android.authentication.AuthenticatorActivity;
 import com.owncloud.android.datamodel.FileDataStorageManager;
 import com.owncloud.android.datamodel.OCFile;
 import com.owncloud.android.db.DbHandler;
-import com.owncloud.android.operations.ChunkedUploadFileOperation;
 import com.owncloud.android.operations.CreateFolderOperation;
-import com.owncloud.android.operations.ExistenceCheckOperation;
 import com.owncloud.android.oc_framework.operations.RemoteOperation;
 import com.owncloud.android.oc_framework.operations.RemoteOperationResult;
 import com.owncloud.android.operations.UploadFileOperation;
 import com.owncloud.android.oc_framework.operations.RemoteOperationResult.ResultCode;
+import com.owncloud.android.oc_framework.operations.remote.ExistenceCheckRemoteOperation;
 import com.owncloud.android.oc_framework.utils.OwnCloudVersion;
 import com.owncloud.android.oc_framework.network.webdav.OnDatatransferProgressListener;
 import com.owncloud.android.oc_framework.accounts.OwnCloudAccount;
-import com.owncloud.android.oc_framework.network.webdav.ChunkFromFileChannelRequestEntity;
 import com.owncloud.android.oc_framework.network.webdav.OwnCloudClientFactory;
 import com.owncloud.android.oc_framework.network.webdav.WebdavClient;
 import com.owncloud.android.oc_framework.network.webdav.WebdavEntry;
@@ -253,7 +251,7 @@ public class FileUploader extends Service implements OnDatatransferProgressListe
                 files[i] = obtainNewOCFileToUpload(remotePaths[i], localPaths[i], ((mimeTypes != null) ? mimeTypes[i]
                         : (String) null), storageManager);
                 if (files[i] == null) {
-                    // TODO @andomaex add failure Notiification
+                    // TODO @andomaex add failure Notification
                     return Service.START_NOT_STICKY;
                 }
             }
@@ -267,14 +265,8 @@ public class FileUploader extends Service implements OnDatatransferProgressListe
         try {
             for (int i = 0; i < files.length; i++) {
                 uploadKey = buildRemoteName(account, files[i].getRemotePath());
-                if (chunked
-                        && (new File(files[i].getStoragePath())).length() > ChunkedUploadFileOperation.CHUNK_SIZE)  // added to work around bug in servers 5.x 
-                {
-                    newUpload = new ChunkedUploadFileOperation(account, files[i], isInstant, forceOverwrite,
-                            localAction);
-                } else {
-                    newUpload = new UploadFileOperation(account, files[i], isInstant, forceOverwrite, localAction);
-                }
+                newUpload = new UploadFileOperation(account, files[i], chunked, isInstant, forceOverwrite, localAction, 
+                        getApplicationContext());
                 if (isInstant) {
                     newUpload.setRemoteFolderToBeCreated();
                 }
@@ -563,7 +555,7 @@ public class FileUploader extends Service implements OnDatatransferProgressListe
      *  @return  An {@link OCFile} instance corresponding to the folder where the file will be uploaded.
      */
     private RemoteOperationResult grantFolderExistence(String pathToGrant) {
-        RemoteOperation operation = new ExistenceCheckOperation(pathToGrant, this, false);
+        RemoteOperation operation = new ExistenceCheckRemoteOperation(pathToGrant, this, false);
         RemoteOperationResult result = operation.execute(mUploadClient);
         if (!result.isSuccess() && result.getCode() == ResultCode.FILE_NOT_FOUND && mCurrentUpload.isRemoteFolderToBeCreated()) {
             operation = new CreateFolderOperation( pathToGrant,

+ 39 - 103
src/com/owncloud/android/operations/DownloadFileOperation.java

@@ -17,28 +17,18 @@
 
 package com.owncloud.android.operations;
 
-import java.io.BufferedInputStream;
 import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.Date;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Set;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.apache.commons.httpclient.Header;
-import org.apache.commons.httpclient.HttpException;
-import org.apache.commons.httpclient.methods.GetMethod;
-import org.apache.http.HttpStatus;
 
 import com.owncloud.android.datamodel.OCFile;
 import com.owncloud.android.oc_framework.network.webdav.OnDatatransferProgressListener;
 import com.owncloud.android.oc_framework.network.webdav.WebdavClient;
-import com.owncloud.android.oc_framework.network.webdav.WebdavUtils;
-import com.owncloud.android.oc_framework.operations.OperationCancelledException;
+import com.owncloud.android.oc_framework.operations.RemoteFile;
 import com.owncloud.android.oc_framework.operations.RemoteOperation;
 import com.owncloud.android.oc_framework.operations.RemoteOperationResult;
+import com.owncloud.android.oc_framework.operations.remote.DownloadRemoteFileOperation;
 import com.owncloud.android.utils.FileStorageUtils;
 import com.owncloud.android.utils.Log_OC;
 
@@ -46,9 +36,10 @@ import android.accounts.Account;
 import android.webkit.MimeTypeMap;
 
 /**
- * Remote operation performing the download of a file to an ownCloud server
+ * Remote mDownloadOperation performing the download of a file to an ownCloud server
  * 
  * @author David A. Velasco
+ * @author masensio
  */
 public class DownloadFileOperation extends RemoteOperation {
     
@@ -57,9 +48,9 @@ public class DownloadFileOperation extends RemoteOperation {
     private Account mAccount;
     private OCFile mFile;
     private Set<OnDatatransferProgressListener> mDataTransferListeners = new HashSet<OnDatatransferProgressListener>();
-    private final AtomicBoolean mCancellationRequested = new AtomicBoolean(false);
     private long mModificationTimestamp = 0;
-    private GetMethod mGet;
+    
+    private DownloadRemoteFileOperation mDownloadOperation;
 
     
     public DownloadFileOperation(Account account, OCFile file) {
@@ -70,6 +61,7 @@ public class DownloadFileOperation extends RemoteOperation {
         
         mAccount = account;
         mFile = file;
+        
     }
 
 
@@ -93,6 +85,10 @@ public class DownloadFileOperation extends RemoteOperation {
         return FileStorageUtils.getTemporalPath(mAccount.name) + mFile.getRemotePath();
     }
     
+    public String getTmpFolder() {
+        return FileStorageUtils.getTemporalPath(mAccount.name);
+    }
+    
     public String getRemotePath() {
         return mFile.getRemotePath();
     }
@@ -121,19 +117,6 @@ public class DownloadFileOperation extends RemoteOperation {
     public long getModificationTimestamp() {
         return (mModificationTimestamp > 0) ? mModificationTimestamp : mFile.getModificationTimestamp();
     }
-    
-    
-    public void addDatatransferProgressListener (OnDatatransferProgressListener listener) {
-        synchronized (mDataTransferListeners) {
-            mDataTransferListeners.add(listener);
-        }
-    }
-    
-    public void removeDatatransferProgressListener(OnDatatransferProgressListener listener) {
-        synchronized (mDataTransferListeners) {
-            mDataTransferListeners.remove(listener);
-        }
-    }
 
     @Override
     protected RemoteOperationResult run(WebdavClient client) {
@@ -144,93 +127,46 @@ public class DownloadFileOperation extends RemoteOperation {
         /// download will be performed to a temporal file, then moved to the final location
         File tmpFile = new File(getTmpPath());
         
+        String tmpFolder =  getTmpFolder();
+        RemoteFile remoteFile = FileStorageUtils.fillRemoteFile(mFile);
+        
         /// perform the download
-        try {
-            tmpFile.getParentFile().mkdirs();
-            int status = downloadFile(client, tmpFile);
-            if (isSuccess(status)) {
-                newFile = new File(getSavePath());
-                newFile.getParentFile().mkdirs();
-                moved = tmpFile.renameTo(newFile);
-            }
+        mDownloadOperation = new DownloadRemoteFileOperation(remoteFile, tmpFolder);
+        Iterator<OnDatatransferProgressListener> listener = mDataTransferListeners.iterator();
+        while (listener.hasNext()) {
+            mDownloadOperation.addDatatransferProgressListener(listener.next());
+        }
+        result = mDownloadOperation.execute(client);
+        
+        if (result.isSuccess()) {
+            newFile = new File(getSavePath());
+            newFile.getParentFile().mkdirs();
+            moved = tmpFile.renameTo(newFile);
+        
             if (!moved)
                 result = new RemoteOperationResult(RemoteOperationResult.ResultCode.LOCAL_STORAGE_NOT_MOVED);
-            else
-                result = new RemoteOperationResult(isSuccess(status), status, (mGet != null ? mGet.getResponseHeaders() : null));
-            Log_OC.i(TAG, "Download of " + mFile.getRemotePath() + " to " + getSavePath() + ": " + result.getLogMessage());
-            
-        } catch (Exception e) {
-            result = new RemoteOperationResult(e);
-            Log_OC.e(TAG, "Download of " + mFile.getRemotePath() + " to " + getSavePath() + ": " + result.getLogMessage(), e);
         }
+        Log_OC.i(TAG, "Download of " + mFile.getRemotePath() + " to " + getSavePath() + ": " + result.getLogMessage());
+        
         
         return result;
     }
 
-    
-    public boolean isSuccess(int status) {
-        return (status == HttpStatus.SC_OK);
+    public void cancel() {
+        mDownloadOperation.cancel();
     }
-    
-    
-    protected int downloadFile(WebdavClient client, File targetFile) throws HttpException, IOException, OperationCancelledException {
-        int status = -1;
-        boolean savedFile = false;
-        mGet = new GetMethod(client.getBaseUri() + WebdavUtils.encodePath(mFile.getRemotePath()));
-        Iterator<OnDatatransferProgressListener> it = null;
-        
-        FileOutputStream fos = null;
-        try {
-            status = client.executeMethod(mGet);
-            if (isSuccess(status)) {
-                targetFile.createNewFile();
-                BufferedInputStream bis = new BufferedInputStream(mGet.getResponseBodyAsStream());
-                fos = new FileOutputStream(targetFile);
-                long transferred = 0;
 
-                byte[] bytes = new byte[4096];
-                int readResult = 0;
-                while ((readResult = bis.read(bytes)) != -1) {
-                    synchronized(mCancellationRequested) {
-                        if (mCancellationRequested.get()) {
-                            mGet.abort();
-                            throw new OperationCancelledException();
-                        }
-                    }
-                    fos.write(bytes, 0, readResult);
-                    transferred += readResult;
-                    synchronized (mDataTransferListeners) {
-                        it = mDataTransferListeners.iterator();
-                        while (it.hasNext()) {
-                            it.next().onTransferProgress(readResult, transferred, mFile.getFileLength(), targetFile.getName());
-                        }
-                    }
-                }
-                savedFile = true;
-                Header modificationTime = mGet.getResponseHeader("Last-Modified");
-                if (modificationTime != null) {
-                    Date d = WebdavUtils.parseResponseDate((String) modificationTime.getValue());
-                    mModificationTimestamp = (d != null) ? d.getTime() : 0;
-                }
-                
-            } else {
-                client.exhaustResponse(mGet.getResponseBodyAsStream());
-            }
-                
-        } finally {
-            if (fos != null) fos.close();
-            if (!savedFile && targetFile.exists()) {
-                targetFile.delete();
-            }
-            mGet.releaseConnection();    // let the connection available for other methods
+
+    public void addDatatransferProgressListener (OnDatatransferProgressListener listener) {
+        synchronized (mDataTransferListeners) {
+            mDataTransferListeners.add(listener);
         }
-        return status;
     }
-
     
-    public void cancel() {
-        mCancellationRequested.set(true);   // atomic set; there is no need of synchronizing it
+    public void removeDatatransferProgressListener(OnDatatransferProgressListener listener) {
+        synchronized (mDataTransferListeners) {
+            mDataTransferListeners.remove(listener);
+        }
     }
-
-
+    
 }

+ 43 - 51
src/com/owncloud/android/operations/UploadFileOperation.java

@@ -24,29 +24,30 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.util.HashSet;
+import java.util.Iterator;
 import java.util.Set;
 import java.util.concurrent.atomic.AtomicBoolean;
 
-import org.apache.commons.httpclient.HttpException;
 import org.apache.commons.httpclient.methods.PutMethod;
 import org.apache.commons.httpclient.methods.RequestEntity;
-import org.apache.http.HttpStatus;
 
 import com.owncloud.android.datamodel.OCFile;
 import com.owncloud.android.files.services.FileUploader;
 import com.owncloud.android.oc_framework.network.ProgressiveDataTransferer;
-import com.owncloud.android.oc_framework.network.webdav.FileRequestEntity;
 import com.owncloud.android.oc_framework.network.webdav.OnDatatransferProgressListener;
 import com.owncloud.android.oc_framework.network.webdav.WebdavClient;
-import com.owncloud.android.oc_framework.network.webdav.WebdavUtils;
 import com.owncloud.android.oc_framework.operations.OperationCancelledException;
 import com.owncloud.android.oc_framework.operations.RemoteOperation;
 import com.owncloud.android.oc_framework.operations.RemoteOperationResult;
 import com.owncloud.android.oc_framework.operations.RemoteOperationResult.ResultCode;
+import com.owncloud.android.oc_framework.operations.remote.ChunkedUploadRemoteFileOperation;
+import com.owncloud.android.oc_framework.operations.remote.ExistenceCheckRemoteOperation;
+import com.owncloud.android.oc_framework.operations.remote.UploadRemoteFileOperation;
 import com.owncloud.android.utils.FileStorageUtils;
 import com.owncloud.android.utils.Log_OC;
 
 import android.accounts.Account;
+import android.content.Context;
 
 
 /**
@@ -62,6 +63,7 @@ public class UploadFileOperation extends RemoteOperation {
     private OCFile mFile;
     private OCFile mOldFile;
     private String mRemotePath = null;
+    private boolean mChunked = false;
     private boolean mIsInstant = false;
     private boolean mRemoteFolderToBeCreated = false;
     private boolean mForceOverwrite = false;
@@ -72,15 +74,20 @@ public class UploadFileOperation extends RemoteOperation {
     PutMethod mPutMethod = null;
     private Set<OnDatatransferProgressListener> mDataTransferListeners = new HashSet<OnDatatransferProgressListener>();
     private final AtomicBoolean mCancellationRequested = new AtomicBoolean(false);
+    private Context mContext;
+    
+    private UploadRemoteFileOperation mUploadOperation;
 
     protected RequestEntity mEntity = null;
 
     
     public UploadFileOperation( Account account,
                                 OCFile file,
+                                boolean chunked,
                                 boolean isInstant, 
                                 boolean forceOverwrite,
-                                int localBehaviour) {
+                                int localBehaviour, 
+                                Context context) {
         if (account == null)
             throw new IllegalArgumentException("Illegal NULL account in UploadFileOperation creation");
         if (file == null)
@@ -95,11 +102,13 @@ public class UploadFileOperation extends RemoteOperation {
         mAccount = account;
         mFile = file;
         mRemotePath = file.getRemotePath();
+        mChunked = chunked;
         mIsInstant = isInstant;
         mForceOverwrite = forceOverwrite;
         mLocalBehaviour = localBehaviour;
         mOriginalStoragePath = mFile.getStoragePath();
         mOriginalFileName = mFile.getFileName();
+        mContext = context;
     }
 
     public Account getAccount() {
@@ -199,7 +208,7 @@ public class UploadFileOperation extends RemoteOperation {
                                                                                                 // !!!
             expectedFile = new File(expectedPath);
 
-            // / check location of local file; if not the expected, copy to a
+            // check location of local file; if not the expected, copy to a
             // temporal file before upload (if COPY is the expected behaviour)
             if (!mOriginalStoragePath.equals(expectedPath) && mLocalBehaviour == FileUploader.LOCAL_BEHAVIOUR_COPY) {
 
@@ -260,19 +269,23 @@ public class UploadFileOperation extends RemoteOperation {
             }
             localCopyPassed = true;
 
-            // / perform the upload
-            synchronized (mCancellationRequested) {
-                if (mCancellationRequested.get()) {
-                    throw new OperationCancelledException();
-                } else {
-                    mPutMethod = new PutMethod(client.getBaseUri() + WebdavUtils.encodePath(mFile.getRemotePath()));
-                }
+            /// perform the upload
+            if ( mChunked && (new File(mFile.getStoragePath())).length() > ChunkedUploadRemoteFileOperation.CHUNK_SIZE ) {
+                mUploadOperation = new ChunkedUploadRemoteFileOperation(mFile.getStoragePath(), mFile.getRemotePath(), 
+                        mFile.getMimetype());
+            } else {
+                mUploadOperation = new UploadRemoteFileOperation(mFile.getStoragePath(), mFile.getRemotePath(), 
+                        mFile.getMimetype());
+            }
+            Iterator <OnDatatransferProgressListener> listener = mDataTransferListeners.iterator();
+            while (listener.hasNext()) {
+                mUploadOperation.addDatatransferProgressListener(listener.next());
             }
-            int status = uploadFile(client);
+            result = mUploadOperation.execute(client);
 
-            // / move local temporal file or original file to its corresponding
+            /// move local temporal file or original file to its corresponding
             // location in the ownCloud local folder
-            if (isSuccess(status)) {
+            if (result.isSuccess()) {
                 if (mLocalBehaviour == FileUploader.LOCAL_BEHAVIOUR_FORGET) {
                     mFile.setStoragePath(null);
 
@@ -305,8 +318,6 @@ public class UploadFileOperation extends RemoteOperation {
                 }
             }
 
-            result = new RemoteOperationResult(isSuccess(status), status, (mPutMethod != null ? mPutMethod.getResponseHeaders() : null));
-
         } catch (Exception e) {
             // TODO something cleaner with cancellations
             if (mCancellationRequested.get()) {
@@ -358,29 +369,6 @@ public class UploadFileOperation extends RemoteOperation {
         mFile = newFile;
     }
 
-    public boolean isSuccess(int status) {
-        return ((status == HttpStatus.SC_OK || status == HttpStatus.SC_CREATED || status == HttpStatus.SC_NO_CONTENT));
-    }
-
-    protected int uploadFile(WebdavClient client) throws HttpException, IOException, OperationCancelledException {
-        int status = -1;
-        try {
-            File f = new File(mFile.getStoragePath());
-            mEntity  = new FileRequestEntity(f, getMimeType());
-            synchronized (mDataTransferListeners) {
-                ((ProgressiveDataTransferer)mEntity).addDatatransferProgressListeners(mDataTransferListeners);
-            }
-            mPutMethod.setRequestEntity(mEntity);
-            status = client.executeMethod(mPutMethod);
-            client.exhaustResponse(mPutMethod.getResponseBodyAsStream());
-
-        } finally {
-            mPutMethod.releaseConnection(); // let the connection available for
-                                            // other methods
-        }
-        return status;
-    }
-
     /**
      * Checks if remotePath does not exist in the server and returns it, or adds
      * a suffix to it in order to avoid the server file is overwritten.
@@ -389,7 +377,7 @@ public class UploadFileOperation extends RemoteOperation {
      * @return
      */
     private String getAvailableRemotePath(WebdavClient wc, String remotePath) throws Exception {
-        boolean check = wc.existsFile(remotePath);
+        boolean check = existsFile(wc, remotePath);
         if (!check) {
             return remotePath;
         }
@@ -404,10 +392,12 @@ public class UploadFileOperation extends RemoteOperation {
         int count = 2;
         do {
             suffix = " (" + count + ")";
-            if (pos >= 0)
-                check = wc.existsFile(remotePath + suffix + "." + extension);
-            else
-                check = wc.existsFile(remotePath + suffix);
+            if (pos >= 0) {
+                check = existsFile(wc, remotePath + suffix + "." + extension);
+            }
+            else {
+                check = existsFile(wc, remotePath + suffix);
+            }
             count++;
         } while (check);
 
@@ -418,12 +408,14 @@ public class UploadFileOperation extends RemoteOperation {
         }
     }
 
+    private boolean existsFile(WebdavClient client, String remotePath){
+        ExistenceCheckRemoteOperation existsOperation = new ExistenceCheckRemoteOperation(remotePath, mContext, false);
+        RemoteOperationResult result = existsOperation.execute(client);
+        return result.isSuccess();
+    }
+    
     public void cancel() {
-        synchronized (mCancellationRequested) {
-            mCancellationRequested.set(true);
-            if (mPutMethod != null)
-                mPutMethod.abort();
-        }
+        mUploadOperation.cancel();
     }
 
 }

+ 0 - 1
src/com/owncloud/android/syncadapter/ContactSyncAdapter.java

@@ -24,7 +24,6 @@ import java.io.IOException;
 import org.apache.http.client.methods.HttpPut;
 import org.apache.http.entity.ByteArrayEntity;
 
-import com.owncloud.android.authentication.AccountAuthenticator;
 import com.owncloud.android.authentication.AccountUtils;
 import com.owncloud.android.oc_framework.accounts.OwnCloudAccount;
 

+ 2 - 3
src/com/owncloud/android/syncadapter/FileSyncAdapter.java

@@ -26,7 +26,6 @@ import java.util.Map;
 
 import org.apache.jackrabbit.webdav.DavException;
 
-import com.owncloud.android.MainApp;
 import com.owncloud.android.R;
 import com.owncloud.android.authentication.AuthenticatorActivity;
 import com.owncloud.android.datamodel.FileDataStorageManager;
@@ -323,8 +322,8 @@ public class FileSyncAdapter extends AbstractOwnCloudSyncAdapter {
     private void fetchChildren(OCFile parent, List<OCFile> files, boolean parentEtagChanged) {
         int i;
         OCFile newFile = null;
-        String etag = null;
-        boolean syncDown = false;
+        //String etag = null;
+        //boolean syncDown = false;
         for (i=0; i < files.size() && !mCancellation; i++) {
             newFile = files.get(i);
             if (newFile.isFolder()) {

+ 0 - 2
src/com/owncloud/android/syncadapter/FileSyncService.java

@@ -17,8 +17,6 @@
  */
 package com.owncloud.android.syncadapter;
 
-import com.owncloud.android.utils.Log_OC;
-
 import android.app.Service;
 import android.content.Intent;
 import android.os.IBinder;

+ 0 - 3
src/com/owncloud/android/ui/activity/Uploader.java

@@ -28,9 +28,6 @@ import java.util.Vector;
 
 import com.owncloud.android.MainApp;
 import com.owncloud.android.R;
-import com.owncloud.android.R.id;
-import com.owncloud.android.R.layout;
-import com.owncloud.android.R.string;
 import com.owncloud.android.authentication.AccountAuthenticator;
 import com.owncloud.android.datamodel.FileDataStorageManager;
 import com.owncloud.android.datamodel.OCFile;

+ 17 - 0
src/com/owncloud/android/utils/FileStorageUtils.java

@@ -97,6 +97,23 @@ public class FileStorageUtils {
         file.setMimetype(remote.getMimeType());
         file.setModificationTimestamp(remote.getModifiedTimestamp());
         file.setEtag(remote.getEtag());
+        
+        return file;
+    }
+    
+    /**
+     * Creates and populates a new {@link RemoteFile} object with the data read from an {@link OCFile}.
+     * 
+     * @param oCFile    OCFile 
+     * @return          New RemoteFile instance representing the resource described by ocFile.
+     */
+    public static RemoteFile fillRemoteFile(OCFile ocFile){
+        RemoteFile file = new RemoteFile(ocFile.getRemotePath());
+        file.setCreationTimestamp(ocFile.getCreationTimestamp());
+        file.setLength(ocFile.getFileLength());
+        file.setMimeType(ocFile.getMimetype());
+        file.setModifiedTimestamp(ocFile.getModificationTimestamp());
+        file.setEtag(ocFile.getEtag());
         return file;
     }