OCWebDAVClient.h 49 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713
  1. //
  2. // OCWebDAVClient.h
  3. // OCWebDAVClient
  4. //
  5. // This class is based in https://github.com/zwaldowski/DZWebDAVClient. Copyright (c) 2012 Zachary Waldowski, Troy Brant, Marcus Rohrmoser, and Sam Soffes.
  6. //
  7. // Copyright (C) 2016, ownCloud GmbH. ( http://www.owncloud.org/ )
  8. //
  9. // Permission is hereby granted, free of charge, to any person obtaining a copy
  10. // of this software and associated documentation files (the "Software"), to deal
  11. // in the Software without restriction, including without limitation the rights
  12. // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  13. // copies of the Software, and to permit persons to whom the Software is
  14. // furnished to do so, subject to the following conditions:
  15. // The above copyright notice and this permission notice shall be included in
  16. // all copies or substantial portions of the Software.
  17. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  18. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  19. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  20. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  21. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  22. // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  23. // THE SOFTWARE.
  24. //
  25. //
  26. // Add : getNotificationServer & setNotificationServer
  27. // Add : getUserProfileServer
  28. // Add : Support for Favorite
  29. // Add : getActivityServer
  30. //
  31. // Author Marino Faggiana <marino.faggiana@nextcloud.com>
  32. // Copyright (c) 2017 Marino Faggiana. All rights reserved.
  33. //
  34. #import "OCHTTPRequestOperation.h"
  35. @import AFNetworking;
  36. @class OCCommunication;
  37. @class OCChunkDto;
  38. /** The key for a uniform (MIME) type identifier returned from the property request methods. */
  39. extern NSString * _Nullable OCWebDAVContentTypeKey;
  40. /** The key for a unique entity identifier returned from the property request methods. */
  41. extern NSString * _Nullable OCWebDAVETagKey;
  42. /** The key for a content identifier tag returned from the property request methods. This is only supported on some servers, and usually defines whether the contents of a collection (folder) have changed. */
  43. extern NSString * _Nullable OCWebDAVCTagKey;
  44. /** The key for the creation date of an entity. */
  45. extern NSString * _Nullable OCWebDAVCreationDateKey;
  46. /** The key for last modification date of an entity. */
  47. extern NSString * _Nullable OCWebDAVModificationDateKey;
  48. @interface OCWebDAVClient : NSObject
  49. @property (readwrite, nonatomic, strong) NSMutableDictionary * _Nullable defaultHeaders;
  50. //On redirections AFNetworking lose the request method on iOS6 and set a GET, we use this as workarround
  51. @property (nonatomic, strong) NSString * _Nullable requestMethod;
  52. //We use this variable to return the url of a redirected server to detect if we receive any sesion expired on SSO server
  53. @property (nonatomic, strong) NSString * _Nullable redirectedServer;
  54. //We use this variable to get the Cookies from the storage provider
  55. @property (nonatomic, strong) NSString * _Nullable originalUrlServer;
  56. @property (nonatomic, strong) NSString * _Nullable postStringForShare;
  57. // E2EE Metadata
  58. @property (nonatomic, strong) NSString * _Nullable postStringMetadata;
  59. // E2EE privateKey, publicKey
  60. @property (nonatomic, strong) NSString * _Nullable postStringKey;
  61. /**
  62. Sets the "Authorization" HTTP header set in request objects made by the HTTP client to a basic authentication value with Base64-encoded username and password. This overwrites any existing value for this header.
  63. @param username The HTTP basic auth username
  64. @param password The HTTP basic auth password
  65. */
  66. - (void)setAuthorizationHeaderWithUsername:(NSString * _Nonnull)username
  67. password:(NSString * _Nonnull)password;
  68. /**
  69. Sets the "Authorization" HTTP header set in request objects made by the HTTP client to a basic authentication value with Base64-encoded username and password. This overwrites any existing value for this header.
  70. @param cookieString The HTTP token to login on SSO Servers
  71. */
  72. - (void)setAuthorizationHeaderWithCookie:(NSString * _Nonnull) cookieString;
  73. /**
  74. Sets the "Authorization" HTTP header set in request objects made by the HTTP client to a token-based authentication value, such as an OAuth access token. This overwrites any existing value for this header.
  75. @param token The authentication token
  76. */
  77. - (void)setAuthorizationHeaderWithToken:(NSString * _Nonnull)token;
  78. /**
  79. Sets the "User-Agent" HTTP header
  80. @param userAgent -> String that indentifies the client app. Ex: "iOS-ownCloud"
  81. */
  82. - (void)setUserAgent:(NSString * _Nonnull)userAgent;
  83. /**
  84. Add Header
  85. */
  86. - (void)setDefaultHeader:(NSString * _Nonnull)header value:(NSString *_Nullable)value;
  87. /**
  88. Enqueues an operation to move the object at a path to another path using a `MOVE` request.
  89. @param source The path to move.
  90. @param destination The path to move the item to.
  91. @param sharedOCCommunication Singleton of communication to add the operation on the queue.
  92. @param success A block callback, to be fired upon successful completion, with no arguments.
  93. @param failure A block callback, to be fired upon the failure of the request, with two arguments: the request operation and the network error that occurred.
  94. */
  95. - (void)movePath:(NSString * _Nonnull)source toPath:(NSString * _Nonnull)destination
  96. onCommunication:(OCCommunication * _Nonnull)sharedOCCommunication
  97. success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull, id _Nonnull))success
  98. failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull, id _Nullable responseObject, NSError * _Nonnull))failure;
  99. /**
  100. Enqueues an operation to delete the object at a path using a `DELETE` request.
  101. @param path The path for which to create a directory.
  102. @param sharedOCCommunication Singleton of communication to add the operation on the queue.
  103. @param success A block callback, to be fired upon successful completion, with no arguments.
  104. @param failure A block callback, to be fired upon the failure of the request, with two arguments: the request operation and the network error that occurred.
  105. */
  106. - (void)deletePath:(NSString * _Nonnull)path
  107. onCommunication:(OCCommunication * _Nonnull)sharedOCCommunication
  108. success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull, id _Nonnull))success
  109. failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull, id _Nullable responseObject, NSError * _Nonnull))failure;
  110. /**
  111. Enqueues a request to list the properties of a single entity using a `PROPFIND` request for the specified path.
  112. @param path The path for which to list the properties.
  113. @param sharedOCCommunication Singleton of communication to add the operation on the queue.
  114. @param success A block callback, to be fired upon successful completion, with two arguments: the request operation and a dictionary with the properties of the entity.
  115. @param failure A block callback, to be fired upon the failure of either the request or the parsing of the request's data, with two arguments: the request operation and the network or parsing error that occurred.
  116. @see listPath:success:failure:
  117. @see recursiveListPath:success:failure:
  118. */
  119. - (void)propertiesOfPath:(NSString * _Nonnull)path
  120. onCommunication: (OCCommunication * _Nonnull)sharedOCCommunication
  121. success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull, id _Nonnull))success
  122. failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull, id _Nullable responseObject, NSError * _Nonnull))failure;
  123. /**
  124. Enqueues a request to list the contents of a single collection and
  125. the properties of each object, including the properties of the
  126. collection itself, using a `PROPFIND` request.
  127. @param path The directory for which to list the contents.
  128. @param sharedOCCommunication Singleton of communication to add the operation on the queue.
  129. @param success A block callback, to be fired upon successful completion, with two arguments: the request operation and a dictionary with the properties of the directory and its contents.
  130. @param failure A block callback, to be fired upon the failure of either the request or the parsing of the request's data, with two arguments: the request operation and the network or parsing error that occurred.
  131. @see propertiesOfPath:success:failure:
  132. @see recursiveListPath:success:failure:
  133. */
  134. - (void)listPath:(NSString * _Nonnull)path depth:(NSString * _Nonnull)depth
  135. onCommunication: (OCCommunication * _Nonnull)sharedOCCommunication
  136. success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nullable responseObject))success
  137. failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nullable responseObject, NSError * _Nonnull error))failure;
  138. /**
  139. Enqueues a request to list the contents of a single collection and
  140. the properties of each object, including the properties of the
  141. collection itself, using a `PROPFIND` request.
  142. @param path The directory for which to list the contents.
  143. @param sharedOCCommunication Singleton of communication to add the operation on the queue.
  144. @param token User Session token
  145. @param success A block callback, to be fired upon successful completion, with two arguments: the request operation and a dictionary with the properties of the directory and its contents.
  146. @param failure A block callback, to be fired upon the failure of either the request or the parsing of the request's data, with two arguments: the request operation and the network or parsing error that occurred.
  147. @see propertiesOfPath:success:failure:
  148. @see recursiveListPath:success:failure:
  149. */
  150. - (void)listPath:(NSString * _Nonnull)path depth:(NSString * _Nonnull)depth
  151. onCommunication:(OCCommunication * _Nonnull)sharedOCCommunication withUserSessionToken:(NSString * _Nonnull)token
  152. success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull, id _Nonnull, NSString * _Nonnull token))success
  153. failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull, id _Nullable responseObject, NSError * _Nonnull, NSString * _Nonnull token))failure;
  154. /**
  155. */
  156. NS_ASSUME_NONNULL_BEGIN
  157. - (void)search:(NSString * _Nonnull)path folder:(NSString * _Nonnull)folder fileName:(NSString * _Nonnull)fileName depth:(NSString * _Nonnull)depth lteDateLastModified:(NSString *)lteDateLastModified gteDateLastModified:(NSString *)gteDateLastModified contentType:(NSArray * _Nonnull)contentType user:(NSString * _Nonnull)user userID:(NSString * _Nonnull)userID onCommunication:(OCCommunication * _Nonnull)sharedOCCommunication withUserSessionToken:(NSString * _Nonnull)token success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull, id _Nonnull, NSString * _Nonnull token))success failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull, id _Nullable responseObject, NSError * _Nonnull, NSString * _Nonnull token))failure;
  158. - (void)search:(NSString *)path folder:(NSString *)folder fileName:(NSString *)fileName dateLastModified:(NSString *)dateLastModified numberOfItem:(NSInteger)numberOfItem userID:(NSString *)userID onCommunication:(OCCommunication *)sharedOCCommunication withUserSessionToken:(NSString *)token success:(void(^)(NSHTTPURLResponse *, id, NSString *token))success failure:(void(^)(NSHTTPURLResponse *, id _Nullable responseObject, NSError *, NSString *token))failure;
  159. NS_ASSUME_NONNULL_END
  160. /**
  161. */
  162. - (void)settingFavorite:(NSString * _Nonnull)path favorite:(BOOL)favorite onCommunication:(OCCommunication * _Nonnull)sharedOCCommunication withUserSessionToken:(NSString * _Nonnull)token success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull, id _Nonnull, NSString * _Nonnull token))success failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull, id _Nullable responseObject, NSError * _Nonnull, NSString * _Nonnull token))failure;
  163. /**
  164. */
  165. - (void)listingFavorites:(NSString * _Nonnull)path folder:(NSString * _Nonnull)folder user:(NSString * _Nonnull)user userID:(NSString * _Nonnull)userID onCommunication:(OCCommunication * _Nonnull)sharedOCCommunication withUserSessionToken:(NSString * _Nonnull)token success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull, id _Nonnull, NSString * _Nonnull token))success failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull, id _Nullable responseObject, NSError * _Nonnull, NSString * _Nonnull token))failure;
  166. /**
  167. Creates an `NSURLSessionDownloadTask` with the specified request for a local file.
  168. @param remoteSource is a string with the path of the file in the server
  169. @param localDestination is a string with the local device path for store the file
  170. @param defaultPriority is a bool with a flag to indicate if the download must be download inmediately of not.
  171. @param progress A progress object monitoring the current upload progress.
  172. @param success A block callback, to be fired upon successful completion, with NSURLResponse and string of URL of the filePath
  173. @param failure A block callback, to be fired upon the failure of either the request or the parsing of the request's data, with two arguments: the request operation and the network or parsing error that occurred.
  174. *
  175. @warning NSURLSession and NSRULSessionUploadTask only can be supported in iOS 7.
  176. */
  177. - (NSURLSessionDownloadTask * _Nonnull)downloadWithSessionPath:(NSString * _Nonnull)remoteSource toPath:(NSString * _Nonnull)localDestination defaultPriority:(BOOL)defaultPriority onCommunication:(OCCommunication * _Nonnull)sharedOCCommunication progress:(void(^ _Nonnull)(NSProgress * _Nonnull progress))downloadProgress success:(void(^ _Nonnull)(NSURLResponse * _Nonnull response, NSURL * _Nonnull filePath))success failure:(void(^ _Nonnull)(NSURLResponse * _Nonnull response, NSError * _Nonnull error))failure;
  178. /**
  179. Enqueues a request to check the server to know the kind of authentication needed.
  180. @param path The path of the server.
  181. @param sharedOCCommunication Singleton of communication to add the operation on the queue.
  182. @param success A block callback, to be fired upon successful completion, with no arguments.
  183. @param failure A block callback, to be fired upon the failure of the request, with two arguments: the request operation and the network error that occurred.
  184. */
  185. - (void)checkServer:(NSString * _Nonnull)path onCommunication:
  186. (OCCommunication * _Nonnull)sharedOCCommunication
  187. success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull, id _Nonnull))success
  188. failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull, id _Nullable responseObject, NSError * _Nonnull))failure;
  189. /**
  190. Enqueues a request to creates a directory using a `MKCOL` request for the specified path.
  191. @param path The path for which to create a directory.
  192. @param sharedOCCommunication Singleton of communication to add the operation on the queue.
  193. @param success A block callback, to be fired upon successful completion, with no arguments.
  194. @param failure A block callback, to be fired upon the failure of the request, with two arguments: the request operation and the network error that occurred.
  195. */
  196. - (void)makeCollection:(NSString * _Nonnull)path
  197. onCommunication:(OCCommunication * _Nonnull)sharedOCCommunication
  198. success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull, id _Nonnull))success
  199. failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull, id _Nullable responseObject, NSError * _Nonnull))failure;
  200. /**
  201. Creates an `NSURLSessionUploadTask` with the specified request for a local file.
  202. @param localSource is a string with the path of the file to upload
  203. @param remoteDestination A remote path, relative to the HTTP client's base URL, to write the data to.
  204. @param progress A progress object monitoring the current upload progress.
  205. @param success A block callback, to be fired upon successful completion, with NSURLResponse and string of redirected server.
  206. @param failure A block callback, to be fired upon the failure of either the request or the parsing of the request's data, with two arguments: the request operation and the network or parsing error that occurred.
  207. *
  208. @warning NSURLSession and NSRULSessionUploadTask only can be supported in iOS 7.
  209. */
  210. - (NSURLSessionUploadTask * _Nonnull)putWithSessionLocalPath:(NSString * _Nonnull)localSource atRemotePath:(NSString * _Nonnull)remoteDestination onCommunication:(OCCommunication * _Nonnull)sharedOCCommunication progress:(void(^ _Nonnull)(NSProgress * _Nonnull progress))uploadProgress success:(void(^ _Nonnull)(NSURLResponse * _Nonnull, NSString * _Nonnull))success failure:(void(^ _Nonnull)(NSURLResponse * _Nonnull, id _Nonnull, NSError * _Nonnull))failure failureBeforeRequest:(void(^ _Nonnull)(NSError * _Nonnull)) failureBeforeRequest;
  211. ///-----------------------------------
  212. /// @name requestForUserNameByCookie
  213. ///-----------------------------------
  214. /**
  215. * Method to obtain the User name by the cookie of the session
  216. *
  217. * @param NSString the cookie of the session
  218. *
  219. */
  220. - (void) requestUserNameOfServer:(NSString * _Nonnull) path byCookie:(NSString * _Nonnull) cookieString onCommunication:
  221. (OCCommunication * _Nonnull)sharedOCCommunication success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull, id _Nonnull))success
  222. failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull, id _Nullable responseObject, NSError * _Nonnull))failure;
  223. ///-----------------------------------
  224. /// @name Get status of the server
  225. ///-----------------------------------
  226. /**
  227. * Method to get the json of the status.php common in the ownCloud servers
  228. *
  229. * @param serverPath -> url of the server
  230. * @param sharedOCCommunication Singleton of communication to add the operation on the queue.
  231. * @param success A block callback, to be fired upon successful completion, with two arguments: the request operation and a data with the json file.
  232. * @param failure A block callback, to be fired upon the failure of the request, with two arguments: the request operation and error.
  233. *
  234. */
  235. - (void) getStatusOfTheServer:(NSString * _Nonnull)serverPath onCommunication:
  236. (OCCommunication * _Nonnull)sharedOCCommunication success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nonnull responseObject))success
  237. failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nullable responseObject, NSError * _Nonnull error))failure;
  238. ///-----------------------------------
  239. /// @name Get All the shared files and folders of a server
  240. ///-----------------------------------
  241. /**
  242. Method to get all the shared files fo an account by the server path and api
  243. @param serverPath -> The url of the server including the path of the Share API.
  244. @param sharedOCCommunication Singleton of communication to add the operation on the queue.
  245. @param success A block callback, to be fired upon successful completion, with two arguments: the request operation and a dictionary with the properties of the directory and its contents.
  246. @param failure A block callback, to be fired upon the failure of either the request or the parsing of the request's data, with two arguments: the request operation and the network or parsing error that occurred.
  247. */
  248. - (void)listSharedByServer:(NSString * _Nonnull)serverPath
  249. onCommunication: (OCCommunication * _Nonnull)sharedOCCommunication
  250. success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nonnull responseObject))success
  251. failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nullable responseObject, NSError * _Nonnull error))failure;
  252. ///-----------------------------------
  253. /// @name Get All the shared files and folders of concrete folder
  254. ///-----------------------------------
  255. /**
  256. Method to get all the shared files fo an account by the server path and api
  257. @param serverPath -> The url of the server including the path of the Share API.
  258. @param path -> The path of the folder that we want to know the shared
  259. @param sharedOCCommunication Singleton of communication to add the operation on the queue.
  260. @param success A block callback, to be fired upon successful completion, with two arguments: the request operation and a dictionary with the properties of the directory and its contents.
  261. @param failure A block callback, to be fired upon the failure of either the request or the parsing of the request's data, with two arguments: the request operation and the network or parsing error that occurred.
  262. */
  263. - (void)listSharedByServer:(NSString * _Nonnull)serverPath andPath:(NSString * _Nonnull) path
  264. onCommunication:(OCCommunication * _Nonnull)sharedOCCommunication
  265. success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull, id _Nonnull))success
  266. failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull, id _Nullable responseObject, NSError * _Nonnull))failure;
  267. ///-----------------------------------
  268. /// @name shareFileOrFolderByServer
  269. ///-----------------------------------
  270. /**
  271. * Method to share a file or folder with password
  272. *
  273. * @param serverPath -> NSString: Server path where we want to share a file or folder. Ex: http://10.40.40.20/owncloud/ocs/v1.php/apps/files_sharing/api/v1/shares
  274. * @param filePath -> NSString: Path of the server where is the file. Ex: /File.pdf
  275. * @param password -> NSString: Password
  276. * @param sharedOCCommunication Singleton of communication to add the operation on the queue.
  277. * @param success A block callback, to be fired upon successful completion, with two arguments: the request operation and a data with the json file.
  278. * @param failure A block callback, to be fired upon the failure of the request, with two arguments: the request operation and error.
  279. *
  280. */
  281. - (void)shareByLinkFileOrFolderByServer:(NSString * _Nonnull)serverPath andPath:(NSString * _Nonnull) filePath andPassword:(NSString * _Nonnull)password andPermission:(NSInteger)permission andHideDownload:(BOOL)hideDownload
  282. onCommunication:(OCCommunication * _Nonnull)sharedOCCommunication
  283. success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull, id _Nonnull))success
  284. failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull, id _Nullable responseObject, NSError * _Nonnull))failure;
  285. ///-----------------------------------
  286. /// @name shareFileOrFolderByServer
  287. ///-----------------------------------
  288. /**
  289. * Method to share a file or folder
  290. *
  291. * @param serverPath -> NSString: Server path where we want to share a file or folder. Ex: http://10.40.40.20/owncloud/ocs/v1.php/apps/files_sharing/api/v1/shares
  292. * @param filePath -> NSString: Path of the server where is the file. Ex: /File.pdf
  293. * @param sharedOCCommunication Singleton of communication to add the operation on the queue.
  294. * @param success A block callback, to be fired upon successful completion, with two arguments: the request operation and a data with the json file.
  295. * @param failure A block callback, to be fired upon the failure of the request, with two arguments: the request operation and error.
  296. *
  297. */
  298. - (void)shareByLinkFileOrFolderByServer:(NSString * _Nonnull)serverPath andPath:(NSString * _Nonnull) filePath
  299. onCommunication:(OCCommunication * _Nonnull)sharedOCCommunication
  300. success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull, id _Nonnull))success
  301. failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull, id _Nullable responseObject, NSError * _Nonnull))failure;
  302. ///-----------------------------------
  303. /// @name shareWith
  304. ///-----------------------------------
  305. /**
  306. * Method to share a file or folder with user and group
  307. *
  308. * @param userOrGroup -> NSString: user or group (You can get the shares id in the calls searchUsersAndGroupsWith....)
  309. * @param shareeType -> NSInteger: to set the type of sharee (user/group/federated)
  310. * @param serverPath -> NSString: Server path where we want to share a file or folder. Ex: http://10.40.40.20/owncloud/ocs/v2.php/apps/files_sharing/api/v1/sharees?format=json
  311. * @param filePath -> NSString: Path of the server where is the file. Ex: /File.pdf
  312. * @param sharedOCCommunication Singleton of communication to add the operation on the queue.
  313. * @param success A block callback, to be fired upon successful completion, with two arguments: the request operation and a data with the json file.
  314. * @param failure A block callback, to be fired upon the failure of the request, with two arguments: the request operation and error.
  315. *
  316. */
  317. - (void)shareWith:(NSString * _Nonnull)userOrGroup shareeType:(NSInteger)shareeType inServer:(NSString * _Nonnull) serverPath andPath:(NSString * _Nonnull) filePath andPermissions:(NSInteger) permissions onCommunication:(OCCommunication * _Nonnull)sharedOCCommunication
  318. success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull, id _Nonnull))success
  319. failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull, id _Nullable responseObject, NSError * _Nonnull))failure;
  320. ///-----------------------------------
  321. /// @name unShareFileOrFolderByServer
  322. ///-----------------------------------
  323. /**
  324. * Method to unshare a file or folder
  325. *
  326. * @param serverPath -> NSString: Server path with the id of the file or folder that we want to unshare Ex: http://10.40.40.20/owncloud/ocs/v1.php/apps/files_sharing/api/v1/shares/44
  327. * @param sharedOCCommunication Singleton of communication to add the operation on the queue.
  328. * @param success A block callback, to be fired upon successful completion, with two arguments: the request operation and a data with the json file.
  329. * @param failure A block callback, to be fired upon the failure of the request, with two arguments: the request operation and error.
  330. */
  331. - (void)unShareFileOrFolderByServer:(NSString * _Nonnull)serverPath
  332. onCommunication:(OCCommunication * _Nonnull)sharedOCCommunication
  333. success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull, id _Nonnull))success
  334. failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull, id _Nullable responseObject, NSError * _Nonnull))failure;
  335. ///-----------------------------------
  336. /// @name isShareFileOrFolderByServer
  337. ///-----------------------------------
  338. /**
  339. * Method to know if a share item still shared
  340. *
  341. * @param serverPath -> NSString: Server path with the id of the file or folder that we want know if is shared Ex: http://10.40.40.20/owncloud/ocs/v1.php/apps/files_sharing/api/v1/shares/44
  342. * @param sharedOCCommunication Singleton of communication to add the operation on the queue.
  343. * @param success A block callback, to be fired upon successful completion, with two arguments: the request operation and a data with the json file.
  344. * @param failure A block callback, to be fired upon the failure of the request, with two arguments: the request operation and error.
  345. */
  346. - (void)isShareFileOrFolderByServer:(NSString * _Nonnull)serverPath
  347. onCommunication:(OCCommunication * _Nonnull)sharedOCCommunication
  348. success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull, id _Nonnull))success
  349. failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull, id _Nullable responseObject, NSError * _Nonnull))failure;
  350. ///-----------------------------------
  351. /// @name updateShareItem
  352. ///-----------------------------------
  353. /**
  354. * Method to update a share link
  355. *
  356. * @param shareId -> NSInterger: Share id (You can get the shares id in the calls listSharedByServer....)
  357. * @param serverPath -> NSString: Server path with the id of the file or folder that we want know if is shared Ex: http://10.40.40.20/owncloud/ocs/v1.php/apps/files_sharing/api/v1/shares/44
  358. * @param sharedOCCommunication Singleton of communication to add the operation on the queue.
  359. * @param success A block callback, to be fired upon successful completion, with two arguments: the request operation and a data with the json file.
  360. * @param failure A block callback, to be fired upon the failure of the request, with two arguments: the request operation and error.
  361. */
  362. - (void) updateShareItem:(NSInteger)shareId ofServerPath:(NSString * _Nonnull)serverPath withPasswordProtect:(NSString * _Nonnull)password andNote:(NSString * _Nonnull)note andExpirationTime:(NSString * _Nonnull)expirationTime andPermissions:(NSInteger)permissions andHideDownload:(BOOL)hideDownload
  363. onCommunication:(OCCommunication * _Nonnull)sharedOCCommunication
  364. success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nonnull response))success
  365. failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nullable responseObject, NSError * _Nonnull error))failure;
  366. ///-----------------------------------
  367. /// @name searchUsersAndGroupsWith
  368. ///-----------------------------------
  369. /**
  370. * Method to search users or groups
  371. *
  372. * @param searchString -> NSString: Search string
  373. * @param serverPath -> NSString: Server path with the id of the file or folder that we want know if is shared Ex: http://10.40.40.20/owncloud/ocs/v2.php/apps/files_sharing/api/v1/sharees?format=json
  374. * @param page -> NSInteger: Number of page of the results (pagination support)
  375. * @param resultsPerPage -> NSInteger: Number of results per page (pagination support)
  376. * @param sharedOCCommunication Singleton of communication to add the operation on the queue.
  377. * @param success A block callback, to be fired upon successful completion, with two arguments: the request operation and a data with the json file.
  378. * @param failure A block callback, to be fired upon the failure of the request, with two arguments: the request operation and error.
  379. */
  380. - (void) searchUsersAndGroupsWith:(NSString * _Nonnull)searchString forPage:(NSInteger)page with:(NSInteger)resultsPerPage ofServer:(NSString * _Nonnull)serverPath onCommunication:(OCCommunication * _Nonnull)sharedOCComunication
  381. success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nonnull response))success
  382. failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nullable responseObject, NSError * _Nonnull error))failure;
  383. ///-----------------------------------
  384. /// @name Get the server capabilities
  385. ///-----------------------------------
  386. /**
  387. * Method read the capabilities of the server
  388. *
  389. * @param serverPath -> NSString server
  390. * @param sharedOCCommunication -> OCCommunication Singleton of communication to add the operation on the queue.
  391. *
  392. * @return capabilities -> OCCapabilities
  393. *
  394. */
  395. - (void) getCapabilitiesOfServer:(NSString * _Nonnull)serverPath onCommunication:(OCCommunication * _Nonnull)sharedOCComunication success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nonnull response))success
  396. failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nullable responseObject, NSError * _Nonnull error))failure;
  397. #pragma mark - Remote thumbnails
  398. ///-----------------------------------
  399. /// @name Get the thumbnail for a file
  400. ///-----------------------------------
  401. /**
  402. * Method to get the remote thumbnail for a file
  403. *
  404. * @param serverPath -> NSString server
  405. * @param filePath -> NSString file path
  406. * @param fileWidth -> NSInteger with the width size
  407. * @param fileHeight -> NSInteger with the height size
  408. * @param sharedOCCommunication -> OCCommunication Singleton of communication to add the operation on the queue.
  409. *
  410. * @return nsData -> thumbnail of the file with the size requested
  411. *
  412. */
  413. - (OCHTTPRequestOperation * _Nonnull) getRemoteThumbnailByServer:(NSString * _Nonnull)serverPath ofFilePath:(NSString * _Nonnull)filePath withWidth:(NSInteger)fileWidth andHeight:(NSInteger)fileHeight onCommunication:(OCCommunication * _Nonnull)sharedOCComunication
  414. success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nonnull response))success
  415. failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nullable responseObject, NSError * _Nonnull error))failure;
  416. NS_ASSUME_NONNULL_BEGIN
  417. - (OCHTTPRequestOperation *) getRemotePreviewByServer:(NSString * _Nonnull)serverPath ofFilePath:(NSString *_Nonnull)filePath withWidth:(NSInteger)fileWidth andHeight:(NSInteger)fileHeight andA:(NSInteger)a andMode:(NSString * _Nonnull)mode path:(NSString * _Nonnull)path onCommunication:(OCCommunication *)sharedOCCommunication success:(void(^)(NSHTTPURLResponse *operation, id response))success failure:(void(^)(NSHTTPURLResponse *operation, id _Nullable responseObject, NSError *error))failure;
  418. - (OCHTTPRequestOperation *) getRemotePreviewTrashByServer:(NSString * _Nonnull)serverPath ofFileId:(NSString *_Nonnull)fileId size:(NSString *)size onCommunication:(OCCommunication *)sharedOCCommunication success:(void(^)(NSHTTPURLResponse *operation, id response))success failure:(void(^)(NSHTTPURLResponse *operation, id _Nullable responseObject, NSError *error))failure;
  419. NS_ASSUME_NONNULL_END
  420. #pragma mark - Notification
  421. ///-----------------------------------
  422. /// @name Get the server Notification
  423. ///-----------------------------------
  424. /**
  425. * Method read the notification of the server
  426. *
  427. * @param serverPath -> NSString server
  428. * @param sharedOCCommunication -> OCCommunication Singleton of communication to add the operation on the queue.
  429. *
  430. * @return listOfNotifications -> OCNotification
  431. *
  432. */
  433. - (void) getNotificationServer:(NSString * _Nonnull)serverPath onCommunication:(OCCommunication * _Nonnull)sharedOCComunication success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nonnull response))success failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nullable responseObject, NSError * _Nonnull error))failure;
  434. ///-----------------------------------
  435. /// @name set server Notification
  436. ///-----------------------------------
  437. /**
  438. * Method read the notification of the server
  439. *
  440. * @param serverPath -> NSString server
  441. * @param type -> NSString "POST" "DELETE"
  442. * @param sharedOCCommunication -> OCCommunication Singleton of communication to add the operation on the queue.
  443. *
  444. */
  445. - (void)setNotificationServer:(NSString * _Nonnull)serverPath type:(NSString * _Nonnull)type onCommunication:(OCCommunication * _Nonnull)sharedOCCommunication success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull, id _Nonnull))success failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull, id _Nullable responseObject, NSError * _Nonnull))failure;
  446. ///-----------------------------------
  447. /// @name Subscribing at the Nextcloud server
  448. ///-----------------------------------
  449. /**
  450. * Method read the notification of the server
  451. *
  452. * @param serverPath -> NSString server
  453. * @param type -> NSString "POST" "DELETE"
  454. * @param sharedOCCommunication -> OCCommunication Singleton of communication to add the operation on the queue.
  455. *
  456. */
  457. - (void)subscribingNextcloudServerPush:(NSString * _Nonnull)serverPath pushTokenHash:(NSString * _Nonnull)pushTokenHash devicePublicKey:(NSString * _Nonnull)devicePublicKey proxyServerPath:(NSString * _Nonnull)proxyServerPath onCommunication:(OCCommunication * _Nonnull)sharedOCCommunication success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull, id _Nonnull))success failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull, id _Nullable responseObject, NSError * _Nonnull))failure;
  458. - (void)unsubscribingNextcloudServerPush:(NSString * _Nonnull)serverPath onCommunication:(OCCommunication * _Nonnull)sharedOCCommunication success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull, id _Nonnull))success failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull, id _Nullable responseObject, NSError * _Nonnull))failure;
  459. - (void)subscribingPushProxy:(NSString * _Nonnull)serverPath pushToken:(NSString * _Nonnull)pushToken deviceIdentifier:(NSString * _Nonnull)deviceIdentifier deviceIdentifierSignature:(NSString * _Nonnull)deviceIdentifierSignature publicKey:(NSString * _Nonnull)publicKey onCommunication:(OCCommunication * _Nonnull)sharedOCCommunication success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull, id _Nonnull))success failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull, id _Nullable responseObject, NSError * _Nonnull))failure;
  460. - (void)unsubscribingPushProxy:(NSString * _Nonnull)serverPath deviceIdentifier:(NSString * _Nonnull)deviceIdentifier deviceIdentifierSignature:(NSString * _Nonnull)deviceIdentifierSignature publicKey:(NSString * _Nonnull)publicKey onCommunication:(OCCommunication * _Nonnull)sharedOCCommunication success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull, id _Nonnull))success failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull, id _Nullable responseObject, NSError * _Nonnull))failure;
  461. ///-----------------------------------
  462. /// @name Get the server Notification
  463. ///-----------------------------------
  464. /**
  465. * Method read the notification of the server
  466. *
  467. * @param serverPath -> NSString server
  468. * @param sharedOCCommunication -> OCCommunication Singleton of communication to add the operation on the queue.
  469. *
  470. * @return listOfActivity -> OCActivity
  471. *
  472. */
  473. - (void) getActivityServer:(NSString * _Nonnull)serverPath since:(NSInteger)since limit:(NSInteger)limit objectId:(NSString * _Nonnull)objectId objectType:(NSString * _Nonnull)objectType previews:(BOOL)previews link:(NSString * _Nonnull)link onCommunication:(OCCommunication * _Nonnull)sharedOCComunication success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nonnull response))success failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nullable responseObject, NSError * _Nonnull error))failure;
  474. ///-----------------------------------
  475. /// @name Get the list of External sites
  476. ///-----------------------------------
  477. /**
  478. * Method read the notification of the server
  479. *
  480. * @param serverPath -> NSString server
  481. * @param sharedOCCommunication -> OCCommunication Singleton of communication to add the operation on the queue.
  482. *
  483. * @return listOfExternalSites -> OCExternalSites
  484. *
  485. */
  486. - (void) getExternalSitesServer:(NSString * _Nonnull)serverPath onCommunication:(OCCommunication * _Nonnull)sharedOCComunication success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nonnull response))success failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nullable responseObject, NSError * _Nonnull error))failure;
  487. ///-----------------------------------
  488. /// @name Get User Profile
  489. ///-----------------------------------
  490. /**
  491. * Method read the notification of the server
  492. *
  493. * @param serverPath -> NSString server
  494. * @param sharedOCCommunication -> OCCommunication Singleton of communication to add the operation on the queue.
  495. *
  496. * @return userProfile -> OCUserProfile
  497. *
  498. */
  499. - (void) getUserProfileServer:(NSString * _Nonnull)serverPath onCommunication:(OCCommunication * _Nonnull)sharedOCComunication success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nonnull response))success failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nullable responseObject, NSError * _Nonnull error))failure;
  500. ///-----------------------------------
  501. /// End-to-End Encryption
  502. ///-----------------------------------
  503. - (void)getEndToEndPublicKeys:(NSString * _Nonnull)serverPath onCommunication:(OCCommunication * _Nonnull)sharedOCComunication success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nonnull response))success failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nullable responseObject, NSError * _Nonnull error))failure;
  504. - (void)getEndToEndPrivateKeyCipher:(NSString * _Nonnull)serverPath onCommunication:(OCCommunication * _Nonnull)sharedOCComunication success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nonnull response))success failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nullable responseObject, NSError * _Nonnull error))failure;
  505. - (void)getEndToEndServerPublicKey:(NSString * _Nonnull)serverPath onCommunication:(OCCommunication * _Nonnull)sharedOCComunication success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nonnull response))success failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nullable responseObject, NSError * _Nonnull error))failure;
  506. - (void)signEndToEndPublicKey:(NSString * _Nonnull)serverPath key:(NSString * _Nonnull)key onCommunication:(OCCommunication * _Nonnull)sharedOCComunication success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nonnull response))success failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nullable responseObject, NSError * _Nonnull error))failure;
  507. - (void)storeEndToEndPrivateKeyCipher:(NSString * _Nonnull)serverPath key:(NSString * _Nonnull)key onCommunication:(OCCommunication * _Nonnull)sharedOCComunication success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nonnull response))success failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nullable responseObject, NSError * _Nonnull error))failure;
  508. - (void)deleteEndToEndPublicKey:(NSString * _Nonnull)serverPath onCommunication:(OCCommunication * _Nonnull)sharedOCComunication success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nonnull response))success failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nullable responseObject, NSError * _Nonnull error))failure;
  509. - (void)deleteEndToEndPrivateKey:(NSString * _Nonnull)serverPath onCommunication:(OCCommunication * _Nonnull)sharedOCComunication success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nonnull response))success failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nullable responseObject, NSError * _Nonnull error))failure;
  510. - (void)markEndToEndFolderEncrypted:(NSString * _Nonnull)serverPath onCommunication:(OCCommunication * _Nonnull)sharedOCComunication success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nonnull response))success failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nullable responseObject, NSError * _Nonnull error))failure;
  511. - (void)deletemarkEndToEndFolderEncrypted:(NSString * _Nonnull)serverPath e2eToken:(NSString * _Nonnull)e2eToken onCommunication:(OCCommunication * _Nonnull)sharedOCComunication success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nonnull response))success failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nullable responseObject, NSError * _Nonnull error))failure;
  512. - (void)lockEndToEndFolderEncrypted:(NSString * _Nonnull)serverPath e2eToken:(NSString * _Nonnull)e2eToken onCommunication:(OCCommunication * _Nonnull)sharedOCComunication success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nonnull response))success failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nullable responseObject, NSError * _Nonnull error))failure;
  513. - (void)unlockEndToEndFolderEncrypted:(NSString * _Nonnull)serverPath e2eToken:(NSString * _Nonnull)e2eToken onCommunication:(OCCommunication * _Nonnull)sharedOCComunication success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nonnull response))success failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nullable responseObject, NSError * _Nonnull error))failure;
  514. - (void)getEndToEndMetadata:(NSString * _Nonnull)serverPath onCommunication:(OCCommunication * _Nonnull)sharedOCComunication success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nonnull response))success failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nullable responseObject, NSError * _Nonnull error))failure;
  515. - (void)storeEndToEndMetadata:(NSString * _Nonnull)serverPath metadata:(NSString * _Nonnull)metadata e2eToken:(NSString * _Nonnull)e2eToken onCommunication:(OCCommunication * _Nonnull)sharedOCComunication success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nonnull response))success failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nullable responseObject, NSError * _Nonnull error))failure;
  516. - (void)updateEndToEndMetadata:(NSString * _Nonnull)serverPath metadata:(NSString * _Nonnull)metadata e2eToken:(NSString * _Nonnull)e2eToken onCommunication:(OCCommunication * _Nonnull)sharedOCComunication success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nonnull response))success failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nullable responseObject, NSError * _Nonnull error))failure;
  517. - (void)deleteEndToEndMetadata:(NSString * _Nonnull)serverPath e2eToken:(NSString * _Nonnull)e2eToken onCommunication:(OCCommunication * _Nonnull)sharedOCComunication success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nonnull response))success failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nullable responseObject, NSError * _Nonnull error))failure;
  518. ///-----------------------------------
  519. /// Manage Mobile Editor OCS API
  520. ///-----------------------------------
  521. NS_ASSUME_NONNULL_BEGIN
  522. - (void)createLinkRichdocuments:(NSString *_Nonnull)serverPath fileId:(NSString * _Nonnull)fileId onCommunication:(OCCommunication * _Nonnull)sharedOCCommunication success:(void(^)(NSHTTPURLResponse *operation, id response))success failure:(void(^)(NSHTTPURLResponse *operation, id _Nullable responseObject, NSError *error))failure;
  523. - (void)getTemplatesRichdocuments:(NSString *_Nonnull)serverPath onCommunication:(OCCommunication * _Nonnull)sharedOCCommunication success:(void(^)(NSHTTPURLResponse *operation, id response))success failure:(void(^)(NSHTTPURLResponse *operation, id _Nullable responseObject, NSError *error))failure;
  524. - (void)createNewRichdocuments:(NSString *_Nonnull)serverPath path:(NSString *_Nonnull)path templateID:(NSString *_Nonnull)templateID onCommunication:(OCCommunication *_Nonnull)sharedOCCommunication success:(void(^)(NSHTTPURLResponse *operation, id response))success failure:(void(^)(NSHTTPURLResponse *operation, id _Nullable responseObject, NSError *error))failure;
  525. - (void)createAssetRichdocuments:(NSString *_Nonnull)serverPath path:(NSString *_Nonnull)path onCommunication:(OCCommunication *_Nonnull)sharedOCCommunication success:(void(^)(NSHTTPURLResponse *operation, id response))success failure:(void(^)(NSHTTPURLResponse *operation, id _Nullable responseObject, NSError *error))failure;
  526. #pragma mark - Fulltextsearch
  527. - (void)fullTextSearch:(NSString *)serverPath data:(NSString *)data onCommunication:(OCCommunication *)sharedOCCommunication success:(void(^)(NSHTTPURLResponse *operation, id response))success failure:(void(^)(NSHTTPURLResponse *operation, id _Nullable responseObject, NSError *error))failure;
  528. #pragma mark - Remore wipe
  529. - (void)getSetRemoteWipe:(NSString *)serverPath token:(NSString *)token onCommunication:(OCCommunication *)sharedOCCommunication success:(void(^)(NSHTTPURLResponse *operation, id response))success failure:(void(^)(NSHTTPURLResponse *operation, id _Nullable responseObject, NSError *error))failure;
  530. #pragma mark - Trash
  531. - (void)listTrash:(NSString *)path depth:(NSString *)depth onCommunication:(OCCommunication *)sharedOCCommunication success:(void(^)(NSHTTPURLResponse *operation, id response))success failure:(void(^)(NSHTTPURLResponse *response, id _Nullable responseObject, NSError *error))failure;
  532. - (void)emptyTrash:(NSString*)path onCommunication:(OCCommunication *)sharedOCCommunication success:(void(^)(NSHTTPURLResponse *operation, id response))success failure:(void(^)(NSHTTPURLResponse *operation, id _Nullable responseObject, NSError *error))failure;
  533. #pragma mark - Messages
  534. - (void)getComments:(NSString *)serverPath onCommunication:(OCCommunication *)sharedOCCommunication success:(void(^)(NSHTTPURLResponse *operation, id response))success failure:(void(^)(NSHTTPURLResponse *operation, id _Nullable responseObject, NSError *error))failure;
  535. - (void)putComments:(NSString*)serverPath message:(NSString *)message onCommunication:(OCCommunication *)sharedOCCommunication success:(void(^)(NSHTTPURLResponse *operation, id response))success failure:(void(^)(NSHTTPURLResponse *operation, id responseObject, NSError *error))failure;
  536. - (void)updateComments:(NSString*)serverPath message:(NSString *)message onCommunication:(OCCommunication *)sharedOCCommunication success:(void(^)(NSHTTPURLResponse *operation, id response))success failure:(void(^)(NSHTTPURLResponse *operation, id responseObject, NSError *error))failure;
  537. - (void)readMarkComments:(NSString*)serverPath onCommunication:(OCCommunication *)sharedOCCommunication success:(void(^)(NSHTTPURLResponse *operation, id response))success failure:(void(^)(NSHTTPURLResponse *operation, id responseObject, NSError *error))failure;
  538. - (void)deleteComments:(NSString*)serverPath onCommunication:(OCCommunication *)sharedOCCommunication success:(void(^)(NSHTTPURLResponse *operation, id response))success failure:(void(^)(NSHTTPURLResponse *operation, id responseObject, NSError *error))failure;
  539. #pragma mark - Third Parts
  540. - (void)getHCUserProfile:(NSString *)serverPath onCommunication:(OCCommunication *)sharedOCComunication success:(void(^)(NSHTTPURLResponse *operation, id response))success failure:(void(^)(NSHTTPURLResponse *operation, id responseObject, NSError *error))failure;
  541. - (void)putHCUserProfile:(NSString *)serverPath data:(NSString *)data onCommunication:(OCCommunication *)sharedOCCommunication success:(void(^)(NSHTTPURLResponse *operation, id response))success failure:(void(^)(NSHTTPURLResponse *operation, id responseObject, NSError *error))failure;
  542. - (void)getHCFeatures:(NSString *)serverPath onCommunication:(OCCommunication *)sharedOCCommunication success:(void(^)(NSHTTPURLResponse *operation, id response))success failure:(void(^)(NSHTTPURLResponse *operation, id responseObject, NSError *error))failure;
  543. NS_ASSUME_NONNULL_END
  544. @end