Search in sources :

Example 1 with GetRemoteCapabilitiesOperation

use of com.owncloud.android.lib.resources.status.GetRemoteCapabilitiesOperation in project android by owncloud.

the class GetCapabilitiesOperarion method run.

@Override
protected RemoteOperationResult run(OwnCloudClient client) {
    GetRemoteCapabilitiesOperation getCapabilities = new GetRemoteCapabilitiesOperation();
    RemoteOperationResult result = getCapabilities.execute(client);
    if (result.isSuccess()) {
        // Read data from the result
        if (result.getData() != null && result.getData().size() > 0) {
            OCCapability capability = (OCCapability) result.getData().get(0);
            // Save the capabilities into database
            getStorageManager().saveCapabilities(capability);
        }
    }
    return result;
}
Also used : OCCapability(com.owncloud.android.lib.resources.status.OCCapability) RemoteOperationResult(com.owncloud.android.lib.common.operations.RemoteOperationResult) GetRemoteCapabilitiesOperation(com.owncloud.android.lib.resources.status.GetRemoteCapabilitiesOperation)

Aggregations

RemoteOperationResult (com.owncloud.android.lib.common.operations.RemoteOperationResult)1 GetRemoteCapabilitiesOperation (com.owncloud.android.lib.resources.status.GetRemoteCapabilitiesOperation)1 OCCapability (com.owncloud.android.lib.resources.status.OCCapability)1