Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ public class GetCapabilitiesRemoteOperation extends RemoteOperation {
private static final String NODE_FILES_DOWNLOAD_LIMIT = "downloadlimit";
private static final String FILES_DOWNLOAD_LIMIT_DEFAULT = "default-limit";

// notes folder location
private static final String NODE_NOTES = "notes";
private static final String NOTES_PATH = "notes_path";

private OCCapability currentCapability = null;

public GetCapabilitiesRemoteOperation() {
Expand Down Expand Up @@ -770,6 +774,22 @@ private OCCapability parseResponse(String response) throws JSONException {
} else {
capability.setRecommendations(CapabilityBooleanType.FALSE);
}

// notes folder
if (respCapabilities.has(NODE_NOTES)) {
JSONObject notesCapability = respCapabilities.getJSONObject(NODE_NOTES);

if (notesCapability.has(NOTES_PATH)) {
String notesFolderPath = notesCapability.getString(NOTES_PATH);

if (!notesFolderPath.isEmpty() && !notesFolderPath.endsWith("/")) {
notesFolderPath += "/";
}

capability.setNotesFolderPath(notesFolderPath);
}
}

}

Log_OC.d(TAG, "*** Get Capabilities completed ");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ class OCCapability {
var filesDownloadLimit = CapabilityBooleanType.UNKNOWN
var filesDownloadLimitDefault = -1

// notes folder location
var notesFolderPath: String? = null

// Etag for capabilities
var etag: String? = ""

Expand Down
Loading