NCOperationQueue.swift 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568
  1. //
  2. // NCOperationQueue.swift
  3. // Nextcloud
  4. //
  5. // Created by Marino Faggiana on 03/06/2020.
  6. // Copyright © 2020 Marino Faggiana. All rights reserved.
  7. //
  8. // Author Marino Faggiana <marino.faggiana@nextcloud.com>
  9. //
  10. // This program is free software: you can redistribute it and/or modify
  11. // it under the terms of the GNU General Public License as published by
  12. // the Free Software Foundation, either version 3 of the License, or
  13. // (at your option) any later version.
  14. //
  15. // This program is distributed in the hope that it will be useful,
  16. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. // GNU General Public License for more details.
  19. //
  20. // You should have received a copy of the GNU General Public License
  21. // along with this program. If not, see <http://www.gnu.org/licenses/>.
  22. //
  23. import UIKit
  24. import Queuer
  25. import NCCommunication
  26. @objc class NCOperationQueue: NSObject {
  27. @objc public static let shared: NCOperationQueue = {
  28. let instance = NCOperationQueue()
  29. return instance
  30. }()
  31. private var downloadQueue = Queuer(name: "downloadQueue", maxConcurrentOperationCount: 5, qualityOfService: .default)
  32. private let deleteQueue = Queuer(name: "deleteQueue", maxConcurrentOperationCount: 10, qualityOfService: .default)
  33. private let deleteQueueE2EE = Queuer(name: "deleteQueue", maxConcurrentOperationCount: 1, qualityOfService: .default)
  34. private let copyMoveQueue = Queuer(name: "copyMoveQueue", maxConcurrentOperationCount: 1, qualityOfService: .default)
  35. private let synchronizationQueue = Queuer(name: "synchronizationQueue", maxConcurrentOperationCount: 1, qualityOfService: .default)
  36. private let downloadThumbnailQueue = Queuer(name: "downloadThumbnailQueue", maxConcurrentOperationCount: 10, qualityOfService: .default)
  37. private let downloadAvatarQueue = Queuer(name: "downloadAvatarQueue", maxConcurrentOperationCount: 10, qualityOfService: .default)
  38. private let unifiedSearchQueue = Queuer(name: "unifiedSearchQueue", maxConcurrentOperationCount: 1, qualityOfService: .default)
  39. private var timerReadFileForMediaQueue: Timer?
  40. @objc func cancelAllQueue() {
  41. downloadCancelAll()
  42. deleteCancelAll()
  43. copyMoveCancelAll()
  44. synchronizationCancelAll()
  45. downloadThumbnailCancelAll()
  46. downloadAvatarCancelAll()
  47. unifiedSearchCancelAll()
  48. }
  49. // MARK: - Download file
  50. func download(metadata: tableMetadata, selector: String) {
  51. for operation in downloadQueue.operations as! [NCOperationDownload] {
  52. if operation.metadata.ocId == metadata.ocId {
  53. return
  54. }
  55. }
  56. downloadQueue.addOperation(NCOperationDownload(metadata: metadata, selector: selector))
  57. }
  58. @objc func downloadCancelAll() {
  59. downloadQueue.cancelAll()
  60. }
  61. @objc func downloadQueueCount() -> Int {
  62. return downloadQueue.operationCount
  63. }
  64. @objc func downloadExists(metadata: tableMetadata) -> Bool {
  65. for operation in downloadQueue.operations as! [NCOperationDownload] {
  66. if operation.metadata.ocId == metadata.ocId {
  67. return true
  68. }
  69. }
  70. return false
  71. }
  72. // MARK: - Delete file
  73. @objc func delete(metadata: tableMetadata, onlyLocalCache: Bool) {
  74. let isFolderEncrypted = CCUtility.isFolderEncrypted(metadata.serverUrl, e2eEncrypted: metadata.e2eEncrypted, account: metadata.account, urlBase: metadata.urlBase)
  75. if isFolderEncrypted {
  76. for operation in deleteQueueE2EE.operations as! [NCOperationDelete] {
  77. if operation.metadata.ocId == metadata.ocId {
  78. return
  79. }
  80. }
  81. deleteQueueE2EE.addOperation(NCOperationDelete(metadata: metadata, onlyLocalCache: onlyLocalCache))
  82. } else {
  83. for operation in deleteQueue.operations as! [NCOperationDelete] {
  84. if operation.metadata.ocId == metadata.ocId {
  85. return
  86. }
  87. }
  88. deleteQueue.addOperation(NCOperationDelete(metadata: metadata, onlyLocalCache: onlyLocalCache))
  89. }
  90. }
  91. @objc func deleteCancelAll() {
  92. deleteQueue.cancelAll()
  93. }
  94. // MARK: - Copy Move file
  95. @objc func copyMove(metadata: tableMetadata, serverUrl: String, overwrite: Bool, move: Bool) {
  96. for operation in copyMoveQueue.operations as! [NCOperationCopyMove] {
  97. if operation.metadata.ocId == metadata.ocId {
  98. return
  99. }
  100. }
  101. copyMoveQueue.addOperation(NCOperationCopyMove(metadata: metadata, serverUrlTo: serverUrl, overwrite: overwrite, move: move))
  102. }
  103. @objc func copyMoveCancelAll() {
  104. copyMoveQueue.cancelAll()
  105. }
  106. // MARK: - Synchronization
  107. @objc func synchronizationMetadata(_ metadata: tableMetadata, selector: String) {
  108. for operation in synchronizationQueue.operations as! [NCOperationSynchronization] {
  109. if operation.metadata.ocId == metadata.ocId {
  110. return
  111. }
  112. }
  113. synchronizationQueue.addOperation(NCOperationSynchronization(metadata: metadata, selector: selector))
  114. }
  115. @objc func synchronizationCancelAll() {
  116. synchronizationQueue.cancelAll()
  117. }
  118. // MARK: - Download Thumbnail
  119. @objc func downloadThumbnail(metadata: tableMetadata, placeholder: Bool, cell: UIView?, view: UIView?) {
  120. let cell: NCCellProtocol? = cell as? NCCellProtocol
  121. if placeholder {
  122. if metadata.iconName.count > 0 {
  123. cell?.filePreviewImageView?.image = UIImage(named: metadata.iconName)
  124. } else {
  125. cell?.filePreviewImageView?.image = NCBrandColor.cacheImages.file
  126. }
  127. }
  128. if metadata.hasPreview && metadata.status == NCGlobal.shared.metadataStatusNormal && (!CCUtility.fileProviderStoragePreviewIconExists(metadata.ocId, etag: metadata.etag)) {
  129. for operation in downloadThumbnailQueue.operations as! [NCOperationDownloadThumbnail] {
  130. if operation.metadata.ocId == metadata.ocId {
  131. return
  132. }
  133. }
  134. downloadThumbnailQueue.addOperation(NCOperationDownloadThumbnail(metadata: metadata, cell: cell, view: view))
  135. }
  136. }
  137. func cancelDownloadThumbnail(metadata: tableMetadata) {
  138. for operation in downloadThumbnailQueue.operations as! [NCOperationDownloadThumbnail] {
  139. if operation.metadata.ocId == metadata.ocId {
  140. operation.cancel()
  141. }
  142. }
  143. }
  144. @objc func downloadThumbnailCancelAll() {
  145. downloadThumbnailQueue.cancelAll()
  146. }
  147. // MARK: - Download Avatar
  148. func downloadAvatar(user: String, dispalyName: String?, fileName: String, cell: NCCellProtocol, view: UIView?, cellImageView: UIImageView?) {
  149. let fileNameLocalPath = String(CCUtility.getDirectoryUserData()) + "/" + fileName
  150. if let image = NCManageDatabase.shared.getImageAvatarLoaded(fileName: fileName) {
  151. cellImageView?.image = image
  152. cell.fileAvatarImageView?.image = image
  153. return
  154. }
  155. if let account = NCManageDatabase.shared.getActiveAccount() {
  156. cellImageView?.image = NCUtility.shared.loadUserImage(
  157. for: user,
  158. displayName: dispalyName,
  159. userBaseUrl: account)
  160. }
  161. for operation in downloadAvatarQueue.operations as! [NCOperationDownloadAvatar] {
  162. if operation.fileName == fileName {
  163. return
  164. }
  165. }
  166. downloadAvatarQueue.addOperation(NCOperationDownloadAvatar(user: user, fileName: fileName, fileNameLocalPath: fileNameLocalPath, cell: cell, view: view, cellImageView: cellImageView))
  167. }
  168. func cancelDownloadAvatar(user: String) {
  169. for operation in downloadAvatarQueue.operations as! [NCOperationDownloadAvatar] {
  170. if operation.user == user {
  171. operation.cancel()
  172. }
  173. }
  174. }
  175. @objc func downloadAvatarCancelAll() {
  176. downloadAvatarQueue.cancelAll()
  177. }
  178. // MARK: - Unified Search
  179. func unifiedSearchAddSection(collectionViewCommon: NCCollectionViewCommon, metadatas: [tableMetadata], searchResult: NCCSearchResult) {
  180. unifiedSearchQueue.addOperation(NCOperationUnifiedSearch.init(collectionViewCommon: collectionViewCommon, metadatas: metadatas, searchResult: searchResult))
  181. }
  182. @objc func unifiedSearchCancelAll() {
  183. unifiedSearchQueue.cancelAll()
  184. }
  185. }
  186. // MARK: -
  187. class NCOperationDownload: ConcurrentOperation {
  188. var metadata: tableMetadata
  189. var selector: String
  190. init(metadata: tableMetadata, selector: String) {
  191. self.metadata = tableMetadata.init(value: metadata)
  192. self.selector = selector
  193. }
  194. override func start() {
  195. if isCancelled {
  196. self.finish()
  197. } else {
  198. NCNetworking.shared.download(metadata: metadata, selector: self.selector) { _ in
  199. self.finish()
  200. }
  201. }
  202. }
  203. }
  204. // MARK: -
  205. class NCOperationDelete: ConcurrentOperation {
  206. var metadata: tableMetadata
  207. var onlyLocalCache: Bool
  208. init(metadata: tableMetadata, onlyLocalCache: Bool) {
  209. self.metadata = tableMetadata.init(value: metadata)
  210. self.onlyLocalCache = onlyLocalCache
  211. }
  212. override func start() {
  213. if isCancelled {
  214. self.finish()
  215. } else {
  216. NCNetworking.shared.deleteMetadata(metadata, onlyLocalCache: onlyLocalCache) { errorCode, errorDescription in
  217. if errorCode != 0 {
  218. NCContentPresenter.shared.messageNotification("_error_", description: errorDescription, delay: NCGlobal.shared.dismissAfterSecond, type: NCContentPresenter.messageType.error, errorCode: errorCode)
  219. }
  220. self.finish()
  221. }
  222. }
  223. }
  224. }
  225. // MARK: -
  226. class NCOperationCopyMove: ConcurrentOperation {
  227. var metadata: tableMetadata
  228. var serverUrlTo: String
  229. var overwrite: Bool
  230. var move: Bool
  231. init(metadata: tableMetadata, serverUrlTo: String, overwrite: Bool, move: Bool) {
  232. self.metadata = tableMetadata.init(value: metadata)
  233. self.serverUrlTo = serverUrlTo
  234. self.overwrite = overwrite
  235. self.move = move
  236. }
  237. override func start() {
  238. if isCancelled {
  239. self.finish()
  240. } else {
  241. if move {
  242. NCNetworking.shared.moveMetadata(metadata, serverUrlTo: serverUrlTo, overwrite: overwrite) { errorCode, errorDescription in
  243. if errorCode != 0 {
  244. NCContentPresenter.shared.messageNotification("_error_", description: errorDescription, delay: NCGlobal.shared.dismissAfterSecond, type: NCContentPresenter.messageType.error, errorCode: errorCode)
  245. }
  246. self.finish()
  247. }
  248. } else {
  249. NCNetworking.shared.copyMetadata(metadata, serverUrlTo: serverUrlTo, overwrite: overwrite) { errorCode, errorDescription in
  250. if errorCode != 0 {
  251. NCContentPresenter.shared.messageNotification("_error_", description: errorDescription, delay: NCGlobal.shared.dismissAfterSecond, type: NCContentPresenter.messageType.error, errorCode: errorCode)
  252. }
  253. self.finish()
  254. }
  255. }
  256. }
  257. }
  258. }
  259. // MARK: -
  260. class NCOperationSynchronization: ConcurrentOperation {
  261. var metadata: tableMetadata
  262. var selector: String
  263. var download: Bool
  264. init(metadata: tableMetadata, selector: String) {
  265. self.metadata = tableMetadata.init(value: metadata)
  266. self.selector = selector
  267. if selector == NCGlobal.shared.selectorDownloadFile || selector == NCGlobal.shared.selectorDownloadAllFile {
  268. self.download = true
  269. } else {
  270. self.download = false
  271. }
  272. }
  273. override func start() {
  274. if isCancelled {
  275. self.finish()
  276. } else {
  277. if metadata.directory {
  278. let serverUrl = metadata.serverUrl + "/" + metadata.fileName
  279. let directory = NCManageDatabase.shared.getTableDirectory(predicate: NSPredicate(format: "account == %@ AND serverUrl == %@", metadata.account, serverUrl))
  280. NCCommunication.shared.readFileOrFolder(serverUrlFileName: serverUrl, depth: "0", showHiddenFiles: CCUtility.getShowHiddenFiles()) { account, files, _, errorCode, _ in
  281. if (errorCode == 0) && (directory?.etag != files.first?.etag || self.selector == NCGlobal.shared.selectorDownloadAllFile) {
  282. NCCommunication.shared.readFileOrFolder(serverUrlFileName: serverUrl, depth: "1", showHiddenFiles: CCUtility.getShowHiddenFiles(), queue: NCCommunicationCommon.shared.backgroundQueue) { account, files, _, errorCode, _ in
  283. if errorCode == 0 {
  284. NCManageDatabase.shared.convertNCCommunicationFilesToMetadatas(files, useMetadataFolder: true, account: account) { metadataFolder, _, metadatas in
  285. let metadatasResult = NCManageDatabase.shared.getMetadatas(predicate: NSPredicate(format: "account == %@ AND serverUrl == %@ AND status == %d", account, serverUrl, NCGlobal.shared.metadataStatusNormal))
  286. if self.selector == NCGlobal.shared.selectorDownloadAllFile {
  287. NCManageDatabase.shared.updateMetadatas(metadatas, metadatasResult: metadatasResult)
  288. for metadata in metadatas {
  289. if metadata.directory {
  290. NCOperationQueue.shared.synchronizationMetadata(metadata, selector: self.selector)
  291. } else {
  292. if NCManageDatabase.shared.isDownloadMetadata(metadata, download: true) {
  293. NCOperationQueue.shared.download(metadata: metadata, selector: self.selector)
  294. }
  295. }
  296. }
  297. } else {
  298. let metadatasChanged = NCManageDatabase.shared.updateMetadatas(metadatas, metadatasResult: metadatasResult, addExistsInLocal: self.download, addCompareEtagLocal: true, addDirectorySynchronized: true)
  299. for metadata in metadatasChanged.metadatasUpdate {
  300. if metadata.directory {
  301. NCOperationQueue.shared.synchronizationMetadata(metadata, selector: self.selector)
  302. }
  303. }
  304. for metadata in metadatasChanged.metadatasLocalUpdate {
  305. NCOperationQueue.shared.download(metadata: metadata, selector: self.selector)
  306. }
  307. }
  308. // Update etag directory
  309. NCManageDatabase.shared.addDirectory(encrypted: metadataFolder.e2eEncrypted, favorite: metadataFolder.favorite, ocId: metadataFolder.ocId, fileId: metadataFolder.fileId, etag: metadataFolder.etag, permissions: metadataFolder.permissions, serverUrl: serverUrl, account: metadataFolder.account)
  310. }
  311. } else if errorCode == NCGlobal.shared.errorResourceNotFound && self.metadata.directory {
  312. NCManageDatabase.shared.deleteDirectoryAndSubDirectory(serverUrl: self.metadata.serverUrl, account: self.metadata.account)
  313. }
  314. self.finish()
  315. }
  316. } else {
  317. let metadatas = NCManageDatabase.shared.getMetadatas(predicate: NSPredicate(format: "account == %@ AND serverUrl == %@", account, serverUrl))
  318. for metadata in metadatas {
  319. if metadata.directory {
  320. NCOperationQueue.shared.synchronizationMetadata(metadata, selector: self.selector)
  321. } else {
  322. if NCManageDatabase.shared.isDownloadMetadata(metadata, download: self.download) {
  323. NCOperationQueue.shared.download(metadata: metadata, selector: self.selector)
  324. }
  325. }
  326. }
  327. self.finish()
  328. }
  329. }
  330. } else {
  331. if NCManageDatabase.shared.isDownloadMetadata(metadata, download: self.download) {
  332. NCOperationQueue.shared.download(metadata: metadata, selector: self.selector)
  333. }
  334. self.finish()
  335. }
  336. }
  337. }
  338. }
  339. // MARK: -
  340. class NCOperationDownloadThumbnail: ConcurrentOperation {
  341. var metadata: tableMetadata
  342. var cell: NCCellProtocol?
  343. var view: UIView?
  344. var fileNamePath: String = ""
  345. var fileNamePreviewLocalPath: String = ""
  346. var fileNameIconLocalPath: String = ""
  347. init(metadata: tableMetadata, cell: NCCellProtocol?, view: UIView?) {
  348. self.metadata = tableMetadata.init(value: metadata)
  349. self.cell = cell
  350. self.view = view
  351. self.fileNamePath = CCUtility.returnFileNamePath(fromFileName: metadata.fileName, serverUrl: metadata.serverUrl, urlBase: metadata.urlBase, account: metadata.account)!
  352. self.fileNamePreviewLocalPath = CCUtility.getDirectoryProviderStoragePreviewOcId(metadata.ocId, etag: metadata.etag)!
  353. self.fileNameIconLocalPath = CCUtility.getDirectoryProviderStorageIconOcId(metadata.ocId, etag: metadata.etag)!
  354. }
  355. override func start() {
  356. if isCancelled {
  357. self.finish()
  358. } else {
  359. var etagResource: String?
  360. if FileManager.default.fileExists(atPath: fileNameIconLocalPath) && FileManager.default.fileExists(atPath: fileNamePreviewLocalPath) {
  361. etagResource = metadata.etagResource
  362. }
  363. NCCommunication.shared.downloadPreview(
  364. fileNamePathOrFileId: fileNamePath,
  365. fileNamePreviewLocalPath: fileNamePreviewLocalPath,
  366. widthPreview: NCGlobal.shared.sizePreview,
  367. heightPreview: NCGlobal.shared.sizePreview,
  368. fileNameIconLocalPath: fileNameIconLocalPath,
  369. sizeIcon: NCGlobal.shared.sizeIcon,
  370. etag: etagResource,
  371. queue: NCCommunicationCommon.shared.backgroundQueue) { _, _, imageIcon, _, etag, errorCode, _ in
  372. if errorCode == 0, let imageIcon = imageIcon {
  373. NCManageDatabase.shared.setMetadataEtagResource(ocId: self.metadata.ocId, etagResource: etag)
  374. DispatchQueue.main.async {
  375. if self.metadata.ocId == self.cell?.fileObjectId, let filePreviewImageView = self.cell?.filePreviewImageView {
  376. UIView.transition(with: filePreviewImageView,
  377. duration: 0.75,
  378. options: .transitionCrossDissolve,
  379. animations: { filePreviewImageView.image = imageIcon },
  380. completion: nil)
  381. } else {
  382. if self.view is UICollectionView {
  383. (self.view as? UICollectionView)?.reloadData()
  384. } else if self.view is UITableView {
  385. (self.view as? UITableView)?.reloadData()
  386. }
  387. }
  388. NotificationCenter.default.postOnMainThread(name: NCGlobal.shared.notificationCenterDownloadedThumbnail, userInfo: ["ocId": self.metadata.ocId])
  389. }
  390. }
  391. self.finish()
  392. }
  393. }
  394. }
  395. }
  396. // MARK: -
  397. class NCOperationDownloadAvatar: ConcurrentOperation {
  398. var user: String
  399. var fileName: String
  400. var etag: String?
  401. var fileNameLocalPath: String
  402. var cell: NCCellProtocol!
  403. var view: UIView?
  404. var cellImageView: UIImageView?
  405. init(user: String, fileName: String, fileNameLocalPath: String, cell: NCCellProtocol, view: UIView?, cellImageView: UIImageView?) {
  406. self.user = user
  407. self.fileName = fileName
  408. self.fileNameLocalPath = fileNameLocalPath
  409. self.cell = cell
  410. self.view = view
  411. self.etag = NCManageDatabase.shared.getTableAvatar(fileName: fileName)?.etag
  412. self.cellImageView = cellImageView
  413. }
  414. override func start() {
  415. if isCancelled {
  416. self.finish()
  417. } else {
  418. NCCommunication.shared.downloadAvatar(user: user, fileNameLocalPath: fileNameLocalPath, sizeImage: NCGlobal.shared.avatarSize, avatarSizeRounded: NCGlobal.shared.avatarSizeRounded, etag: self.etag, queue: NCCommunicationCommon.shared.backgroundQueue) { _, imageAvatar, _, etag, errorCode, _ in
  419. if errorCode == 0, let imageAvatar = imageAvatar, let etag = etag {
  420. NCManageDatabase.shared.addAvatar(fileName: self.fileName, etag: etag)
  421. DispatchQueue.main.async {
  422. if self.user == self.cell.fileUser, let avatarImageView = self.cellImageView {
  423. UIView.transition(with: avatarImageView,
  424. duration: 0.75,
  425. options: .transitionCrossDissolve,
  426. animations: { avatarImageView.image = imageAvatar },
  427. completion: nil)
  428. } else {
  429. if self.view is UICollectionView {
  430. (self.view as? UICollectionView)?.reloadData()
  431. } else if self.view is UITableView {
  432. (self.view as? UITableView)?.reloadData()
  433. }
  434. }
  435. }
  436. } else if errorCode == NCGlobal.shared.errorNotModified {
  437. NCManageDatabase.shared.setAvatarLoaded(fileName: self.fileName)
  438. }
  439. self.finish()
  440. }
  441. }
  442. }
  443. }
  444. // MARK: -
  445. class NCOperationUnifiedSearch: ConcurrentOperation {
  446. var collectionViewCommon: NCCollectionViewCommon
  447. var metadatas: [tableMetadata]
  448. var searchResult: NCCSearchResult
  449. init(collectionViewCommon: NCCollectionViewCommon, metadatas: [tableMetadata], searchResult: NCCSearchResult) {
  450. self.collectionViewCommon = collectionViewCommon
  451. self.metadatas = metadatas
  452. self.searchResult = searchResult
  453. }
  454. func reloadDataThenPerform(_ closure: @escaping (() -> Void)) {
  455. DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
  456. CATransaction.begin()
  457. CATransaction.setCompletionBlock(closure)
  458. self.collectionViewCommon.collectionView.reloadData()
  459. CATransaction.commit()
  460. }
  461. }
  462. override func start() {
  463. if isCancelled {
  464. self.finish()
  465. } else {
  466. self.collectionViewCommon.dataSource.addSection(metadatas: metadatas, searchResult: searchResult)
  467. self.collectionViewCommon.searchResults?.append(self.searchResult)
  468. reloadDataThenPerform {
  469. self.finish()
  470. }
  471. }
  472. }
  473. }