nextcloud-desktop.git
3 years agoImprove logging in files database manager with use of Logger
Claudio Cambra [Tue, 14 Mar 2023 20:03:30 +0000 (21:03 +0100)]
Improve logging in files database manager with use of Logger

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoAdd a logger extensions to use system unified logging in File Provider components
Claudio Cambra [Tue, 14 Mar 2023 20:02:25 +0000 (21:02 +0100)]
Add a logger extensions to use system unified logging in File Provider components

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoRemove unnecessary full reimport after initial account configuration in FileProviderE...
Claudio Cambra [Tue, 14 Mar 2023 18:23:49 +0000 (19:23 +0100)]
Remove unnecessary full reimport after initial account configuration in FileProviderExtension

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoImprove error handling in fetchContents if path is not available FileProviderExtension
Claudio Cambra [Tue, 14 Mar 2023 18:01:34 +0000 (19:01 +0100)]
Improve error handling in fetchContents if path is not available FileProviderExtension

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoProperly respond to errors in working set enumerateItems in FileProviderEnumerator
Claudio Cambra [Tue, 14 Mar 2023 15:06:20 +0000 (16:06 +0100)]
Properly respond to errors in working set enumerateItems in FileProviderEnumerator

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoAdd directoryMetadataLogString convenience method for logging in NextcloudFilesDataba...
Claudio Cambra [Tue, 14 Mar 2023 15:02:53 +0000 (16:02 +0100)]
Add directoryMetadataLogString convenience method for logging in NextcloudFilesDatabaseManager

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoDo not delete "no longer existing files" when doing enumeration of items in FileProvi...
Claudio Cambra [Tue, 14 Mar 2023 15:01:34 +0000 (16:01 +0100)]
Do not delete "no longer existing files" when doing enumeration of items in FileProviderEnumerator

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoAdd helper itemMetadataLogString static func for logging in NextcloudFilesDatabaseManager
Claudio Cambra [Tue, 14 Mar 2023 13:40:34 +0000 (14:40 +0100)]
Add helper itemMetadataLogString static func for logging in NextcloudFilesDatabaseManager

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoProperly write item metadata status update to database in NextcloudFilesDatabaseManager
Claudio Cambra [Tue, 14 Mar 2023 13:22:28 +0000 (14:22 +0100)]
Properly write item metadata status update to database in NextcloudFilesDatabaseManager

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoRun poll timer for enumerator signalling to notify accounts without push notification...
Claudio Cambra [Mon, 13 Mar 2023 17:02:34 +0000 (18:02 +0100)]
Run poll timer for enumerator signalling to notify accounts without push notifications in FileProviderDomainManager

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoUse new convenience method to check if push notifications ready for account in FilePr...
Claudio Cambra [Mon, 13 Mar 2023 16:58:55 +0000 (17:58 +0100)]
Use new convenience method to check if push notifications ready for account in FileProviderDomainManager

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoAdd convenience method to retrieve registered domain ids in private FileProviderDomai...
Claudio Cambra [Mon, 13 Mar 2023 16:48:52 +0000 (17:48 +0100)]
Add convenience method to retrieve registered domain ids in private FileProviderDomainManager class

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoAdd some additional converters for domain and account identifiers in FileProviderDoma...
Claudio Cambra [Mon, 13 Mar 2023 16:48:30 +0000 (17:48 +0100)]
Add some additional converters for domain and account identifiers in FileProviderDomainManager

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoSignal enumerator after reconnecting file provider domain
Claudio Cambra [Mon, 13 Mar 2023 16:24:57 +0000 (17:24 +0100)]
Signal enumerator after reconnecting file provider domain

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoSubmit tasks to do after readding file provider domain as completion blocks
Claudio Cambra [Mon, 13 Mar 2023 15:47:18 +0000 (16:47 +0100)]
Submit tasks to do after readding file provider domain as completion blocks

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoAdd completion handler to readdFileProviderDomain method in fileproviderdomainmanager
Claudio Cambra [Mon, 13 Mar 2023 15:46:52 +0000 (16:46 +0100)]
Add completion handler to readdFileProviderDomain method in fileproviderdomainmanager

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoHandle situations where we might not get a manager for our desired domain in fileprov...
Claudio Cambra [Mon, 13 Mar 2023 15:29:12 +0000 (16:29 +0100)]
Handle situations where we might not get a manager for our desired domain in fileproviderdomainmanager

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoAdd readdFileProviderDomain convenience method to fileproviderdomainmanager
Claudio Cambra [Mon, 13 Mar 2023 15:28:49 +0000 (16:28 +0100)]
Add readdFileProviderDomain convenience method to fileproviderdomainmanager

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoEnsure that wipeAllFileProviderDomains doesn't break on macOS 11
Claudio Cambra [Mon, 13 Mar 2023 15:28:18 +0000 (16:28 +0100)]
Ensure that wipeAllFileProviderDomains doesn't break on macOS 11

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoEnsure registered domains are added and removed at appropriate times in fileproviderd...
Claudio Cambra [Mon, 13 Mar 2023 15:22:48 +0000 (16:22 +0100)]
Ensure registered domains are added and removed at appropriate times in fileproviderdomainmanager

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoProvide file provider errors in FileProviderExtension methods
Claudio Cambra [Mon, 13 Mar 2023 14:17:26 +0000 (15:17 +0100)]
Provide file provider errors in FileProviderExtension methods

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoFix general error handling in FileProviderEnumerator
Claudio Cambra [Mon, 13 Mar 2023 14:09:43 +0000 (15:09 +0100)]
Fix general error handling in FileProviderEnumerator

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoUse NKError extension properties instead of magic numbers in FileProviderEnumerator
Claudio Cambra [Mon, 13 Mar 2023 14:03:28 +0000 (15:03 +0100)]
Use NKError extension properties instead of magic numbers in FileProviderEnumerator

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoImprove handling of no changes return in readFileOrFolder throughout FileProviderEnum...
Claudio Cambra [Mon, 13 Mar 2023 13:59:46 +0000 (14:59 +0100)]
Improve handling of no changes return in readFileOrFolder throughout FileProviderEnumerator

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoProperly handle stopping when finding matching etags in readServerUrl of FileProvider...
Claudio Cambra [Mon, 13 Mar 2023 13:50:50 +0000 (14:50 +0100)]
Properly handle stopping when finding matching etags in readServerUrl of FileProviderEnumerator

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoAdd no changes error code in NKError extension
Claudio Cambra [Mon, 13 Mar 2023 13:38:21 +0000 (14:38 +0100)]
Add no changes error code in NKError extension

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoMake NKError extension conversion more legible
Claudio Cambra [Mon, 13 Mar 2023 13:35:47 +0000 (14:35 +0100)]
Make NKError extension conversion more legible

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoUse NKError extension method in FileProviderEnumerator enumerate methods
Claudio Cambra [Mon, 13 Mar 2023 13:27:17 +0000 (14:27 +0100)]
Use NKError extension method in FileProviderEnumerator enumerate methods

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoAdd NKError extension to make conversion to FileProviderError easier
Claudio Cambra [Mon, 13 Mar 2023 13:18:03 +0000 (14:18 +0100)]
Add NKError extension to make conversion to FileProviderError easier

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoImplement better error handling in enumerator changes
Claudio Cambra [Mon, 13 Mar 2023 13:15:32 +0000 (14:15 +0100)]
Implement better error handling in enumerator changes

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoRespond to materializedItemsDidChange in FileProviderExtension
Claudio Cambra [Mon, 13 Mar 2023 12:43:31 +0000 (13:43 +0100)]
Respond to materializedItemsDidChange in FileProviderExtension

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoAdd completion handler to materialised observer
Claudio Cambra [Mon, 13 Mar 2023 12:39:24 +0000 (13:39 +0100)]
Add completion handler to materialised observer

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoAdded FileProviderMaterialisedEnumerationObserver to handle clean up operations after...
Claudio Cambra [Mon, 13 Mar 2023 12:28:08 +0000 (13:28 +0100)]
Added FileProviderMaterialisedEnumerationObserver to handle clean up operations after materialisation changes

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoSplit up the huge NextcloudFilesDatabaseTables file into separate files for each...
Claudio Cambra [Mon, 13 Mar 2023 11:43:27 +0000 (12:43 +0100)]
Split up the huge NextcloudFilesDatabaseTables file into separate files for each table schema

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoRename misleading FileProviderFilesUtils to LocalFilesUtils
Claudio Cambra [Mon, 13 Mar 2023 11:38:54 +0000 (12:38 +0100)]
Rename misleading FileProviderFilesUtils to LocalFilesUtils

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoRemove isFileSynced function which does not work as intended
Claudio Cambra [Mon, 13 Mar 2023 11:37:59 +0000 (12:37 +0100)]
Remove isFileSynced function which does not work as intended

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoMove parentItemIdentifierMetadata helper method to the database manager
Claudio Cambra [Mon, 13 Mar 2023 11:34:05 +0000 (12:34 +0100)]
Move parentItemIdentifierMetadata helper method to the database manager

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoMove file provider database files into own folder
Claudio Cambra [Mon, 13 Mar 2023 11:30:27 +0000 (12:30 +0100)]
Move file provider database files into own folder

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoDisconnect and reconnect file provider domains depending on account state
Claudio Cambra [Sat, 11 Mar 2023 15:26:46 +0000 (16:26 +0100)]
Disconnect and reconnect file provider domains depending on account state

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoAllow specifying disconnection of file provider domain message
Claudio Cambra [Sat, 11 Mar 2023 15:26:28 +0000 (16:26 +0100)]
Allow specifying disconnection of file provider domain message

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoUnauthenticate the file provider extension when account is logged out
Claudio Cambra [Sat, 11 Mar 2023 14:55:46 +0000 (15:55 +0100)]
Unauthenticate the file provider extension when account is logged out

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoDo not send account details to File Provider extension through socket controller...
Claudio Cambra [Sat, 11 Mar 2023 14:40:56 +0000 (15:40 +0100)]
Do not send account details to File Provider extension through socket controller if account not ready

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoMake file provider domain disconnection reason string translatable
Claudio Cambra [Sat, 11 Mar 2023 13:46:11 +0000 (14:46 +0100)]
Make file provider domain disconnection reason string translatable

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoDisconnect the file provider domains when Nextcloud client is closed
Claudio Cambra [Sat, 11 Mar 2023 13:36:48 +0000 (14:36 +0100)]
Disconnect the file provider domains when Nextcloud client is closed

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoUse asserts to check validity of pointers in private impl of fileproviderdomainmanager
Claudio Cambra [Sat, 11 Mar 2023 13:06:20 +0000 (14:06 +0100)]
Use asserts to check validity of pointers in private impl of fileproviderdomainmanager

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoUse specific functions for creating/converting domain identifiers and account Ids...
Claudio Cambra [Sat, 11 Mar 2023 13:05:51 +0000 (14:05 +0100)]
Use specific functions for creating/converting domain identifiers and account Ids, prevent mismatches

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoPrevent removal of FileProvider domains on app shutdown
Claudio Cambra [Sat, 11 Mar 2023 12:51:38 +0000 (13:51 +0100)]
Prevent removal of FileProvider domains on app shutdown

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoEnsure we wait for check for existing file provider domains to finish before rushing...
Claudio Cambra [Sat, 11 Mar 2023 12:51:12 +0000 (13:51 +0100)]
Ensure we wait for check for existing file provider domains to finish before rushing into creation of new domains in FileProviderDomainManager

