Commit graph

19340 commits

Author SHA1 Message Date
Claudio Cambra
230b55d7e9
Stop using NextcloudKit.shared and NKCommon.shared, use specific NextcloudKit instance instead to prevent clashing between different FileProvider domains
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:18 +08:00
Claudio Cambra
f0524d44e1
Switch to NCKit work/unsharedify-nckit branch
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:18 +08:00
Claudio Cambra
98afd95e59
Fix Realm crashes when trying to delete certain objects
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:18 +08:00
Claudio Cambra
6a258c0c37
Properly handle errors when trying to read server url in FileProviderEnumerator
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:18 +08:00
Claudio Cambra
2f12d9b2bd
Remove setting connection status from fileproviderdomainmanager, this will be handled by the domain
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:17 +08:00
Claudio Cambra
3be08bb15e
Fix scanning of child directories in FileProviderEnumerator
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:17 +08:00
Claudio Cambra
476d6a2456
Don't unnecessarily fail to get serverUrl for enumerated item in FileProviderEnumerator when this can be acquired straight from the itemMetadata
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:17 +08:00
Claudio Cambra
c4580183e7
Only reimport entire file provider domain if there have been no recorded files when ncAccount is configured
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:17 +08:00
Claudio Cambra
9c18d36f41
Add convenience method to check if any file metadatas have been stored for account in NextcloudFilesDatabaseManager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:17 +08:00
Claudio Cambra
74222daa2a
Don't unnecessarily fail to provide parentItemIdentifier in NextcloudFileProviderFilesUtils when we can get the root container straight from the item metadata in question
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:17 +08:00
Claudio Cambra
b154740575
Add ability for FileProviderDomainManager to wipe domains
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:17 +08:00
Claudio Cambra
5c01109004
Switch to develop branch of NextcloudKit
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:16 +08:00
Claudio Cambra
06f2714a95
Improve and fix enumerator signalling after initial account setup in FileProviderExtension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:16 +08:00
Claudio Cambra
ff25f940ec
Fix URL path composition for utility methods in NextcloudFileProviderFilesUtils
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:16 +08:00
Claudio Cambra
ceb9aa3b65
Fix try/catch indentation in NextcloudFileDatabaseManager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:16 +08:00
Claudio Cambra
7cb49393fe
Fix NextcloudItemMetadataTable status query type
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:16 +08:00
Claudio Cambra
38d1b95bd2
Fix the webDavUrl for NextcloudAccount
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:16 +08:00
Claudio Cambra
2f5d0e6fe9
Set up NextcloudKit account in FileProviderExtension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:16 +08:00
Claudio Cambra
325878b696
Improve logging in FileProviderEnumerator
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:16 +08:00
Claudio Cambra
67de82913e
Keep track of requested enumerators when account is being configured, notify them as changed once account is set up
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:15 +08:00
Claudio Cambra
ba86824c7e
Improve FileProvider logging
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:15 +08:00
Claudio Cambra
31732c2fb2
Added missing network entitlement to FileProviderExt
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:15 +08:00
Claudio Cambra
a046eca3c3
Use safer separator for account details socket message
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:15 +08:00
Claudio Cambra
f01b6a545f
Fix path handling for file provider database setup
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:15 +08:00
Claudio Cambra
e7e985f355
Correctly register object schemas in Realm database
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:15 +08:00
Claudio Cambra
1cb7da9bac
Send account details over socket and simplify NextcloudAccount members, turn all to Strings
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:15 +08:00
Claudio Cambra
81b5c33571
Complete item method of FileProviderExtension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:15 +08:00
Claudio Cambra
d801bfc8f5
Complete basic barebones enumeration
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:15 +08:00
Claudio Cambra
5f0a4883fc
Use NSLog instead of print in FileProvider
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:14 +08:00
Claudio Cambra
176303dcf1
Use more modern Realm @Persisted
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:14 +08:00
Claudio Cambra
d0ac36faab
Make record updating methods safer by checking for existing metadatas internally
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:14 +08:00
Claudio Cambra
57d585201e
Add method to get directory tables from database in manager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:14 +08:00
Claudio Cambra
7ff2379e3d
Make sure to create copies of Realm objects to prevent issues with live-fire objects
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:14 +08:00
Claudio Cambra
496b94a9a7
Add comparison helper to NextcloudDirectoryMetadataTable
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:14 +08:00
Claudio Cambra
c4014e8b6a
Add parent directory server url data to directory table
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:14 +08:00
Claudio Cambra
d9e368cbe7
Refactor updateDirectoryMetadatas in the database manager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:14 +08:00
Claudio Cambra
3354f3e4de
Add updateDirectoryMetadatasFromItemMetadatas to NextcloudFilesDatabaseManager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:13 +08:00
Claudio Cambra
316ef61d83
Split off update and creation process of updateItemMetadatas of NextcloudFilesDatabaseManager to private method
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:13 +08:00
Claudio Cambra
4d2da1037d
Split off deletion process of updateItemMetadatas of NextcloudFilesDatabaseManager to private method
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:13 +08:00
Claudio Cambra
39f4b7a8e4
Add updateItemMetadatas method to NextcloudFilesDatabaseManager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:13 +08:00
Claudio Cambra
e929940b47
Add convenience isInSameRemoteState method for NextcloudItemMetadataTable
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:13 +08:00
Claudio Cambra
f2970e2da7
Add itemMetadatas method to NextcloudFilesDatabaseManager with status as parameter
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:13 +08:00
Claudio Cambra
06a5e4df85
Add NKFile to NextcloudItemMetadataTable converter methods to NextcloudFilesDatabaseManager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:13 +08:00
Claudio Cambra
55f533dc3d
Add clarifying comments to NextcloudFilesDatabaseTables
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:13 +08:00
Claudio Cambra
f466fd6652
Add itemMetadatas method to NextcloudFilesDatabaseManager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:12 +08:00
Claudio Cambra
df53aa2492
Add directoryMetadata method to NextcloudFilesDatabaseManager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:12 +08:00
Claudio Cambra
9e2c8f355d
Add ncKitAccount property to NextcloudAccount
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:12 +08:00
Claudio Cambra
2b5425390d
Add completeObserver method to FileProviderEnumerator
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:12 +08:00
Claudio Cambra
7d1b275d50
Fill out FileProviderItem
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:12 +08:00
Claudio Cambra
0e3d565151
Add localFileMetadataFromOcId method to NextcloudFilesDatabaseManager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:12 +08:00