[Pkg-owncloud-commits] [owncloud-doc] 46/60: Convert Android examples, more markup fixes
David Prévot
taffit at moszumanska.debian.org
Tue Feb 25 19:06:57 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud-doc.
commit be4578bf9137346145268a6a8535f8309e843a50
Author: Daniel Molkentin <daniel at molkentin.de>
Date: Thu Feb 20 11:29:27 2014 +0100
Convert Android examples, more markup fixes
---
developer_manual/android_library/examples.rst | 1082 ++++----------------
.../ios_library/library_installation.rst | 22 +-
2 files changed, 222 insertions(+), 882 deletions(-)
diff --git a/developer_manual/android_library/examples.rst b/developer_manual/android_library/examples.rst
index 82199c3..e535125 100644
--- a/developer_manual/android_library/examples.rst
+++ b/developer_manual/android_library/examples.rst
@@ -35,6 +35,7 @@ Code example
// Activity or Service context
true);
+
Set credentials
---------------
@@ -52,16 +53,14 @@ Code example
package com.owncloud.android.lib.common;
public class OwnCloudClient extends HttpClient {
-
- ...
-
- // Set basic credentials
- client.setBasicCredentials(username, password);
- // Set bearer access token
- client.setBearerCredentials(accessToken);
- // Set session cookie
- client.setSsoSessionCookie(cookie);
-
+ ...
+ // Set basic credentials
+ client.setBasicCredentials(username, password);
+ // Set bearer access token
+ client.setBearerCredentials(accessToken);
+ // Set session cookie
+ client.setSsoSessionCookie(cookie);
+ }
Create a folder
---------------
@@ -71,67 +70,23 @@ of the new folder.
Code example
~~~~~~~~~~~~
+
+.. code-block:: java
-+----------------------------------------------------+
-| |
-| **private** |
-| |
-| **void** |
-| |
-| startFolderCreation(String newFolderPath) { |
-| |
-| CreateRemoteFolderOperation createOperation = |
-| |
-| **new** |
-| |
-| CreateRemoteFolderOperation(newFolderPath, |
-| **false** |
-| ); |
-| |
-| createOperation.execute( |
-| mClient |
-| , |
-| **this** |
-| , |
-| mHandler |
-| ); |
-| |
-| } |
-| |
-| |
-| @Override |
-| |
-| **public** |
-| |
-| **void** |
-| |
-| onRemoteOperationFinish(RemoteOperation operation, |
-| |
-| RemoteOperationResult result) { |
-| |
-| **if** |
-| |
-| (operation |
-| **instanceof** |
-| |
-| CreateRemoteFolderOperation) { |
-| |
-| **if** |
-| |
-| (result.isSuccess()) { |
-| |
-| // do your stuff here |
-| |
-| } |
-| |
-| } |
-| |
-| … |
-| |
-| } |
-| |
-+----------------------------------------------------+
-
+ private void startFolderCreation(String newFolderPath) {
+ CreateRemoteFolderOperation createOperation = new CreateRemoteFolderOperation(newFolderPath, false);
+ createOperation.execute( mClient , this , mHandler);
+ }
+
+ @Override
+ public void onRemoteOperationFinish(RemoteOperation operation, RemoteOperationResult result) {
+ if (operation instanceof CreateRemoteFolderOperation) {
+ if (result.isSuccess()) {
+ // do your stuff here
+ }
+ }
+ …
+ }
Read folder
-----------
@@ -144,144 +99,52 @@ array with all the files and folders stored in the selected folder.
Code example
~~~~~~~~~~~~
-+-----------------------------------------------------+
-| **private** |
-| |
-| **void** |
-| |
-| startReadRootFolder() { |
-| |
-| ReadRemoteFolderOperation |
-| |
-| refreshOperation = |
-| |
-| **new** |
-| |
-| ReadRemoteFolderOperation |
-| (FileUtils. |
-| *PATH_SEPARATOR* |
-| ); |
-| // root folder |
-| |
-| refreshOperation.execute( |
-| mClient |
-| , |
-| **this** |
-| , |
-| mHandler |
-| ); |
-| |
-| } |
-| |
-| |
-| @Override |
-| |
-| **public** |
-| |
-| **void** |
-| |
-| onRemoteOperationFinish( RemoteOperation operation, |
-| |
-| RemoteOperationResult result) { |
-| |
-| **if** |
-| |
-| (operation |
-| **instanceof** |
-| |
-| ReadRemoteFolderOperation) { |
-| |
-| **if** |
-| |
-| (result.isSuccess()) { |
-| |
-| List< |
-| RemoteFile |
-| > files = result.getData(); |
-| |
-| // do your stuff here |
-| |
-| } |
-| |
-| } |
-| |
-| … |
-| |
-| } |
-| |
-+-----------------------------------------------------+
+.. code-block:: java
+
+ private void startReadRootFolder() {
+ ReadRemoteFolderOperation refreshOperation = new ReadRemoteFolderOperation(FileUtils.PATH_SEPARATOR);
+ // root folder
+ refreshOperation.execute(mClient, this, mHandler);
+ }
+
+ @Override
+ public void onRemoteOperationFinish(RemoteOperation operation, RemoteOperationResult result) {
+ if (operation instanceof ReadRemoteFolderOperation) {
+ if (result.isSuccess()) {
+ List< RemoteFile > files = result.getData();
+ // do your stuff here
+ }
+ }
+ …
+ }
Read file
---------
-Get information related to a certain file or folder, information obtained is: :
-filePath, filename, isDirectory, size and date
+Get information related to a certain file or folder, information obtained is:
+``filePath``, ``filename``, ``isDirectory``, ``size`` and ``date``.
Code example
~~~~~~~~~~~~
-+-----------------------------------------------------+
-| |
-| **private** |
-| |
-| **void** |
-| |
-| startReadFileProperties |
-| (String filePath) { |
-| |
-| ReadRemoteFileOperation readOperation = |
-| **new** |
-| |
-| ReadRemoteFileOperation(filePath); |
-| |
-| readOperation.execute( |
-| mClient |
-| , |
-| **this** |
-| , |
-| mHandler |
-| ); |
-| |
-| } |
-| |
-| @Override |
-| |
-| **public** |
-| |
-| **void** |
-| |
-| onRemoteOperationFinish( RemoteOperation operation, |
-| |
-| RemoteOperationResult result) { |
-| |
-| **if** |
-| |
-| (operation |
-| **instanceof** |
-| |
-| ReadRemoteFileOperation) { |
-| |
-| **if** |
-| |
-| (result.isSuccess()) { |
-| |
-| RemoteFile |
-| file = result.getData()[0]; |
-| |
-| // do your stuff here |
-| |
-| } |
-| |
-| } |
-| … |
-| |
-| } |
-| |
-+-----------------------------------------------------+
-
-
+.. code-block:: java
+ private void startReadFileProperties(String filePath) {
+ ReadRemoteFileOperation readOperation = new ReadRemoteFileOperation(filePath);
+ readOperation.execute(mClient, this, mHandler);
+ }
+
+ @Override
+ public void onRemoteOperationFinish(RemoteOperation operation, RemoteOperationResult result) {
+ if (operation instanceof ReadRemoteFileOperation) {
+ if (result.isSuccess()) {
+ RemoteFile file = result.getData()[0];
+ // do your stuff here
+ }
+ }
+ …
+ }
Delete file or folder
---------------------
@@ -292,62 +155,22 @@ folder/file to be deleted.
Code example
~~~~~~~~~~~~
-+----------------------------------------------------+
-| |
-| **private** |
-| |
-| **void** |
-| |
-| startRemoveFile(String filePath) { |
-| |
-| RemoveRemoteFileOperation removeOperation = |
-| **new** |
-| ** ** |
-| RemoveRemoteFileOperation(remotePath); |
-| |
-| *removeOperation* |
-| .execute( |
-| *mClient* |
-| , |
-| **this** |
-| , |
-| mHandler |
-| ); |
-| |
-| } |
-| |
-| @Override |
-| |
-| **public** |
-| |
-| **void** |
-| |
-| onRemoteOperationFinish(RemoteOperation operation, |
-| |
-| RemoteOperationResult result) { |
-| |
-| **if** |
-| |
-| (operation |
-| **instanceof** |
-| |
-| RemoveRemoteFileOperation) { |
-| |
-| **if** |
-| |
-| (result.isSuccess()) { |
-| |
-| // do your stuff here |
-| |
-| } |
-| |
-| } |
-| |
-| … |
-| |
-| } |
-| |
-+----------------------------------------------------+
+.. code-block:: java
+
+ private void startRemoveFile(String filePath) {
+ RemoveRemoteFileOperation removeOperation = new RemoveRemoteFileOperation(remotePath);
+ removeOperation.execute( mClient , this , mHandler);
+ }
+
+ @Override
+ public void onRemoteOperationFinish(RemoteOperation operation, RemoteOperationResult result) {
+ if (operation instanceof RemoveRemoteFileOperation) {
+ if (result.isSuccess()) {
+ // do your stuff here
+ }
+ }
+ …
+ }
Download a file
@@ -360,113 +183,32 @@ the device.
Code example
~~~~~~~~~~~~
+.. code-block:: java
-+---------------------------------------------------------------------------+
-| |
-| |
-| |
-| **private** |
-| |
-| **void** |
-| |
-| startDownload(String filePath, File targetDirectory) { |
-| |
-| DownloadRemoteFileOperation downloadOperation = |
-| |
-| **new** |
-| |
-| DownloadRemoteFileOperation(filePath, targetDirectory.getAbsolutePath()); |
-| |
-| downloadOperation.addDatatransferProgressListener( |
-| **this** |
-| ); |
-| |
-| downloadOperation.execute( |
-| mClient |
-| , |
-| **this** |
-| , |
-| mHandler |
-| ); |
-| |
-| } |
-| |
-| @Override |
-| |
-| **public** |
-| |
-| **void** |
-| |
-| onRemoteOperationFinish( RemoteOperation operation, |
-| |
-| RemoteOperationResult result) { |
-| |
-| **if** |
-| |
-| (operation |
-| **instanceof** |
-| |
-| DownloadRemoteFileOperation) { |
-| |
-| **if** |
-| |
-| (result.isSuccess()) { |
-| |
-| // do your stuff here |
-| |
-| } |
-| |
-| } |
-| |
-| } |
-| |
-| @ |
-| Override |
-| |
-| **public** |
-| |
-| **void** |
-| |
-| onTransferProgress( |
-| **long** |
-| |
-| progressRate, |
-| |
-| **long** |
-| |
-| totalTransferredSoFar, |
-| |
-| **long** |
-| |
-| totalToTransfer, |
-| |
-| String fileName) { |
-| |
-| |
-| mHandler |
-| .post( |
-| **new** |
-| |
-| Runnable() { |
-| |
-| @ |
-| Override |
-| |
-| **public** |
-| |
-| **void** |
-| |
-| run() { |
-| |
-| // do your UI updates about progress here |
-| |
-| } |
-| |
-| }); |
-| |
-| } |
-| |
-+---------------------------------------------------------------------------+
+ private void startDownload(String filePath, File targetDirectory) {
+ DownloadRemoteFileOperation downloadOperation = new DownloadRemoteFileOperation(filePath, targetDirectory.getAbsolutePath());
+ downloadOperation.addDatatransferProgressListener(this);
+ downloadOperation.execute( mClient, this, mHandler);
+ }
+
+ @Override
+ public void onRemoteOperationFinish( RemoteOperation operation, RemoteOperationResult result) {
+ if (operation instanceof DownloadRemoteFileOperation) {
+ if (result.isSuccess()) {
+ // do your stuff here
+ }
+ }
+ }
+
+ @Override
+ public void onTransferProgress( long progressRate, long totalTransferredSoFar, long totalToTransfer, String fileName) {
+ mHandler.post( new Runnable() {
+ @Override
+ public void run() {
+ // do your UI updates about progress here
+ }
+ });
+ }
Upload a file
-------------
@@ -478,118 +220,32 @@ stored on the server and mimeType.
Code example
~~~~~~~~~~~~
+.. code-block:: java
-+-----------------------------------------------------------+
-| |
-| **private** |
-| |
-| **void** |
-| |
-| startUpload |
-| (File fileToUpload, String remotePath, String mimeType) { |
-| |
-| UploadRemoteFileOperation uploadOperation = |
-| **new** |
-| |
-| UploadRemoteFileOperation( |
-| |
-| fileToUpload.getAbsolutePath(), |
-| |
-| remotePath, |
-| |
-| mimeType); |
-| |
-| uploadOperation.addDatatransferProgressListener( |
-| **this** |
-| ); |
-| |
-| uploadOperation.execute( |
-| mClient |
-| , |
-| **this** |
-| , |
-| mHandler |
-| ); |
-| |
-| } |
-| |
-| @Override |
-| |
-| **public** |
-| |
-| **void** |
-| |
-| onRemoteOperationFinish(RemoteOperation operation, |
-| |
-| RemoteOperationResult result) { |
-| |
-| **if** |
-| |
-| (operation |
-| **instanceof** |
-| |
-| UploadRemoteFileOperation) { |
-| |
-| **if** |
-| |
-| (result.isSuccess()) { |
-| |
-| // do your stuff here |
-| |
-| } |
-| |
-| } |
-| |
-| } |
-| |
-| @ |
-| Override |
-| |
-| **public** |
-| |
-| **void** |
-| |
-| onTransferProgress( |
-| **long** |
-| |
-| progressRate, |
-| |
-| **long** |
-| |
-| totalTransferredSoFar, |
-| |
-| **long** |
-| |
-| totalToTransfer, |
-| |
-| String fileName) { |
-| |
-| |
-| mHandler |
-| .post( |
-| **new** |
-| |
-| Runnable() { |
-| |
-| @ |
-| Override |
-| |
-| **public** |
-| |
-| **void** |
-| |
-| run() { |
-| |
-| // do your UI updates about progress here |
-| |
-| } |
-| |
-| }); |
-| |
-| } |
-| |
-+-----------------------------------------------------------+
-
+ private void startUpload (File fileToUpload, String remotePath, String mimeType) {
+ UploadRemoteFileOperation uploadOperation = new UploadRemoteFileOperation( fileToUpload.getAbsolutePath(), remotePath, mimeType);
+ uploadOperation.addDatatransferProgressListener(this);
+ uploadOperation.execute(mClient, this, mHandler);
+ }
+
+ @Override
+ public void onRemoteOperationFinish(RemoteOperation operation, RemoteOperationResult result) {
+ if (operation instanceof UploadRemoteFileOperation) {
+ if (result.isSuccess()) {
+ // do your stuff here
+ }
+ }
+ }
+
+ @Override
+ public void onTransferProgress(long progressRate, long totalTransferredSoFar, long totalToTransfer, String fileName) {
+ mHandler.post( new Runnable() {
+ @Override
+ public void run() {
+ // do your UI updates about progress here
+ }
+ });
+ }
Read shared items by link
-------------------------
@@ -600,86 +256,25 @@ mClient contains the information about the server url and account)
Code example
~~~~~~~~~~~~
+.. code-block:: java
-+------------------------------------------------------------------------+
-| |
-| **private** |
-| |
-| **void** |
-| |
-| startAllSharesRetrieval() { |
-| |
-| GetRemoteSharesOperation getSharesOp = new GetRemoteSharesOperation(); |
-| |
-| getSharesOp.execute( |
-| mClient |
-| , |
-| **this** |
-| , |
-| mHandler |
-| ); |
-| |
-| } |
-| |
-| @Override |
-| |
-| **public** |
-| |
-| **void** |
-| |
-| onRemoteOperationFinish( RemoteOperation operation, |
-| |
-| RemoteOperationResult result) { |
-| |
-| **if** |
-| |
-| (operation |
-| **instanceof** |
-| |
-| GetRemoteSharesOperation) { |
-| |
-| **if** |
-| |
-| (result.isSuccess()) { |
-| |
-| ArrayList< |
-| OCShare |
-| > shares = |
-| **new** |
-| |
-| ArrayList< |
-| OCShare |
-| >(); |
-| |
-| **for** |
-| (Object obj: result.getData()) { |
-| |
-| shares.add(( |
-| OCShare |
-| ) obj); |
-| |
-| } |
-| |
-| // do your stuff here |
-| |
-| } |
-| |
-| } |
-| |
-| } |
-| |
-+------------------------------------------------------------------------+
-
-
-
-
-
-
-
-
-
-
-
+ private void startAllSharesRetrieval() {
+ GetRemoteSharesOperation getSharesOp = new GetRemoteSharesOperation();
+ getSharesOp.execute( mClient , this , mHandler);
+ }
+
+ @Override
+ public void onRemoteOperationFinish( RemoteOperation operation, RemoteOperationResult result) {
+ if (operation instanceof GetRemoteSharesOperation) {
+ if (result.isSuccess()) {
+ ArrayList< OCShare > shares = new ArrayList< OCShare >();
+ for (Object obj: result.getData()) {
+ shares.add(( OCShare) obj);
+ }
+ // do your stuff here
+ }
+ }
+ }
Get the share resources for a given file or folder
--------------------------------------------------
@@ -693,114 +288,30 @@ not in use within the ownCloud Android library.
Code example
~~~~~~~~~~~~
+.. code-block:: java
-+----------------------------------------------------------+
-| |
-| **private** |
-| |
-| **void** |
-| |
-| startSharesRetrievalForFileOrFolder(String filePath, |
-| **boolean** |
-| |
-| getReshares) { |
-| |
-| GeteRemoteSharesForFileOperation operation = |
-| **new** |
-| |
-| |
-| GetRemoteSharesForFileOperation(filePath, getReshares, |
-| **false** |
-| ); |
-| |
-| |
-| operation.execute( |
-| mClient |
-| , |
-| **this** |
-| , |
-| mHandler |
-| ); |
-| |
-| } |
-| |
-| |
-| **private** |
-| |
-| **void** |
-| |
-| startSharesRetrievalForFilesInFolder(String folderPath, |
-| **boolean** |
-| |
-| getReshares) { |
-| |
-| GetRemoteSharesForFileOperation operation = |
-| **new** |
-| |
-| |
-| GetRemoteSharesForFileOperation(folderPath, getReshares, |
-| **true** |
-| ); |
-| |
-| |
-| operation.execute( |
-| mClient |
-| , |
-| **this** |
-| , |
-| mHandler |
-| ); |
-| |
-| } |
-| |
-| @Override |
-| |
-| **public** |
-| |
-| **void** |
-| |
-| onRemoteOperationFinish( RemoteOperation operation, |
-| |
-| RemoteOperationResult result) { |
-| |
-| **if** |
-| |
-| (operation |
-| **instanceof** |
-| |
-| GetRemoteSharesForFileOperation) { |
-| |
-| **if** |
-| |
-| (result.isSuccess()) { |
-| |
-| ArrayList< |
-| OCShare |
-| > shares = |
-| **new** |
-| |
-| ArrayList< |
-| OCShare |
-| >(); |
-| |
-| **for** |
-| (Object obj: result.getData()) { |
-| |
-| shares.add(( |
-| OCShare |
-| ) obj); |
-| |
-| } |
-| |
-| // do your stuff here |
-| |
-| } |
-| |
-| } |
-| |
-| } |
-| |
-+----------------------------------------------------------+
+ private void startSharesRetrievalForFileOrFolder(String filePath, boolean getReshares) {
+ GeteRemoteSharesForFileOperation operation = new GetRemoteSharesForFileOperation(filePath, getReshares, false);
+ operation.execute( mClient, this, mHandler);
+ }
+
+ private void startSharesRetrievalForFilesInFolder(String folderPath, boolean getReshares) {
+ GetRemoteSharesForFileOperation operation = new GetRemoteSharesForFileOperation(folderPath, getReshares, true);
+ operation.execute( mClient, this, mHandler);
+ }
+
+ @Override
+ public void onRemoteOperationFinish( RemoteOperation operation, RemoteOperationResult result) {
+ if (operation instanceof GetRemoteSharesForFileOperation) {
+ if (result.isSuccess()) {
+ ArrayList< OCShare > shares = new ArrayList< OCShare >();
+ for (Object obj: result.getData()) {
+ shares.add(( OCShare) obj);
+ }
+ // do your stuff here
+ }
+ }
+ }
Share link of file or folder
@@ -817,166 +328,37 @@ within the ownCloud Android library.
Code example
~~~~~~~~~~~~
+.. code-block:: java
+
+ private void startCreationOfPublicShareForFile(String filePath, String password) {
+ CreateRemoteShareOperation operation = new CreateRemoteShareOperation(filePath, ShareType.PUBLIC_LINK, "", false, password, 1);
+ operation.execute( mClient , this , mHandler);
+ }
+
+ private void startCreationOfGroupShareForFile(String filePath, String groupId) {
+ CreateRemoteShareOperation operation = new CreateRemoteShareOperation(filePath, ShareType.GROUP, groupId, false , "", 31);
+ operation.execute(mClient, this, mHandler);
+ }
-+-----------------------------------------------------------------------+
-| **private** |
-| |
-| **void** |
-| |
-| startCreationOfPublicShareForFile(String filePath, String password) { |
-| |
-| CreateRemoteShareOperation operation = |
-| |
-| **new** |
-| |
-| CreateRemoteShareOperation( |
-| |
-| filePath, |
-| |
-| ShareType. |
-| *PUBLIC_LINK* |
-| , |
-| |
-| "" |
-| , |
-| |
-| **false** |
-| , |
-| |
-| password, |
-| |
-| 1 |
-| ); |
-| |
-| operation.execute( |
-| mClient |
-| , |
-| **this** |
-| , |
-| mHandler |
-| );} |
-| |
-| |
-| **private** |
-| |
-| **void** |
-| |
-| startCreationOfGroupShareForFile(String filePath, String groupId) { |
-| |
-| CreateRemoteShareOperation operation = |
-| |
-| **new** |
-| |
-| CreateRemoteShareOperation( |
-| |
-| filePath, |
-| |
-| ShareType. |
-| *GROUP* |
-| , |
-| |
-| groupId, |
-| |
-| **false** |
-| , |
-| |
-| "" |
-| , |
-| |
-| 31 |
-| ); |
-| |
-| operation.execute( |
-| mClient |
-| , |
-| **this** |
-| , |
-| mHandler |
-| ); |
-| |
-| } |
-| |
-| |
-| **private** |
-| |
-| **void** |
-| |
-| startCreationOfUserShareForFile(String filePath, String userId) { |
-| |
-| CreateRemoteShareOperation operation = |
-| |
-| **new** |
-| |
-| CreateRemoteShareOperation( |
-| |
-| filePath, |
-| |
-| ShareType. |
-| *USER* |
-| , |
-| |
-| userId, |
-| |
-| **false** |
-| , |
-| |
-| "" |
-| , |
-| |
-| 31 |
-| ); |
-| |
-| operation.execute( |
-| mClient |
-| , |
-| **this** |
-| , |
-| mHandler |
-| ); |
-| |
-| } |
-| |
-| @Override |
-| |
-| **public** |
-| |
-| **void** |
-| |
-| onRemoteOperationFinish( RemoteOperation operation, |
-| |
-| RemoteOperationResult result) { |
-| |
-| **if** |
-| |
-| (operation |
-| **instanceof** |
-| |
-| CreateRemoteShareOperation) { |
-| |
-| **if** |
-| |
-| (result.isSuccess()) { |
-| |
-| OCShare share = (OCShare) result. |
-| getData |
-| ().get(0); |
-| |
-| // do your stuff here |
-| |
-| |
-| } |
-| |
-| } |
-| |
-| } |
-| |
-+-----------------------------------------------------------------------+
+ private void startCreationOfUserShareForFile(String filePath, String userId) {
+ CreateRemoteShareOperation operation = new CreateRemoteShareOperation(filePath, ShareType.USER, userId, false, "", 31);
+ operation.execute(mClient, this, mHandler);
+ }
+
+ @Override
+ public void onRemoteOperationFinish( RemoteOperation operation, RemoteOperationResult result) {
+ if (operation instanceof CreateRemoteShareOperation) {
+ if (result.isSuccess()) {
+ OCShare share = (OCShare) result.getData ().get(0);
+ // do your stuff here
+ }
+ }
+ }
Delete a share resource
-----------------------
-
Stop sharing by link a file or a folder from your cloud server.
The info needed is the object OCShare that you want to stop sharing by link.
@@ -984,63 +366,21 @@ The info needed is the object OCShare that you want to stop sharing by link.
Code example
~~~~~~~~~~~~
+.. code-block:: java
+
+ private void startShareRemoval(OCShare share) {
+ RemoveRemoteShareOperation operation = new RemoveRemoteShareOperation((int) share.getIdRemoteShared());
+ operation.execute( mClient, this, mHandler);
+ }
-+-------------------------------------------------------+
-| |
-| **private** |
-| |
-| **void** |
-| |
-| startShareRemoval(OCShare share) { |
-| |
-| RemoveRemoteShareOperation operation = |
-| |
-| **new** |
-| |
-| RemoveRemoteShareOperation(( |
-| **int** |
-| ) share.getIdRemoteShared()); |
-| |
-| operation.execute( |
-| mClient |
-| , |
-| **this** |
-| , |
-| mHandler |
-| ); |
-| |
-| } |
-| |
-| @Override |
-| |
-| **public** |
-| |
-| **void** |
-| |
-| onRemoteOperationFinish( RemoteOperation operation, |
-| |
-| RemoteOperationResult result) { |
-| |
-| **if** |
-| |
-| (operation |
-| **instanceof** |
-| |
-| RemoveRemoteShareOperation) { |
-| |
-| **if** |
-| |
-| (result.isSuccess()) { |
-| |
-| // do your stuff here |
-| |
-| } |
-| |
-| } |
-| |
-| } |
-| |
-+-------------------------------------------------------+
+ @Override
+ public void onRemoteOperationFinish( RemoteOperation operation, RemoteOperationResult result) {
+ if (operation instanceof RemoveRemoteShareOperation) {
+ if (result.isSuccess()) {
+ // do your stuff here
+ }
+ }
+ }
Tips
@@ -1048,8 +388,8 @@ Tips
* Credentials must be set before calling any method
* Paths must not be on URL Encoding
-* Correct path: `http://www.myowncloudserver.com/owncloud/remote.php/webdav/Pop <http://www.myowncloudserver.com/owncloud/remote.php/webdav/Pop>`_ Music/
-* Wrong path: `http://www.myowncloudserver.com/owncloud/remote.php/webdav/Pop%20Music/ <http://www.myowncloudserver.com/owncloud/remote.php/webdav/Pop%20Music/>`_
+* Correct path: ``http://www.myowncloudserver.com/owncloud/remote.php/webdav/PopMusic``
+* Wrong path: ``http://www.myowncloudserver.com/owncloud/remote.php/webdav/Pop%20Music/``
* There are some forbidden characters to be used in folder and files names on the server, same on the ownCloud Android Library "\","/","<",">",":",""","|","?","*"
-* Upload and download actions may be cancelled thanks to the objects uploadOperation.cancel(), downloadOperation.cancel()
-* Unit tests, before launching unit tests you have to enter your account information (server url, user and password) on TestActivity.java
+* Upload and download actions may be cancelled thanks to the objects uploadOperation.cancel(), downloadOperation.cancel()
+* Unit tests, before launching unit tests you have to enter your account information (server url, user and password) on TestActivity.java
diff --git a/developer_manual/ios_library/library_installation.rst b/developer_manual/ios_library/library_installation.rst
index 6f5a6a2..7ec5569 100644
--- a/developer_manual/ios_library/library_installation.rst
+++ b/developer_manual/ios_library/library_installation.rst
@@ -19,7 +19,7 @@ Add the library to a project
There are two methods to add this library to a project.
-* Reference the headers and library binary file (.a) directly.
+* Reference the headers and library binary file (``.a``) directly.
* Include the library as a subproject.
@@ -31,14 +31,14 @@ Reference headers and library binary files
Follow these steps if this is the desired method.
-#. Compile the ownCloud iOS library and run the project. A libownCloudiOS.a
+1. Compile the ownCloud iOS library and run the project. A ``libownCloudiOS.a``
file will be generated.
The following files are required:
**Library file**
-* `libownCloudiOS.a` (Library)
+* ``libownCloudiOS.a`` (Library)
**Library Classes**
@@ -48,18 +48,18 @@ The following files are required:
* ``readFolder`` and ``readFile`` methods
* ``OCFrameworkConstants.h`` (Customize constants)
-#. Add the library file to the project. From the “Build Phases” tab, scroll
+2. Add the library file to the project. From the “Build Phases” tab, scroll
to “Link binary files” and select the ‘+’ to add a library. Select the library
file.
|10000201000003480000020EC688993D_png|
-#. Add the path of the library header files. Under the “Build Settings” tab,
+3. Add the path of the library header files. Under the “Build Settings” tab,
select the target library and add the path in the “Header Search Paths” field.
|10000201000003430000020C65A3C5A7_png|
-#. Remaining in the “Build Setting” tab, add the flag “-Obj-C” under the
+4. Remaining in the “Build Setting” tab, add the flag ``-Obj-C`` under the
“Other Linker Flags” option.
|100002010000034700000211B6BE4A2B_png|
@@ -72,28 +72,28 @@ Include the library as a subproject
Follow these steps if this is the desired method.
-#. Add the file “ownCloud iOS library.xcodeproj” to the project via drag and
+5. Add the file ``ownCloud iOS library.xcodeproj`` to the project via drag and
drop.
|100000000000030C000001E61DFDBF76_png|
-#. Within the project, navigate to the “Build Phases” tab. Under the “Target
+6. Within the project, navigate to the “Build Phases” tab. Under the “Target
Dependencies” section, select the ‘+’ and choose the library target.
|100000000000030C000001E7A7A01884_png|
-#. Link the library file to the project target. Under the “Build Phases” tab,
+7. Link the library file to the project target. Under the “Build Phases” tab,
select the ‘+’ under the “Link Binary with Libraries” section and select the
library file.
|100000000000030C000001E8AB4C3306_png|
-#. Add the flag “-Obj-C” to “Other Linker Flags” under the project target on
+8. Add the flag ``-Obj-C`` to “Other Linker Flags” under the project target on
the “Build Settings” tab.
|100000000000030C000001ECB85120C2_png|
-#. Finally add the path of the library headers. Under the “Build Settings”
+9. Finally add the path of the library headers. Under the “Build Settings”
tab, add the path under the “Header Search Paths” option.
|100000000000030C000001E637605044_png|
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-doc.git
More information about the Pkg-owncloud-commits
mailing list