This stops the needless deletion and the recreation of FP domains

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoEnsure file provider domain pointers are correctly retained and released in fileprovi...
Claudio Cambra [Sat, 11 Mar 2023 12:34:16 +0000 (13:34 +0100)]
Ensure file provider domain pointers are correctly retained and released in fileproviderdomainmanager

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoEnsure FileProvider gets set up after accountmanager has set up accounts
Claudio Cambra [Sat, 11 Mar 2023 11:43:37 +0000 (12:43 +0100)]
Ensure FileProvider gets set up after accountmanager has set up accounts

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoModernise Obj-C property notation in fileproviderdomainmanager
Claudio Cambra [Sat, 11 Mar 2023 11:41:24 +0000 (12:41 +0100)]
Modernise Obj-C property notation in fileproviderdomainmanager

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoFix variable related warnings in FileProvider
Claudio Cambra [Sat, 11 Mar 2023 11:35:12 +0000 (12:35 +0100)]
Fix variable related warnings in FileProvider

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoImprove reliability of modifyItem in FileProviderExtension
Claudio Cambra [Sat, 11 Mar 2023 02:41:20 +0000 (03:41 +0100)]
Improve reliability of modifyItem in FileProviderExtension

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoDon't compare un-persisted properties of NextcloudItemMetadataTable in isInSameRemote...
Claudio Cambra [Sat, 11 Mar 2023 01:30:54 +0000 (02:30 +0100)]
Don't compare un-persisted properties of NextcloudItemMetadataTable in isInSameRemoteState, fixing constant updating of metadatas

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoSprinkle constness over C++ and Obj-C pointers
Claudio Cambra [Sat, 11 Mar 2023 00:56:20 +0000 (01:56 +0100)]
Sprinkle constness over C++ and Obj-C pointers

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoFix compatibility with latest NextloudKit version TypeClassFile in NKCommon
Claudio Cambra [Sat, 11 Mar 2023 00:44:25 +0000 (01:44 +0100)]
Fix compatibility with latest NextloudKit version TypeClassFile in NKCommon

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoUse const auto in FileProviderDomainManager
Claudio Cambra [Sat, 11 Mar 2023 00:30:08 +0000 (01:30 +0100)]
Use const auto in FileProviderDomainManager

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoBe efficient in working set enumeration by only enumerating for new items or changes...
Claudio Cambra [Sat, 11 Mar 2023 00:26:11 +0000 (01:26 +0100)]
Be efficient in working set enumeration by only enumerating for new items or changes folders that have been explored already

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoUse push notifications to notify file provider of changes
Claudio Cambra [Sat, 11 Mar 2023 00:25:05 +0000 (01:25 +0100)]
Use push notifications to notify file provider of changes

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoUse consistent account ID type in fileproviderdomainmanager
Claudio Cambra [Sat, 11 Mar 2023 00:23:13 +0000 (01:23 +0100)]
Use consistent account ID type in fileproviderdomainmanager

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoEnsure no metadatas get deleted when updating metadata for scanned directory in FileP...
Claudio Cambra [Fri, 10 Mar 2023 23:31:47 +0000 (00:31 +0100)]
Ensure no metadatas get deleted when updating metadata for scanned directory in FileProviderEnumerator

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoScan for existing file provider domains on FileProviderDomainManager init
Claudio Cambra [Fri, 10 Mar 2023 23:30:52 +0000 (00:30 +0100)]
Scan for existing file provider domains on FileProviderDomainManager init

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoAdd method to private FileProviderDomainManager to signal enumerator
Claudio Cambra [Fri, 10 Mar 2023 23:00:25 +0000 (00:00 +0100)]
Add method to private FileProviderDomainManager to signal enumerator

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoStop wiping file provider domains on desktop client close/open
Claudio Cambra [Fri, 10 Mar 2023 22:59:20 +0000 (23:59 +0100)]
Stop wiping file provider domains on desktop client close/open

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoUse std::unique_ptr for private implementation class of FileProviderDomainManager
Claudio Cambra [Fri, 10 Mar 2023 22:58:20 +0000 (23:58 +0100)]
Use std::unique_ptr for private implementation class of FileProviderDomainManager

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoUse default constructor for private FileProviderDomainManager implementation class
Claudio Cambra [Fri, 10 Mar 2023 22:53:00 +0000 (23:53 +0100)]
Use default constructor for private FileProviderDomainManager implementation class

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoRemove workarounds no longer needed for Realm thread crashing
Claudio Cambra [Fri, 10 Mar 2023 21:25:28 +0000 (22:25 +0100)]
Remove workarounds no longer needed for Realm thread crashing

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoReplace full depth scanning of changes on every enumerate changes request with smarte...
Claudio Cambra [Fri, 10 Mar 2023 21:11:05 +0000 (22:11 +0100)]
Replace full depth scanning of changes on every enumerate changes request with smarter recursive algorithm

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoFix root cause of threading issues with metadata updates
Claudio Cambra [Fri, 10 Mar 2023 21:09:19 +0000 (22:09 +0100)]
Fix root cause of threading issues with metadata updates

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoFix erroneous deletion of metadata when updating serverUrl subject directory
Claudio Cambra [Fri, 10 Mar 2023 17:51:14 +0000 (18:51 +0100)]
Fix erroneous deletion of metadata when updating serverUrl subject directory

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoFurther improve/cleanup/simplify file provider extension init
Claudio Cambra [Fri, 10 Mar 2023 17:37:00 +0000 (18:37 +0100)]
Further improve/cleanup/simplify file provider extension init

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoFix crash on thread clash with Realm when enumerating changes
Claudio Cambra [Fri, 10 Mar 2023 17:36:25 +0000 (18:36 +0100)]
Fix crash on thread clash with Realm when enumerating changes

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoFix return of updated and deleted metadatas in database manager
Claudio Cambra [Fri, 10 Mar 2023 17:36:01 +0000 (18:36 +0100)]
Fix return of updated and deleted metadatas in database manager

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoEnsure metadata handled in FileProviderItem is copy, preventing crashing due to acces...
Claudio Cambra [Fri, 10 Mar 2023 17:01:39 +0000 (18:01 +0100)]
Ensure metadata handled in FileProviderItem is copy, preventing crashing due to accessing live table from different thread

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoCreate sortedDirectoryMetadatas convenience method in database manager
Claudio Cambra [Fri, 10 Mar 2023 12:34:44 +0000 (13:34 +0100)]
Create sortedDirectoryMetadatas convenience method in database manager

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoAdd convenience method to get child directories from database manager
Claudio Cambra [Fri, 10 Mar 2023 12:32:23 +0000 (13:32 +0100)]
Add convenience method to get child directories from database manager

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoEnsure we don't saturate the server with propfind requests
Claudio Cambra [Fri, 10 Mar 2023 02:42:30 +0000 (03:42 +0100)]
Ensure we don't saturate the server with propfind requests

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoProperly report pagination for working set enumeration
Claudio Cambra [Fri, 10 Mar 2023 02:21:01 +0000 (03:21 +0100)]
Properly report pagination for working set enumeration

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoEnumerate all known folders as workingSet enumeration
Claudio Cambra [Fri, 10 Mar 2023 01:09:24 +0000 (02:09 +0100)]
Enumerate all known folders as workingSet enumeration

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoRewrite working set handling to make it match the server remote, per Apple recommendation
Claudio Cambra [Fri, 10 Mar 2023 00:16:23 +0000 (01:16 +0100)]
Rewrite working set handling to make it match the server remote, per Apple recommendation

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoAdd method to get all item metadatas in database manager
Claudio Cambra [Fri, 10 Mar 2023 00:15:53 +0000 (01:15 +0100)]
Add method to get all item metadatas in database manager

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoAdd method to get all directory metadatas in database manager
Claudio Cambra [Fri, 10 Mar 2023 00:06:18 +0000 (01:06 +0100)]
Add method to get all directory metadatas in database manager

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoBetter handle initial set up of the file provider extension
Claudio Cambra [Thu, 9 Mar 2023 18:00:35 +0000 (19:00 +0100)]
Better handle initial set up of the file provider extension

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoHandle 404 errors from readFileOrFolder as special deletion case in FileProviderEnume...
Claudio Cambra [Thu, 9 Mar 2023 15:51:31 +0000 (16:51 +0100)]
Handle 404 errors from readFileOrFolder as special deletion case in FileProviderEnumerator

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoUse ocIds for directory metadata deletion, prevent deletion if no such directory...
Claudio Cambra [Thu, 9 Mar 2023 15:47:27 +0000 (16:47 +0100)]
Use ocIds for directory metadata deletion, prevent deletion if no such directory found in NextcloudFilesDatabaseManager

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoUse ocIds for item metadata deletion in NextcloudFilesDatabaseManager
Claudio Cambra [Thu, 9 Mar 2023 15:45:28 +0000 (16:45 +0100)]
Use ocIds for item metadata deletion in NextcloudFilesDatabaseManager

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoImprove handling of nil values in CompleteChangesObserver
Claudio Cambra [Thu, 9 Mar 2023 14:45:38 +0000 (15:45 +0100)]
Improve handling of nil values in CompleteChangesObserver

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoEnumerate changed in the working set
Claudio Cambra [Thu, 9 Mar 2023 13:51:13 +0000 (14:51 +0100)]
Enumerate changed in the working set

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoRefactor change enumeration completion into separate static function
Claudio Cambra [Thu, 9 Mar 2023 12:27:57 +0000 (13:27 +0100)]
Refactor change enumeration completion into separate static function

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoDelete new updated items that are now E2EE
Claudio Cambra [Thu, 9 Mar 2023 12:16:32 +0000 (13:16 +0100)]
Delete new updated items that are now E2EE

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoEnumerate changes for normal serverUrls in FileProviderEnumerator
Claudio Cambra [Thu, 9 Mar 2023 12:14:03 +0000 (13:14 +0100)]
Enumerate changes for normal serverUrls in FileProviderEnumerator

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoRename completeObserver to completeEnumerationObserver
Claudio Cambra [Thu, 9 Mar 2023 11:54:18 +0000 (12:54 +0100)]
Rename completeObserver to completeEnumerationObserver

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoFix the serverUrl used to fetch database item metadatas on enumerateItems
Claudio Cambra [Thu, 9 Mar 2023 01:09:39 +0000 (02:09 +0100)]
Fix the serverUrl used to fetch database item metadatas on enumerateItems

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoFix accidental purge of all metadatas caused by trying to call updateDirectoryMetadat...
Claudio Cambra [Thu, 9 Mar 2023 00:29:38 +0000 (01:29 +0100)]
Fix accidental purge of all metadatas caused by trying to call updateDirectoryMetadatasFromItemMetadatas when reading the root container

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoRefactor readFileOrFolder to be more adaptible to enumerating items or changes
Claudio Cambra [Thu, 9 Mar 2023 00:19:00 +0000 (01:19 +0100)]
Refactor readFileOrFolder to be more adaptible to enumerating items or changes

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoProperly delete directory and all children when updating folder metadatas in database...
Claudio Cambra [Wed, 8 Mar 2023 22:27:45 +0000 (23:27 +0100)]
Properly delete directory and all children when updating folder metadatas in database manager

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoAlso report all new, updated, and deleted metadatas from updateItemMetadatas in Nextc...
Claudio Cambra [Wed, 8 Mar 2023 16:57:43 +0000 (17:57 +0100)]
Also report all new, updated, and deleted metadatas from updateItemMetadatas in NextcloudFilesDatabaseManager

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoReport new item metadatas and updated item metadatas in processItemMetadatasToUpdate...
Claudio Cambra [Wed, 8 Mar 2023 16:51:59 +0000 (17:51 +0100)]
Report new item metadatas and updated item metadatas in processItemMetadatasToUpdate in NextcloudFilesDatabaseManager

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoReport deletedItemMetadatas in processItemMetadatasToDelete in NextcloudFilesDatabase...
Claudio Cambra [Wed, 8 Mar 2023 16:43:55 +0000 (17:43 +0100)]
Report deletedItemMetadatas in processItemMetadatasToDelete in NextcloudFilesDatabaseManager

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoProperly handle readFileOrFolder of file vs folder
Claudio Cambra [Tue, 7 Mar 2023 23:21:23 +0000 (00:21 +0100)]
Properly handle readFileOrFolder of file vs folder

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>