From: David A. Velasco Date: Tue, 21 Jan 2014 14:06:57 +0000 (+0100) Subject: Removed oc_framework from current project X-Git-Tag: oc-android-1.5.5~69^2~8 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/ff62abf9e916f08d1dc3db2a9ebb367e4ec27352?ds=inline;hp=--cc Removed oc_framework from current project --- ff62abf9e916f08d1dc3db2a9ebb367e4ec27352 diff --git a/oc_framework-test-project/.classpath b/oc_framework-test-project/.classpath deleted file mode 100644 index 51769745..00000000 --- a/oc_framework-test-project/.classpath +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/oc_framework-test-project/.project b/oc_framework-test-project/.project deleted file mode 100644 index 66824491..00000000 --- a/oc_framework-test-project/.project +++ /dev/null @@ -1,33 +0,0 @@ - - - ownCloud Android Library Test Project - - - - - - com.android.ide.eclipse.adt.ResourceManagerBuilder - - - - - com.android.ide.eclipse.adt.PreCompilerBuilder - - - - - org.eclipse.jdt.core.javabuilder - - - - - com.android.ide.eclipse.adt.ApkBuilder - - - - - - com.android.ide.eclipse.adt.AndroidNature - org.eclipse.jdt.core.javanature - - diff --git a/oc_framework-test-project/.settings/org.eclipse.jdt.core.prefs b/oc_framework-test-project/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index b080d2dd..00000000 --- a/oc_framework-test-project/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.compliance=1.6 -org.eclipse.jdt.core.compiler.source=1.6 diff --git a/oc_framework-test-project/AndroidManifest.xml b/oc_framework-test-project/AndroidManifest.xml deleted file mode 100644 index 1ce1eb2f..00000000 --- a/oc_framework-test-project/AndroidManifest.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/oc_framework-test-project/assets/fileToUpload.png b/oc_framework-test-project/assets/fileToUpload.png deleted file mode 100644 index 915ec22c..00000000 Binary files a/oc_framework-test-project/assets/fileToUpload.png and /dev/null differ diff --git a/oc_framework-test-project/assets/fileToUploadChunks.MP4 b/oc_framework-test-project/assets/fileToUploadChunks.MP4 deleted file mode 100644 index 2422025e..00000000 Binary files a/oc_framework-test-project/assets/fileToUploadChunks.MP4 and /dev/null differ diff --git a/oc_framework-test-project/ic_launcher-web.png b/oc_framework-test-project/ic_launcher-web.png deleted file mode 100644 index a18cbb48..00000000 Binary files a/oc_framework-test-project/ic_launcher-web.png and /dev/null differ diff --git a/oc_framework-test-project/libs/android-support-v4.jar b/oc_framework-test-project/libs/android-support-v4.jar deleted file mode 100644 index feaf44f8..00000000 Binary files a/oc_framework-test-project/libs/android-support-v4.jar and /dev/null differ diff --git a/oc_framework-test-project/oc_framework-test-test/.classpath b/oc_framework-test-project/oc_framework-test-test/.classpath deleted file mode 100644 index c1044509..00000000 --- a/oc_framework-test-project/oc_framework-test-test/.classpath +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/oc_framework-test-project/oc_framework-test-test/.project b/oc_framework-test-project/oc_framework-test-test/.project deleted file mode 100644 index 60be749d..00000000 --- a/oc_framework-test-project/oc_framework-test-test/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - ownCloud Android Library Tests - - - oc_framework-test-project - - - - com.android.ide.eclipse.adt.ResourceManagerBuilder - - - - - com.android.ide.eclipse.adt.PreCompilerBuilder - - - - - org.eclipse.jdt.core.javabuilder - - - - - com.android.ide.eclipse.adt.ApkBuilder - - - - - - com.android.ide.eclipse.adt.AndroidNature - org.eclipse.jdt.core.javanature - - diff --git a/oc_framework-test-project/oc_framework-test-test/.settings/org.eclipse.jdt.core.prefs b/oc_framework-test-project/oc_framework-test-test/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index b080d2dd..00000000 --- a/oc_framework-test-project/oc_framework-test-test/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.compliance=1.6 -org.eclipse.jdt.core.compiler.source=1.6 diff --git a/oc_framework-test-project/oc_framework-test-test/AndroidManifest.xml b/oc_framework-test-project/oc_framework-test-test/AndroidManifest.xml deleted file mode 100644 index f71a9502..00000000 --- a/oc_framework-test-project/oc_framework-test-test/AndroidManifest.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/oc_framework-test-project/oc_framework-test-test/project.properties b/oc_framework-test-project/oc_framework-test-test/project.properties deleted file mode 100644 index 4ab12569..00000000 --- a/oc_framework-test-project/oc_framework-test-test/project.properties +++ /dev/null @@ -1,14 +0,0 @@ -# This file is automatically generated by Android Tools. -# Do not modify this file -- YOUR CHANGES WILL BE ERASED! -# -# This file must be checked in Version Control Systems. -# -# To customize properties used by the Ant build system edit -# "ant.properties", and override values to adapt the script to your -# project structure. -# -# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): -#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt - -# Project target. -target=android-19 diff --git a/oc_framework-test-project/oc_framework-test-test/res/drawable-hdpi/ic_launcher.png b/oc_framework-test-project/oc_framework-test-test/res/drawable-hdpi/ic_launcher.png deleted file mode 100644 index 96a442e5..00000000 Binary files a/oc_framework-test-project/oc_framework-test-test/res/drawable-hdpi/ic_launcher.png and /dev/null differ diff --git a/oc_framework-test-project/oc_framework-test-test/res/drawable-ldpi/ic_launcher.png b/oc_framework-test-project/oc_framework-test-test/res/drawable-ldpi/ic_launcher.png deleted file mode 100644 index 99238729..00000000 Binary files a/oc_framework-test-project/oc_framework-test-test/res/drawable-ldpi/ic_launcher.png and /dev/null differ diff --git a/oc_framework-test-project/oc_framework-test-test/res/drawable-mdpi/ic_launcher.png b/oc_framework-test-project/oc_framework-test-test/res/drawable-mdpi/ic_launcher.png deleted file mode 100644 index 359047df..00000000 Binary files a/oc_framework-test-project/oc_framework-test-test/res/drawable-mdpi/ic_launcher.png and /dev/null differ diff --git a/oc_framework-test-project/oc_framework-test-test/res/drawable-xhdpi/ic_launcher.png b/oc_framework-test-project/oc_framework-test-test/res/drawable-xhdpi/ic_launcher.png deleted file mode 100644 index 71c6d760..00000000 Binary files a/oc_framework-test-project/oc_framework-test-test/res/drawable-xhdpi/ic_launcher.png and /dev/null differ diff --git a/oc_framework-test-project/oc_framework-test-test/res/values/strings.xml b/oc_framework-test-project/oc_framework-test-test/res/values/strings.xml deleted file mode 100644 index 6061b50f..00000000 --- a/oc_framework-test-project/oc_framework-test-test/res/values/strings.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Oc_framework-testTest - - diff --git a/oc_framework-test-project/oc_framework-test-test/src/com/owncloud/android/lib/test_project/test/CreateFolderTest.java b/oc_framework-test-project/oc_framework-test-test/src/com/owncloud/android/lib/test_project/test/CreateFolderTest.java deleted file mode 100644 index af9677f9..00000000 --- a/oc_framework-test-project/oc_framework-test-test/src/com/owncloud/android/lib/test_project/test/CreateFolderTest.java +++ /dev/null @@ -1,119 +0,0 @@ -/* ownCloud Android Library is available under MIT license - * Copyright (C) 2014 ownCloud (http://www.owncloud.org/) - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * - */ -package com.owncloud.android.lib.test_project.test; - -import java.text.SimpleDateFormat; -import java.util.Date; - -import com.owncloud.android.lib.operations.common.RemoteOperationResult; -import com.owncloud.android.lib.operations.common.RemoteOperationResult.ResultCode; -import com.owncloud.android.lib.test_project.TestActivity; - -import android.test.ActivityInstrumentationTestCase2; - -/** - * Class to test Create Folder Operation - * @author masensio - * - */ -public class CreateFolderTest extends ActivityInstrumentationTestCase2 { - - private TestActivity mActivity; - private String mCurrentDate; - - public CreateFolderTest() { - 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 Create Folder - */ - public void testCreateFolder() { - - String remotePath = "/testCreateFolder" + mCurrentDate; - boolean createFullPath = true; - - RemoteOperationResult result = mActivity.createFolder(remotePath, createFullPath); - assertTrue(result.isSuccess() || result.getCode() == ResultCode.TIMEOUT); - - // Create Subfolder - remotePath = "/testCreateFolder" + mCurrentDate + "/" + "testCreateFolder" + mCurrentDate; - createFullPath = true; - - result = mActivity.createFolder(remotePath, createFullPath); - assertTrue(result.isSuccess() || result.getCode() == ResultCode.TIMEOUT); - } - - - /** - * Test to Create Folder with special characters: / \ < > : " | ? * - */ - public void testCreateFolderSpecialCharacters() { - boolean createFullPath = true; - - String remotePath = "/testSpecialCharacters_\\" + mCurrentDate; - RemoteOperationResult result = mActivity.createFolder(remotePath, createFullPath); - assertTrue(result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME); - - remotePath = "/testSpecialCharacters_<" + mCurrentDate; - result = mActivity.createFolder(remotePath, createFullPath); - assertTrue(result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME); - - remotePath = "/testSpecialCharacters_>" + mCurrentDate; - result = mActivity.createFolder(remotePath, createFullPath); - assertTrue(result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME); - - remotePath = "/testSpecialCharacters_:" + mCurrentDate; - result = mActivity.createFolder(remotePath, createFullPath); - assertTrue(result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME); - - remotePath = "/testSpecialCharacters_\"" + mCurrentDate; - result = mActivity.createFolder(remotePath, createFullPath); - assertTrue(result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME); - - remotePath = "/testSpecialCharacters_|" + mCurrentDate; - result = mActivity.createFolder(remotePath, createFullPath); - assertTrue(result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME); - - remotePath = "/testSpecialCharacters_?" + mCurrentDate; - result = mActivity.createFolder(remotePath, createFullPath); - assertTrue(result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME); - - remotePath = "/testSpecialCharacters_*" + mCurrentDate; - result = mActivity.createFolder(remotePath, createFullPath); - assertTrue(result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME); - } - - -} diff --git a/oc_framework-test-project/oc_framework-test-test/src/com/owncloud/android/lib/test_project/test/DeleteFileTest.java b/oc_framework-test-project/oc_framework-test-test/src/com/owncloud/android/lib/test_project/test/DeleteFileTest.java deleted file mode 100644 index 5edab941..00000000 --- a/oc_framework-test-project/oc_framework-test-test/src/com/owncloud/android/lib/test_project/test/DeleteFileTest.java +++ /dev/null @@ -1,87 +0,0 @@ -/* ownCloud Android Library is available under MIT license - * Copyright (C) 2014 ownCloud (http://www.owncloud.org/) - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * - */ - -package com.owncloud.android.lib.test_project.test; - -import com.owncloud.android.lib.operations.common.RemoteOperationResult; -import com.owncloud.android.lib.operations.common.RemoteOperationResult.ResultCode; -import com.owncloud.android.lib.test_project.TestActivity; - -import android.test.ActivityInstrumentationTestCase2; - -/** - * Class to test Delete a File Operation - * @author masensio - * - */ - -public class DeleteFileTest extends ActivityInstrumentationTestCase2 { - - /* Folder data to delete. */ - private final String mFolderPath = "/folderToDelete"; - - /* File to delete. */ - private final String mFilePath = "fileToDelete.png"; - - private TestActivity mActivity; - - public DeleteFileTest() { - super(TestActivity.class); - - } - - @Override - protected void setUp() throws Exception { - super.setUp(); - setActivityInitialTouchMode(false); - mActivity = getActivity(); - } - - /** - * Test Remove Folder - */ - public void testRemoveFolder() { - - RemoteOperationResult result = mActivity.removeFile(mFolderPath); - assertTrue(result.isSuccess() || result.getCode() == ResultCode.FILE_NOT_FOUND); - } - - /** - * Test Remove File - */ - public void testRemoveFile() { - - RemoteOperationResult result = mActivity.removeFile(mFilePath); - assertTrue(result.isSuccess() || result.getCode() == ResultCode.FILE_NOT_FOUND); - } - - /** - * Restore initial conditions - */ - public void testRestoreInitialConditions() { - RemoteOperationResult result = mActivity.createFolder(mFolderPath, true); - assertTrue(result.isSuccess()); - - } -} diff --git a/oc_framework-test-project/oc_framework-test-test/src/com/owncloud/android/lib/test_project/test/DownloadFileTest.java b/oc_framework-test-project/oc_framework-test-test/src/com/owncloud/android/lib/test_project/test/DownloadFileTest.java deleted file mode 100644 index 2eb523a2..00000000 --- a/oc_framework-test-project/oc_framework-test-test/src/com/owncloud/android/lib/test_project/test/DownloadFileTest.java +++ /dev/null @@ -1,130 +0,0 @@ -/* ownCloud Android Library is available under MIT license - * Copyright (C) 2014 ownCloud (http://www.owncloud.org/) - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * - */ - -package com.owncloud.android.lib.test_project.test; - -import java.text.SimpleDateFormat; -import java.util.Date; - -import com.owncloud.android.lib.operations.common.RemoteFile; -import com.owncloud.android.lib.operations.common.RemoteOperationResult; -import com.owncloud.android.lib.test_project.TestActivity; - -import android.test.ActivityInstrumentationTestCase2; - -/** - * Class to test Download File Operation - * @author masensio - * - */ - -public class DownloadFileTest extends ActivityInstrumentationTestCase2 { - - - /* 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()); - } -} diff --git a/oc_framework-test-project/oc_framework-test-test/src/com/owncloud/android/lib/test_project/test/ReadFileTest.java b/oc_framework-test-project/oc_framework-test-test/src/com/owncloud/android/lib/test_project/test/ReadFileTest.java deleted file mode 100644 index 0c9bd5a3..00000000 --- a/oc_framework-test-project/oc_framework-test-test/src/com/owncloud/android/lib/test_project/test/ReadFileTest.java +++ /dev/null @@ -1,67 +0,0 @@ -/* ownCloud Android Library is available under MIT license - * Copyright (C) 2014 ownCloud (http://www.owncloud.org/) - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * - */ -package com.owncloud.android.lib.test_project.test; - -import com.owncloud.android.lib.operations.common.RemoteOperationResult; -import com.owncloud.android.lib.test_project.TestActivity; - -import android.test.ActivityInstrumentationTestCase2; - -/** - * Class to test Read File Operation - * @author masensio - * - */ - -public class ReadFileTest extends ActivityInstrumentationTestCase2 { - - /* File data to read. This file must exist on the account */ - private final String mRemoteFolderPath = "/fileToRead.txt"; - - - private TestActivity mActivity; - - public ReadFileTest() { - super(TestActivity.class); - } - - @Override - protected void setUp() throws Exception { - super.setUp(); - setActivityInitialTouchMode(false); - mActivity = getActivity(); - } - - /** - * Test Read File - */ - public void testReadFile() { - - RemoteOperationResult result = mActivity.readFile(mRemoteFolderPath); - assertTrue(result.getData().size() == 1); - assertTrue(result.isSuccess()); - } - - -} diff --git a/oc_framework-test-project/oc_framework-test-test/src/com/owncloud/android/lib/test_project/test/ReadFolderTest.java b/oc_framework-test-project/oc_framework-test-test/src/com/owncloud/android/lib/test_project/test/ReadFolderTest.java deleted file mode 100644 index 496ea2c5..00000000 --- a/oc_framework-test-project/oc_framework-test-test/src/com/owncloud/android/lib/test_project/test/ReadFolderTest.java +++ /dev/null @@ -1,69 +0,0 @@ -/* ownCloud Android Library is available under MIT license - * Copyright (C) 2014 ownCloud (http://www.owncloud.org/) - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * - */ - -package com.owncloud.android.lib.test_project.test; - -import com.owncloud.android.lib.operations.common.RemoteOperationResult; -import com.owncloud.android.lib.test_project.TestActivity; - -import android.test.ActivityInstrumentationTestCase2; - -/** - * Class to test Read Folder Operation - * @author masensio - * - */ - -public class ReadFolderTest extends ActivityInstrumentationTestCase2 { - - - /* Folder data to read. This folder must exist on the account */ - private final String mRemoteFolderPath = "/folderToRead"; - - - private TestActivity mActivity; - - public ReadFolderTest() { - super(TestActivity.class); - } - - @Override - protected void setUp() throws Exception { - super.setUp(); - setActivityInitialTouchMode(false); - mActivity = getActivity(); - } - - /** - * Test Read Folder - */ - public void testReadFolder() { - - RemoteOperationResult result = mActivity.readFile(mRemoteFolderPath); - assertTrue(result.getData().size() > 1); - assertTrue(result.getData().size() == 4); - assertTrue(result.isSuccess()); - } - -} diff --git a/oc_framework-test-project/oc_framework-test-test/src/com/owncloud/android/lib/test_project/test/RenameFileTest.java b/oc_framework-test-project/oc_framework-test-test/src/com/owncloud/android/lib/test_project/test/RenameFileTest.java deleted file mode 100644 index 523f3d9b..00000000 --- a/oc_framework-test-project/oc_framework-test-test/src/com/owncloud/android/lib/test_project/test/RenameFileTest.java +++ /dev/null @@ -1,177 +0,0 @@ -/* ownCloud Android Library is available under MIT license - * Copyright (C) 2014 ownCloud (http://www.owncloud.org/) - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * - */ - -package com.owncloud.android.lib.test_project.test; - -import com.owncloud.android.lib.operations.common.RemoteOperationResult; -import com.owncloud.android.lib.operations.common.RemoteOperationResult.ResultCode; -import com.owncloud.android.lib.test_project.TestActivity; - -import android.test.ActivityInstrumentationTestCase2; - -/** - * Class to test Rename File Operation - * @author masensio - * - */ - -public class RenameFileTest extends ActivityInstrumentationTestCase2 { - - /* Folder data to rename. This folder must exist on the account */ - private final String mOldFolderName = "folderToRename"; - private final String mOldFolderPath = "/folderToRename"; - private final String mNewFolderName = "renamedFolder"; - private final String mNewFolderPath = "/renamedFolder"; - - /* File data to rename. This file must exist on the account */ - private final String mOldFileName = "fileToRename.png"; - private final String mOldFilePath = "/fileToRename.png"; - private final String mNewFileName = "renamedFile"; - private final String mFileExtension = ".png"; - private final String mNewFilePath ="/renamedFile.png"; - - - private TestActivity mActivity; - - public RenameFileTest() { - super(TestActivity.class); - - } - - @Override - protected void setUp() throws Exception { - super.setUp(); - setActivityInitialTouchMode(false); - mActivity = getActivity(); - } - - /** - * Test Rename Folder - */ - public void testRenameFolder() { - - RemoteOperationResult result = mActivity.renameFile(mOldFolderName, mOldFolderPath, - mNewFolderName, true); - assertTrue(result.isSuccess()); - } - - /** - * Test Rename Folder with forbidden characters : \ < > : " | ? * - */ - public void testRenameFolderForbiddenChars() { - - RemoteOperationResult result = mActivity.renameFile(mOldFolderName, mOldFolderPath, - mNewFolderName + "\\", true); - assertTrue(result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME); - - result = mActivity.renameFile(mOldFolderName, mOldFolderPath, - mNewFolderName + "<", true); - assertTrue(result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME); - - result = mActivity.renameFile(mOldFolderName, mOldFolderPath, - mNewFolderName + ">", true); - assertTrue(result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME); - - result = mActivity.renameFile(mOldFolderName, mOldFolderPath, - mNewFolderName + ":", true); - assertTrue(result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME); - - result = mActivity.renameFile(mOldFolderName, mOldFolderPath, - mNewFolderName + "\"", true); - assertTrue(result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME); - - result = mActivity.renameFile(mOldFolderName, mOldFolderPath, - mNewFolderName + "|", true); - assertTrue(result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME); - - result = mActivity.renameFile(mOldFolderName, mOldFolderPath, - mNewFolderName + "?", true); - assertTrue(result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME); - - result = mActivity.renameFile(mOldFolderName, mOldFolderPath, - mNewFolderName + "*", true); - assertTrue(result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME); - } - - /** - * Test Rename File - */ - public void testRenameFile() { - RemoteOperationResult result = mActivity.renameFile(mOldFileName, mOldFilePath, - mNewFileName + mFileExtension, false); - assertTrue(result.isSuccess()); - } - - - /** - * Test Rename Folder with forbidden characters: \ < > : " | ? * - */ - public void testRenameFileForbiddenChars() { - RemoteOperationResult result = mActivity.renameFile(mOldFileName, mOldFilePath, - mNewFileName + "\\" + mFileExtension, false); - assertTrue(result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME); - - result = mActivity.renameFile(mOldFileName, mOldFilePath, - mNewFileName + "<" + mFileExtension, false); - assertTrue(result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME); - - result = mActivity.renameFile(mOldFileName, mOldFilePath, - mNewFileName + ">" + mFileExtension, false); - assertTrue(result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME); - - result = mActivity.renameFile(mOldFileName, mOldFilePath, - mNewFileName + ":" + mFileExtension, false); - assertTrue(result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME); - - result = mActivity.renameFile(mOldFileName, mOldFilePath, - mNewFileName + "\"" + mFileExtension, false); - assertTrue(result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME); - - result = mActivity.renameFile(mOldFileName, mOldFilePath, - mNewFileName + "|" + mFileExtension, false); - assertTrue(result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME); - - result = mActivity.renameFile(mOldFileName, mOldFilePath, - mNewFileName + "?" + mFileExtension, false); - assertTrue(result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME); - - result = mActivity.renameFile(mOldFileName, mOldFilePath, - mNewFileName + "*" + mFileExtension, false); - assertTrue(result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME); - - } - - - /** - * Restore initial conditions - */ - public void testRestoreInitialConditions() { - RemoteOperationResult result = mActivity.renameFile(mNewFolderName, mNewFolderPath, mOldFolderName, true); - assertTrue(result.isSuccess()); - - result = mActivity.renameFile(mNewFileName + mFileExtension, mNewFilePath, mOldFileName, false); - assertTrue(result.isSuccess()); - } - -} diff --git a/oc_framework-test-project/oc_framework-test-test/src/com/owncloud/android/lib/test_project/test/UploadFileTest.java b/oc_framework-test-project/oc_framework-test-test/src/com/owncloud/android/lib/test_project/test/UploadFileTest.java deleted file mode 100644 index 4c862556..00000000 --- a/oc_framework-test-project/oc_framework-test-test/src/com/owncloud/android/lib/test_project/test/UploadFileTest.java +++ /dev/null @@ -1,168 +0,0 @@ -/* ownCloud Android Library is available under MIT license - * Copyright (C) 2014 ownCloud (http://www.owncloud.org/) - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * - */ - -package com.owncloud.android.lib.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.lib.operations.common.RemoteOperationResult; -import com.owncloud.android.lib.test_project.TestActivity; - -/** - * Class to test Update File Operation - * @author masensio - * - */ - -public class UploadFileTest extends ActivityInstrumentationTestCase2 { - - /* 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()); - } - -} diff --git a/oc_framework-test-project/project.properties b/oc_framework-test-project/project.properties deleted file mode 100644 index 153d36b6..00000000 --- a/oc_framework-test-project/project.properties +++ /dev/null @@ -1,15 +0,0 @@ -# This file is automatically generated by Android Tools. -# Do not modify this file -- YOUR CHANGES WILL BE ERASED! -# -# This file must be checked in Version Control Systems. -# -# To customize properties used by the Ant build system edit -# "ant.properties", and override values to adapt the script to your -# project structure. -# -# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): -#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt - -# Project target. -target=android-19 -android.library.reference.1=../oc_framework diff --git a/oc_framework-test-project/res/drawable-hdpi/ic_launcher.png b/oc_framework-test-project/res/drawable-hdpi/ic_launcher.png deleted file mode 100644 index 288b6655..00000000 Binary files a/oc_framework-test-project/res/drawable-hdpi/ic_launcher.png and /dev/null differ diff --git a/oc_framework-test-project/res/drawable-mdpi/ic_launcher.png b/oc_framework-test-project/res/drawable-mdpi/ic_launcher.png deleted file mode 100644 index 6ae570b4..00000000 Binary files a/oc_framework-test-project/res/drawable-mdpi/ic_launcher.png and /dev/null differ diff --git a/oc_framework-test-project/res/drawable-xhdpi/ic_launcher.png b/oc_framework-test-project/res/drawable-xhdpi/ic_launcher.png deleted file mode 100644 index d4fb7cd9..00000000 Binary files a/oc_framework-test-project/res/drawable-xhdpi/ic_launcher.png and /dev/null differ diff --git a/oc_framework-test-project/res/drawable-xxhdpi/ic_launcher.png b/oc_framework-test-project/res/drawable-xxhdpi/ic_launcher.png deleted file mode 100644 index 85a60815..00000000 Binary files a/oc_framework-test-project/res/drawable-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/oc_framework-test-project/res/layout/activity_test.xml b/oc_framework-test-project/res/layout/activity_test.xml deleted file mode 100644 index 6b03fd8b..00000000 --- a/oc_framework-test-project/res/layout/activity_test.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - diff --git a/oc_framework-test-project/res/menu/test.xml b/oc_framework-test-project/res/menu/test.xml deleted file mode 100644 index bc80b56c..00000000 --- a/oc_framework-test-project/res/menu/test.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - diff --git a/oc_framework-test-project/res/values-sw600dp/dimens.xml b/oc_framework-test-project/res/values-sw600dp/dimens.xml deleted file mode 100644 index 59ffe371..00000000 --- a/oc_framework-test-project/res/values-sw600dp/dimens.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - diff --git a/oc_framework-test-project/res/values-sw720dp-land/dimens.xml b/oc_framework-test-project/res/values-sw720dp-land/dimens.xml deleted file mode 100644 index 730c8393..00000000 --- a/oc_framework-test-project/res/values-sw720dp-land/dimens.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - 128dp - - diff --git a/oc_framework-test-project/res/values-v11/styles.xml b/oc_framework-test-project/res/values-v11/styles.xml deleted file mode 100644 index b5df882f..00000000 --- a/oc_framework-test-project/res/values-v11/styles.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - diff --git a/oc_framework-test-project/res/values-v14/styles.xml b/oc_framework-test-project/res/values-v14/styles.xml deleted file mode 100644 index 7679e467..00000000 --- a/oc_framework-test-project/res/values-v14/styles.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - diff --git a/oc_framework-test-project/res/values/dimens.xml b/oc_framework-test-project/res/values/dimens.xml deleted file mode 100644 index de6ebd47..00000000 --- a/oc_framework-test-project/res/values/dimens.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - 16dp - 16dp - - diff --git a/oc_framework-test-project/res/values/strings.xml b/oc_framework-test-project/res/values/strings.xml deleted file mode 100644 index 3cc111d8..00000000 --- a/oc_framework-test-project/res/values/strings.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - oc_framework-test-project - Settings - Hello world! - The test account %1$s could not be found in the device - - diff --git a/oc_framework-test-project/res/values/styles.xml b/oc_framework-test-project/res/values/styles.xml deleted file mode 100644 index 62686586..00000000 --- a/oc_framework-test-project/res/values/styles.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - diff --git a/oc_framework-test-project/src/com/owncloud/android/lib/test_project/TestActivity.java b/oc_framework-test-project/src/com/owncloud/android/lib/test_project/TestActivity.java deleted file mode 100644 index d6caf3c6..00000000 --- a/oc_framework-test-project/src/com/owncloud/android/lib/test_project/TestActivity.java +++ /dev/null @@ -1,174 +0,0 @@ -/* 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 . - * - */ - -package com.owncloud.android.lib.test_project; - -import java.io.File; - -import com.owncloud.android.lib.network.OwnCloudClientFactory; -import com.owncloud.android.lib.network.OwnCloudClient; -import com.owncloud.android.lib.operations.common.RemoteFile; -import com.owncloud.android.lib.operations.common.RemoteOperationResult; -import com.owncloud.android.lib.operations.remote.ChunkedUploadRemoteFileOperation; -import com.owncloud.android.lib.operations.remote.CreateRemoteFolderOperation; -import com.owncloud.android.lib.operations.remote.DownloadRemoteFileOperation; -import com.owncloud.android.lib.operations.remote.ReadRemoteFolderOperation; -import com.owncloud.android.lib.operations.remote.RemoveRemoteFileOperation; -import com.owncloud.android.lib.operations.remote.RenameRemoteFileOperation; -import com.owncloud.android.lib.operations.remote.UploadRemoteFileOperation; -import com.owncloud.android.lib.test_project.R; - -import android.net.Uri; -import android.os.Bundle; -import android.os.Environment; -import android.app.Activity; -import android.view.Menu; - -/** - * Activity to test OC framework - * @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 OwnCloudClient mClient; - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_test); - Uri uri = Uri.parse(mServerUri); - mClient = OwnCloudClientFactory.createOwnCloudClient(uri ,getApplicationContext(), true); - mClient.setBasicCredentials(mUser, mPass); - } - - @Override - public boolean onCreateOptionsMenu(Menu menu) { - // Inflate the menu; this adds items to the action bar if it is present. - getMenuInflater().inflate(R.menu.test, menu); - return true; - } - - /** - * Access to the library method to Create a Folder - * @param remotePath Full path to the new directory to create in the remote server. - * @param createFullPath 'True' means that all the ancestor folders should be created if don't exist yet. - * - * @return - */ - public RemoteOperationResult createFolder(String remotePath, boolean createFullPath) { - - CreateRemoteFolderOperation createOperation = new CreateRemoteFolderOperation(remotePath, createFullPath); - RemoteOperationResult result = createOperation.execute(mClient); - - return result; - } - - /** - * Access to the library method to Rename a File or Folder - * @param oldName Old name of the file. - * @param oldRemotePath Old remote path of the file. For folders it starts and ends by "/" - * @param newName New name to set as the name of file. - * @param isFolder 'true' for folder and 'false' for files - * - * @return - */ - - public RemoteOperationResult renameFile(String oldName, String oldRemotePath, String newName, boolean isFolder) { - - RenameRemoteFileOperation renameOperation = new RenameRemoteFileOperation(oldName, oldRemotePath, newName, isFolder); - RemoteOperationResult result = renameOperation.execute(mClient); - - return result; - } - - /** - * Access to the library method to Remove a File or Folder - * - * @param remotePath Remote path of the file or folder in the server. - * @return - */ - public RemoteOperationResult removeFile(String remotePath) { - - RemoveRemoteFileOperation removeOperation = new RemoveRemoteFileOperation(remotePath); - RemoteOperationResult result = removeOperation.execute(mClient); - - return result; - } - - /** - * Access to the library method to Read a Folder (PROPFIND DEPTH 1) - * @param remotePath - * - * @return - */ - public RemoteOperationResult readFile(String remotePath) { - - ReadRemoteFolderOperation readOperation= new ReadRemoteFolderOperation(remotePath); - RemoteOperationResult result = readOperation.execute(mClient); - - 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.getRemotePath(), 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; - } -} diff --git a/oc_framework/.classpath b/oc_framework/.classpath deleted file mode 100644 index 51769745..00000000 --- a/oc_framework/.classpath +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/oc_framework/.project b/oc_framework/.project deleted file mode 100644 index 4b5c2951..00000000 --- a/oc_framework/.project +++ /dev/null @@ -1,33 +0,0 @@ - - - ownCloud Android Library - - - - - - com.android.ide.eclipse.adt.ResourceManagerBuilder - - - - - com.android.ide.eclipse.adt.PreCompilerBuilder - - - - - org.eclipse.jdt.core.javabuilder - - - - - com.android.ide.eclipse.adt.ApkBuilder - - - - - - com.android.ide.eclipse.adt.AndroidNature - org.eclipse.jdt.core.javanature - - diff --git a/oc_framework/.settings/org.eclipse.jdt.core.prefs b/oc_framework/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index b080d2dd..00000000 --- a/oc_framework/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.compliance=1.6 -org.eclipse.jdt.core.compiler.source=1.6 diff --git a/oc_framework/AndroidManifest.xml b/oc_framework/AndroidManifest.xml deleted file mode 100644 index 30dda12f..00000000 --- a/oc_framework/AndroidManifest.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - diff --git a/oc_framework/build.xml b/oc_framework/build.xml deleted file mode 100644 index 6b112f43..00000000 --- a/oc_framework/build.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/oc_framework/libs/commons-httpclient-3.1.jar b/oc_framework/libs/commons-httpclient-3.1.jar deleted file mode 100755 index 7c59774a..00000000 Binary files a/oc_framework/libs/commons-httpclient-3.1.jar and /dev/null differ diff --git a/oc_framework/libs/jackrabbit-webdav-2.7.2.jar b/oc_framework/libs/jackrabbit-webdav-2.7.2.jar deleted file mode 100755 index 6ebfbf70..00000000 Binary files a/oc_framework/libs/jackrabbit-webdav-2.7.2.jar and /dev/null differ diff --git a/oc_framework/libs/slf4j-api-1.7.5.jar b/oc_framework/libs/slf4j-api-1.7.5.jar deleted file mode 100755 index 8f004d39..00000000 Binary files a/oc_framework/libs/slf4j-api-1.7.5.jar and /dev/null differ diff --git a/oc_framework/pom.xml b/oc_framework/pom.xml deleted file mode 100755 index e811ffda..00000000 --- a/oc_framework/pom.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - 4.0.0 - com.owncloud.android - oc_framework - ${owncloud.version} - jar - oc_framework for Owncloud Android - - - 1.5.1-SNAPSHOT - 1.6 - - 4.4_r1 - - 19 - - - oc_framwork for Owncloud for Android - - - - - android - android - ${google.android-version} - provided - - - - org.apache.jackrabbit - jackrabbit-webdav - 2.7.2 - - - - - - ${project.artifactId} - - src - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.0 - - ${java-version} - ${java-version} - - - - - com.jayway.maven.plugins.android.generation2 - android-maven-plugin - 3.8.0 - - - ${env.ANDROID_HOME} - ${google.android-api} - - - true - - - - - - - - diff --git a/oc_framework/project.properties b/oc_framework/project.properties deleted file mode 100644 index 91d2b024..00000000 --- a/oc_framework/project.properties +++ /dev/null @@ -1,15 +0,0 @@ -# This file is automatically generated by Android Tools. -# Do not modify this file -- YOUR CHANGES WILL BE ERASED! -# -# This file must be checked in Version Control Systems. -# -# To customize properties used by the Ant build system edit -# "ant.properties", and override values to adapt the script to your -# project structure. -# -# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): -#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt - -# Project target. -target=android-19 -android.library=true diff --git a/oc_framework/res/values/empty.xml b/oc_framework/res/values/empty.xml deleted file mode 100644 index bddce4c9..00000000 --- a/oc_framework/res/values/empty.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - diff --git a/oc_framework/sample_client/.classpath b/oc_framework/sample_client/.classpath deleted file mode 100644 index 7bc01d9a..00000000 --- a/oc_framework/sample_client/.classpath +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/oc_framework/sample_client/.project b/oc_framework/sample_client/.project deleted file mode 100644 index d1b87431..00000000 --- a/oc_framework/sample_client/.project +++ /dev/null @@ -1,33 +0,0 @@ - - - ownCloud Sample Client - - - - - - com.android.ide.eclipse.adt.ResourceManagerBuilder - - - - - com.android.ide.eclipse.adt.PreCompilerBuilder - - - - - org.eclipse.jdt.core.javabuilder - - - - - com.android.ide.eclipse.adt.ApkBuilder - - - - - - com.android.ide.eclipse.adt.AndroidNature - org.eclipse.jdt.core.javanature - - diff --git a/oc_framework/sample_client/AndroidManifest.xml b/oc_framework/sample_client/AndroidManifest.xml deleted file mode 100644 index 6b406176..00000000 --- a/oc_framework/sample_client/AndroidManifest.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/oc_framework/sample_client/ant.properties b/oc_framework/sample_client/ant.properties deleted file mode 100644 index b0971e89..00000000 --- a/oc_framework/sample_client/ant.properties +++ /dev/null @@ -1,17 +0,0 @@ -# This file is used to override default values used by the Ant build system. -# -# This file must be checked into Version Control Systems, as it is -# integral to the build system of your project. - -# This file is only used by the Ant script. - -# You can use this to override default values such as -# 'source.dir' for the location of your java source folder and -# 'out.dir' for the location of your output folder. - -# You can also use it define how the release builds are signed by declaring -# the following properties: -# 'key.store' for the location of your keystore and -# 'key.alias' for the name of the key to use. -# The password will be asked during the build when you use the 'release' target. - diff --git a/oc_framework/sample_client/assets/oc_sample.png b/oc_framework/sample_client/assets/oc_sample.png deleted file mode 100644 index 31a346cf..00000000 Binary files a/oc_framework/sample_client/assets/oc_sample.png and /dev/null differ diff --git a/oc_framework/sample_client/build.xml b/oc_framework/sample_client/build.xml deleted file mode 100644 index a10a9149..00000000 --- a/oc_framework/sample_client/build.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/oc_framework/sample_client/project.properties b/oc_framework/sample_client/project.properties deleted file mode 100644 index f3419563..00000000 --- a/oc_framework/sample_client/project.properties +++ /dev/null @@ -1,15 +0,0 @@ -# This file is automatically generated by Android Tools. -# Do not modify this file -- YOUR CHANGES WILL BE ERASED! -# -# This file must be checked in Version Control Systems. -# -# To customize properties used by the Ant build system edit -# "ant.properties", and override values to adapt the script to your -# project structure. -# -# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): -#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt - -# Project target. -target=android-19 -android.library.reference.1=.. diff --git a/oc_framework/sample_client/res/drawable-hdpi/ic_launcher.png b/oc_framework/sample_client/res/drawable-hdpi/ic_launcher.png deleted file mode 100644 index 6fe153bb..00000000 Binary files a/oc_framework/sample_client/res/drawable-hdpi/ic_launcher.png and /dev/null differ diff --git a/oc_framework/sample_client/res/drawable-ldpi/ic_launcher.png b/oc_framework/sample_client/res/drawable-ldpi/ic_launcher.png deleted file mode 100644 index 1bc470be..00000000 Binary files a/oc_framework/sample_client/res/drawable-ldpi/ic_launcher.png and /dev/null differ diff --git a/oc_framework/sample_client/res/drawable-mdpi/ic_launcher.png b/oc_framework/sample_client/res/drawable-mdpi/ic_launcher.png deleted file mode 100644 index 9008b9d3..00000000 Binary files a/oc_framework/sample_client/res/drawable-mdpi/ic_launcher.png and /dev/null differ diff --git a/oc_framework/sample_client/res/layout/file_in_list.xml b/oc_framework/sample_client/res/layout/file_in_list.xml deleted file mode 100644 index a3552483..00000000 --- a/oc_framework/sample_client/res/layout/file_in_list.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - diff --git a/oc_framework/sample_client/res/layout/main.xml b/oc_framework/sample_client/res/layout/main.xml deleted file mode 100644 index 816c465f..00000000 --- a/oc_framework/sample_client/res/layout/main.xml +++ /dev/null @@ -1,122 +0,0 @@ - - - - - -