NCNetworkingSync.m 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421
  1. //
  2. // NCNetworkingSync.m
  3. // Nextcloud
  4. //
  5. // Created by Marino Faggiana on 29/10/17.
  6. // Copyright © 2017 TWS. All rights reserved.
  7. //
  8. #import "NCNetworkingSync.h"
  9. #import "CCUtility.h"
  10. #import "CCCertificate.h"
  11. #import "NCBridgeSwift.h"
  12. @implementation NCNetworkingSync
  13. + (NCNetworkingSync *)sharedManager {
  14. static NCNetworkingSync *sharedManager;
  15. @synchronized(self)
  16. {
  17. if (!sharedManager) {
  18. sharedManager = [NCNetworkingSync new];
  19. }
  20. return sharedManager;
  21. }
  22. }
  23. #pragma --------------------------------------------------------------------------------------------
  24. #pragma mark ============================
  25. #pragma --------------------------------------------------------------------------------------------
  26. - (NSError *)uploadFile:(NSString *)localFilePathName remoteFilePathName:(NSString *)remoteFilePathName user:(NSString *)user userID:(NSString *)userID password:(NSString *)password
  27. {
  28. OCCommunication *communication = [CCNetworking sharedNetworking].sharedOCCommunication;
  29. __block NSError *returnError = nil;
  30. dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);
  31. [communication setCredentialsWithUser:user andUserID:userID andPassword:password];
  32. [communication setUserAgent:[CCUtility getUserAgent]];
  33. [communication uploadFileSession:localFilePathName toDestiny:remoteFilePathName onCommunication:communication progress:^(NSProgress *progress) {
  34. // Progress
  35. } successRequest:^(NSURLResponse *response, NSString *redirectedServer) {
  36. dispatch_semaphore_signal(semaphore);
  37. } failureRequest:^(NSURLResponse *response, NSString *redirectedServer, NSError *error) {
  38. NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse*)response;
  39. returnError = [NSError errorWithDomain:@"com.nextcloud.nextcloud" code:httpResponse.statusCode userInfo:[NSDictionary dictionaryWithObject:@"Upload file error" forKey:NSLocalizedDescriptionKey]];
  40. dispatch_semaphore_signal(semaphore);
  41. } failureBeforeRequest:^(NSError *error) {
  42. returnError = error;
  43. dispatch_semaphore_signal(semaphore);
  44. }];
  45. while (dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER))
  46. [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:k_timeout_webdav]];
  47. return returnError;
  48. }
  49. - (NSError *)checkServer:(NSString *)serverUrl user:(NSString *)user userID:(NSString *)userID password:(NSString *)password
  50. {
  51. OCCommunication *communication = [CCNetworking sharedNetworking].sharedOCCommunication;
  52. __block NSError *returnError = nil;
  53. dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);
  54. [communication setCredentialsWithUser:user andUserID:userID andPassword:password];
  55. [communication setUserAgent:[CCUtility getUserAgent]];
  56. [communication checkServer:serverUrl onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSString *redirectedServer) {
  57. dispatch_semaphore_signal(semaphore);
  58. } failureRequest:^(NSHTTPURLResponse *response, NSError *error, NSString *redirectedServer) {
  59. returnError = [NSError errorWithDomain:@"com.nextcloud.nextcloud" code:response.statusCode userInfo:[NSDictionary dictionaryWithObject:@"Check server error" forKey:NSLocalizedDescriptionKey]];
  60. dispatch_semaphore_signal(semaphore);
  61. }];
  62. while (dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER))
  63. [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:k_timeout_webdav]];
  64. return returnError;
  65. }
  66. - (NSError *)readFile:(NSString *)filePathName user:(NSString *)user userID:(NSString *)userID password:(NSString *)password
  67. {
  68. OCCommunication *communication = [CCNetworking sharedNetworking].sharedOCCommunication;
  69. __block NSError *returnError = nil;
  70. dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);
  71. [communication setCredentialsWithUser: user andUserID: userID andPassword: password];
  72. [communication setUserAgent:[CCUtility getUserAgent]];
  73. [communication readFile:filePathName onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSArray *items, NSString *redirectedServer) {
  74. dispatch_semaphore_signal(semaphore);
  75. } failureRequest:^(NSHTTPURLResponse *response, NSError *error, NSString *redirectedServer) {
  76. returnError = [NSError errorWithDomain:@"com.nextcloud.nextcloud" code:response.statusCode userInfo:[NSDictionary dictionaryWithObject:@"Read file error" forKey:NSLocalizedDescriptionKey]];
  77. dispatch_semaphore_signal(semaphore);
  78. }];
  79. while (dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER))
  80. [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:k_timeout_webdav]];
  81. return returnError;
  82. }
  83. #pragma --------------------------------------------------------------------------------------------
  84. #pragma mark ===== End-to-End Encryption =====
  85. #pragma --------------------------------------------------------------------------------------------
  86. - (NSError *)markEndToEndFolderEncrypted:(NSString *)user userID:(NSString *)userID password:(NSString *)password url:(NSString *)url fileID:(NSString *)fileID token:(NSString **)token
  87. {
  88. OCCommunication *communication = [CCNetworking sharedNetworking].sharedOCCommunication;
  89. __block NSError *returnError = nil;
  90. __block NSString *returnToken = nil;
  91. dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);
  92. [communication setCredentialsWithUser:user andUserID:userID andPassword:password];
  93. [communication setUserAgent:[CCUtility getUserAgent]];
  94. // LOCK
  95. [communication lockEndToEndFolderEncrypted:[url stringByAppendingString:@"/"] fileID:fileID token:*token onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSString *token, NSString *redirectedServer) {
  96. returnToken = token;
  97. // MARK
  98. [communication markEndToEndFolderEncrypted:[url stringByAppendingString:@"/"] fileID:fileID onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSString *redirectedServer) {
  99. // UNLOCK
  100. [communication unlockEndToEndFolderEncrypted:[url stringByAppendingString:@"/"] fileID:fileID token:returnToken onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSString *redirectedServer) {
  101. returnToken = nil;
  102. dispatch_semaphore_signal(semaphore);
  103. } failureRequest:^(NSHTTPURLResponse *response, NSError *error, NSString *redirectedServer) {
  104. returnError = [NSError errorWithDomain:@"com.nextcloud.nextcloud" code:response.statusCode userInfo:[NSDictionary dictionaryWithObject:@"Unlock folder error" forKey:NSLocalizedDescriptionKey]];
  105. dispatch_semaphore_signal(semaphore);
  106. }];
  107. } failureRequest:^(NSHTTPURLResponse *response, NSError *error, NSString *redirectedServer) {
  108. returnError = [NSError errorWithDomain:@"com.nextcloud.nextcloud" code:response.statusCode userInfo:[NSDictionary dictionaryWithObject:@"Mark folder as encrypted error" forKey:NSLocalizedDescriptionKey]];
  109. dispatch_semaphore_signal(semaphore);
  110. }];
  111. } failureRequest:^(NSHTTPURLResponse *response, NSError *error, NSString *redirectedServer) {
  112. returnError = [NSError errorWithDomain:@"com.nextcloud.nextcloud" code:response.statusCode userInfo:[NSDictionary dictionaryWithObject:@"Lock folder error" forKey:NSLocalizedDescriptionKey]];
  113. dispatch_semaphore_signal(semaphore);
  114. }];
  115. while (dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER))
  116. [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:k_timeout_webdav]];
  117. *token = returnToken;
  118. return returnError;
  119. }
  120. - (NSError *)deletemarkEndToEndFolderEncrypted:(NSString *)user userID:(NSString *)userID password:(NSString *)password url:(NSString *)url fileID:(NSString *)fileID token:(NSString **)token
  121. {
  122. OCCommunication *communication = [CCNetworking sharedNetworking].sharedOCCommunication;
  123. __block NSError *returnError = nil;
  124. __block NSString *returnToken = nil;
  125. dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);
  126. [communication setCredentialsWithUser:user andUserID:userID andPassword:password];
  127. [communication setUserAgent:[CCUtility getUserAgent]];
  128. // LOCK
  129. [communication lockEndToEndFolderEncrypted:[url stringByAppendingString:@"/"] fileID:fileID token:*token onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSString *token, NSString *redirectedServer) {
  130. returnToken = token;
  131. // REMOVE METADATA
  132. [communication deleteEndToEndMetadata:[url stringByAppendingString:@"/"] fileID:fileID onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSString *redirectedServer) {
  133. // DELETE MARK
  134. [communication deletemarkEndToEndFolderEncrypted:[url stringByAppendingString:@"/"] fileID:fileID onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSString *redirectedServer) {
  135. // UNLOCK
  136. [communication unlockEndToEndFolderEncrypted:[url stringByAppendingString:@"/"] fileID:fileID token:returnToken onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSString *redirectedServer) {
  137. returnToken = nil;
  138. dispatch_semaphore_signal(semaphore);
  139. } failureRequest:^(NSHTTPURLResponse *response, NSError *error, NSString *redirectedServer) {
  140. returnError = [NSError errorWithDomain:@"com.nextcloud.nextcloud" code:response.statusCode userInfo:[NSDictionary dictionaryWithObject:@"Unlock folder error" forKey:NSLocalizedDescriptionKey]];
  141. dispatch_semaphore_signal(semaphore);
  142. }];
  143. } failureRequest:^(NSHTTPURLResponse *response, NSError *error, NSString *redirectedServer) {
  144. returnError = [NSError errorWithDomain:@"com.nextcloud.nextcloud" code:response.statusCode userInfo:[NSDictionary dictionaryWithObject:@"Mark folder as encrypted error" forKey:NSLocalizedDescriptionKey]];
  145. dispatch_semaphore_signal(semaphore);
  146. }];
  147. } failureRequest:^(NSHTTPURLResponse *response, NSError *error, NSString *redirectedServer) {
  148. returnError = [NSError errorWithDomain:@"com.nextcloud.nextcloud" code:response.statusCode userInfo:[NSDictionary dictionaryWithObject:@"Mark folder as encrypted error" forKey:NSLocalizedDescriptionKey]];
  149. dispatch_semaphore_signal(semaphore);
  150. }];
  151. } failureRequest:^(NSHTTPURLResponse *response, NSError *error, NSString *redirectedServer) {
  152. returnError = [NSError errorWithDomain:@"com.nextcloud.nextcloud" code:response.statusCode userInfo:[NSDictionary dictionaryWithObject:@"Lock folder error" forKey:NSLocalizedDescriptionKey]];
  153. dispatch_semaphore_signal(semaphore);
  154. }];
  155. while (dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER))
  156. [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:k_timeout_webdav]];
  157. *token = returnToken;
  158. return returnError;
  159. }
  160. - (NSError *)getEndToEndMetadata:(NSString *)user userID:(NSString *)userID password:(NSString *)password url:(NSString *)url fileID:(NSString *)fileID metadata:(NSString **)metadata
  161. {
  162. OCCommunication *communication = [CCNetworking sharedNetworking].sharedOCCommunication;
  163. __block NSError *returnError = nil;
  164. __block NSString *returnMetadata = nil;
  165. dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);
  166. [communication setCredentialsWithUser:user andUserID:userID andPassword:password];
  167. [communication setUserAgent:[CCUtility getUserAgent]];
  168. [communication getEndToEndMetadata:[url stringByAppendingString:@"/"] fileID:fileID onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSString *encryptedMetadata, NSString *redirectedServer) {
  169. returnMetadata = encryptedMetadata;
  170. dispatch_semaphore_signal(semaphore);
  171. } failureRequest:^(NSHTTPURLResponse *response, NSError *error, NSString *redirectedServer) {
  172. returnError = [NSError errorWithDomain:@"com.nextcloud.nextcloud" code:response.statusCode userInfo:[NSDictionary dictionaryWithObject:@"Unlock folder error" forKey:NSLocalizedDescriptionKey]];
  173. dispatch_semaphore_signal(semaphore);
  174. }];
  175. while (dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER))
  176. [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:k_timeout_webdav]];
  177. *metadata = returnMetadata;
  178. return returnError;
  179. }
  180. - (NSError *)storeEndToEndMetadata:(NSString *)user userID:(NSString *)userID password:(NSString *)password url:(NSString *)url fileID:(NSString *)fileID metadata:(NSString *)metadata token:(NSString **)token
  181. {
  182. OCCommunication *communication = [CCNetworking sharedNetworking].sharedOCCommunication;
  183. __block NSError *returnError = nil;
  184. __block NSString *returnToken = nil;
  185. dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);
  186. [communication setCredentialsWithUser:user andUserID:userID andPassword:password];
  187. [communication setUserAgent:[CCUtility getUserAgent]];
  188. // LOCK
  189. [communication lockEndToEndFolderEncrypted:[url stringByAppendingString:@"/"] fileID:fileID token:*token onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSString *token, NSString *redirectedServer) {
  190. returnToken = token;
  191. // STORE METADATA
  192. [communication storeEndToEndMetadata:[url stringByAppendingString:@"/"] fileID:fileID encryptedMetadata:metadata onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSString *encryptedMetadata, NSString *redirectedServer) {
  193. // UNLOCK
  194. [communication unlockEndToEndFolderEncrypted:[url stringByAppendingString:@"/"] fileID:fileID token:returnToken onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSString *redirectedServer) {
  195. returnToken = nil;
  196. dispatch_semaphore_signal(semaphore);
  197. } failureRequest:^(NSHTTPURLResponse *response, NSError *error, NSString *redirectedServer) {
  198. returnError = [NSError errorWithDomain:@"com.nextcloud.nextcloud" code:response.statusCode userInfo:[NSDictionary dictionaryWithObject:@"Unlock folder error" forKey:NSLocalizedDescriptionKey]];
  199. dispatch_semaphore_signal(semaphore);
  200. }];
  201. } failureRequest:^(NSHTTPURLResponse *response, NSError *error, NSString *redirectedServer) {
  202. returnError = [NSError errorWithDomain:@"com.nextcloud.nextcloud" code:response.statusCode userInfo:[NSDictionary dictionaryWithObject:@"Mark folder as encrypted error" forKey:NSLocalizedDescriptionKey]];
  203. dispatch_semaphore_signal(semaphore);
  204. }];
  205. } failureRequest:^(NSHTTPURLResponse *response, NSError *error, NSString *redirectedServer) {
  206. returnError = [NSError errorWithDomain:@"com.nextcloud.nextcloud" code:response.statusCode userInfo:[NSDictionary dictionaryWithObject:@"Lock folder error" forKey:NSLocalizedDescriptionKey]];
  207. dispatch_semaphore_signal(semaphore);
  208. }];
  209. while (dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER))
  210. [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:k_timeout_webdav]];
  211. *token = returnToken;
  212. return returnError;
  213. }
  214. - (NSError *)updateEndToEndMetadata:(NSString *)user userID:(NSString *)userID password:(NSString *)password url:(NSString *)url fileID:(NSString *)fileID metadata:(NSString *)metadata token:(NSString **)token
  215. {
  216. OCCommunication *communication = [CCNetworking sharedNetworking].sharedOCCommunication;
  217. __block NSError *returnError = nil;
  218. __block NSString *returnToken = nil;
  219. dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);
  220. [communication setCredentialsWithUser:user andUserID:userID andPassword:password];
  221. [communication setUserAgent:[CCUtility getUserAgent]];
  222. // LOCK
  223. [communication lockEndToEndFolderEncrypted:[url stringByAppendingString:@"/"] fileID:fileID token:*token onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSString *token, NSString *redirectedServer) {
  224. returnToken = token;
  225. // UPDATA METADATA
  226. [communication updateEndToEndMetadata:[url stringByAppendingString:@"/"] fileID:fileID encryptedMetadata:metadata onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSString *encryptedMetadata, NSString *redirectedServer) {
  227. // UNLOCK
  228. [communication unlockEndToEndFolderEncrypted:[url stringByAppendingString:@"/"] fileID:fileID token:returnToken onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSString *redirectedServer) {
  229. returnToken = nil;
  230. dispatch_semaphore_signal(semaphore);
  231. } failureRequest:^(NSHTTPURLResponse *response, NSError *error, NSString *redirectedServer) {
  232. returnError = [NSError errorWithDomain:@"com.nextcloud.nextcloud" code:response.statusCode userInfo:[NSDictionary dictionaryWithObject:@"Unlock folder error" forKey:NSLocalizedDescriptionKey]];
  233. dispatch_semaphore_signal(semaphore);
  234. }];
  235. } failureRequest:^(NSHTTPURLResponse *response, NSError *error, NSString *redirectedServer) {
  236. returnError = [NSError errorWithDomain:@"com.nextcloud.nextcloud" code:response.statusCode userInfo:[NSDictionary dictionaryWithObject:@"Mark folder as encrypted error" forKey:NSLocalizedDescriptionKey]];
  237. dispatch_semaphore_signal(semaphore);
  238. }];
  239. } failureRequest:^(NSHTTPURLResponse *response, NSError *error, NSString *redirectedServer) {
  240. returnError = [NSError errorWithDomain:@"com.nextcloud.nextcloud" code:response.statusCode userInfo:[NSDictionary dictionaryWithObject:@"Lock folder error" forKey:NSLocalizedDescriptionKey]];
  241. dispatch_semaphore_signal(semaphore);
  242. }];
  243. while (dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER))
  244. [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:k_timeout_webdav]];
  245. *token = returnToken;
  246. return returnError;
  247. }
  248. - (NSError *)lockEndToEndFolderEncrypted:(NSString *)user userID:(NSString *)userID password:(NSString *)password url:(NSString *)url fileID:(NSString *)fileID token:(NSString **)token
  249. {
  250. OCCommunication *communication = [CCNetworking sharedNetworking].sharedOCCommunication;
  251. __block NSError *returnError = nil;
  252. __block NSString *returnToken = nil;
  253. dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);
  254. [communication setCredentialsWithUser:user andUserID:userID andPassword:password];
  255. [communication setUserAgent:[CCUtility getUserAgent]];
  256. [communication lockEndToEndFolderEncrypted:[url stringByAppendingString:@"/"] fileID:fileID token:*token onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSString *token, NSString *redirectedServer) {
  257. returnToken = token;
  258. dispatch_semaphore_signal(semaphore);
  259. } failureRequest:^(NSHTTPURLResponse *response, NSError *error, NSString *redirectedServer) {
  260. returnError = [NSError errorWithDomain:@"com.nextcloud.nextcloud" code:response.statusCode userInfo:[NSDictionary dictionaryWithObject:@"Lock folder error" forKey:NSLocalizedDescriptionKey]];
  261. dispatch_semaphore_signal(semaphore);
  262. }];
  263. while (dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER))
  264. [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:k_timeout_webdav]];
  265. *token = returnToken;
  266. return returnError;
  267. }
  268. - (NSError *)unlockEndToEndFolderEncrypted:(NSString *)user userID:(NSString *)userID password:(NSString *)password url:(NSString *)url fileID:(NSString *)fileID token:(NSString *)token
  269. {
  270. OCCommunication *communication = [CCNetworking sharedNetworking].sharedOCCommunication;
  271. __block NSError *returnError= nil;
  272. dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);
  273. [communication setCredentialsWithUser:user andUserID:userID andPassword:password];
  274. [communication setUserAgent:[CCUtility getUserAgent]];
  275. [communication unlockEndToEndFolderEncrypted:[url stringByAppendingString:@"/"] fileID:fileID token:token onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSString *redirectedServer) {
  276. dispatch_semaphore_signal(semaphore);
  277. } failureRequest:^(NSHTTPURLResponse *response, NSError *error, NSString *redirectedServer) {
  278. returnError = [NSError errorWithDomain:@"com.nextcloud.nextcloud" code:response.statusCode userInfo:[NSDictionary dictionaryWithObject:@"Unlock folder error" forKey:NSLocalizedDescriptionKey]];
  279. dispatch_semaphore_signal(semaphore);
  280. }];
  281. while (dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER))
  282. [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:k_timeout_webdav]];
  283. return returnError;
  284. }
  285. @end