Commit graph

635 commits

Author SHA1 Message Date
Claudio Cambra
a586767f00 Add table to ShareViewControlelr XIB
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-04-17 16:11:50 +08:00
Claudio Cambra
07473ac5d9 Add fetch method to itemsharescontroller
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-04-17 16:11:50 +08:00
Claudio Cambra
0feb5da08f Add starter ItemSharesController
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-04-17 16:11:50 +08:00
Claudio Cambra
8982857833 Add starter FPUIExtensionServiceSource
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-04-17 16:11:50 +08:00
Claudio Cambra
36a829849b Implement convenience method to acquire FPUIExtensionService in share view controller
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-04-17 16:11:50 +08:00
Claudio Cambra
dbe8a5f8f2 Add starter FPUIExtensionService protocol
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-04-17 16:11:50 +08:00
Claudio Cambra
5fbcec1400 Extract display updating upon url acquisition to different method in ShareViewController
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-04-17 16:11:50 +08:00
Claudio Cambra
09042d701d Set the right filename and icon on share view controller view
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-04-17 16:11:50 +08:00
Claudio Cambra
1e34affc01 Add domain property to document action view controller
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-04-17 16:11:50 +08:00
Claudio Cambra
9bb67ee68d Make close button work properly in share view
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-04-17 16:11:50 +08:00
Claudio Cambra
7a9ca59734 Store file provider item identifiers in ShareViewController
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-04-17 16:11:50 +08:00
Claudio Cambra
ce026dfd94 Add proper design for share view in file provider UI
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-04-17 16:11:50 +08:00
Claudio Cambra
13aced88ce Properly add share custom action
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-04-17 16:11:50 +08:00
Claudio Cambra
05e7f1b992 Remove unused IBActions in DocumentActionViewController
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-04-17 16:11:50 +08:00
Claudio Cambra
45b4fee7ba Add convenience method to prepare child view controllers in DocumentActionViewController
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-04-17 16:11:50 +08:00
Claudio Cambra
76045fd989 Create ShareViewController
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-04-17 16:11:50 +08:00
Claudio Cambra
f44fec2ff1 Add logging for prepare methods of document action view controller
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-04-17 16:11:50 +08:00
Claudio Cambra
f35148b1bf Add logger extension to FileProviderUIExt
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-04-17 16:11:50 +08:00
Claudio Cambra
d0baa23b5d Add FileProviderUIExt entitlements file
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-04-17 16:11:50 +08:00
Claudio Cambra
8128697a70 Build and install FileProviderUIExt via CMake
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-04-17 16:11:50 +08:00
Claudio Cambra
1522c22576 Add new FileProviderUIExt target
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-04-17 16:11:50 +08:00
Camila Ayres
7fb8eb3b79 Set min OSX version via cmake.
It should now only use the CMAKE_OSX_DEPLOYMENT_TARGET set when building.

Signed-off-by: Camila Ayres <hello@camilasan.com>
2024-03-11 15:20:51 +01:00
Camila
dd2ca78884 Change minimun mac OS version to 10.13.
Signed-off-by: Camila <hello@camila.codes>
2024-03-11 15:20:51 +01:00
Claudio Cambra
60f116cdd4 Implement eviction capabilities in FileProviderItem
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-03-07 11:51:55 +08:00
Claudio Cambra
1a576a15d6 Log setting change for fast enumeration in ClientCommunicationService
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-03-06 18:46:41 +08:00
Claudio Cambra
bbe48954be Add method to set fast enumeration in client communication service
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-03-06 18:46:41 +08:00
Claudio Cambra
8d3b676558 Add method to get state of fast enumeration setting
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-03-06 18:46:41 +08:00
Claudio Cambra
9a8af68ddc Add lazy var for whether the fastEnumeration value has actually been set in settings
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-03-06 18:46:41 +08:00
Claudio Cambra
a3e1d66707 Use value from config for fastEnumeration when creating enumerator
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-03-06 18:46:41 +08:00
Claudio Cambra
534b3a60d7 Add fastEnumerationEnabled property to config
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-03-06 18:46:41 +08:00
Claudio Cambra
f987bcd97a Add computed property to FileProviderConfig to get and set internal config
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-03-06 18:46:41 +08:00
Claudio Cambra
1fc6014230 Add a starter FileProviderConfig
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-03-06 18:46:41 +08:00
Claudio Cambra
cac263f174 Clean up properties and init/invalidate in FileProviderExtension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-03-06 18:46:41 +08:00
Claudio Cambra
179a368f9f Add option to do a fast enumeration of changes which ignores new, unexplored folders
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-03-06 18:46:41 +08:00
Claudio Cambra
9946495edb
Replace handling of debug archive creation in clientcommunicationservice with simple retrieval of debug string
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:18 +08:00
Claudio Cambra
571b1ca238
Directly provide text file path to logger for debug archive creation
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:18 +08:00
Claudio Cambra
70521e95bc
Implement creating debug archive in client communication service
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:18 +08:00
Claudio Cambra
1dcfee4087
Add function to File Provider Logger extension to create debug logs file
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:17 +08:00
Claudio Cambra
0ddd22ddbb
Add function to retrieve log entries in File provider Logger extension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:17 +08:00
Claudio Cambra
3334b4e49c Do not reconfigure file provider extension account if we are receiving the same details again
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
b22f463ad5 Add explainer to client interface
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
5ed456f30c Implement NSFileProviderServicing in FileProviderExtension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
6cb71694fd Log extension id sent over XPC publicly
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
2d1e5ba197 Ensure the listener is resumed once the endpoint is created in the extension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
5f6f7f302a Add extensionAccountId property to ClientCommunicationProtocol
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
ac43369bed Properly implement listener should accept connection in ClientCommunicationService
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
026f082253 Reimplement ClientCommunicationService in Swift
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
dd39991f1c Implement ClientCommunicationProtocol in ClientCommunicationService
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
e763a9d29b Add ClientCommunicationProtocol
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
a2d69fcf7c Keep pointer to FileProviderExtension around in ClientCommunicationService
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
22c176af8a Add starter client communication service
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
7ac5f38178 Cllean up function and method calls in File Provider Extension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-06 11:45:44 +01:00
Claudio Cambra
d707ccc5b3 Clean up file provider extension property declarations and init
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-06 11:45:44 +01:00
Claudio Cambra
3928573ff4 Run swift-format on swift code
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-06 11:45:44 +01:00
Tobias Kaminsky
71c5327c98 full git path
Signed-off-by: Tobias Kaminsky <tobias@kaminsky.me>
2024-01-19 10:13:53 +01:00
Claudio Cambra
edaf49cc9a Fix build with latest NextcloudKit, caused by search for XCTest and friends
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-12-06 11:51:55 +01:00
Claudio Cambra
dbd24f5a68 Update MACOSX_DEPLOYMENT_TARGET in NextcloudIntegration to 12.0
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-10-25 09:49:39 +02:00
Dimitri Papadopoulos
8a73a9a6f5 Fix new typos found by codespell
Signed-off-by: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com>
2023-09-17 10:41:38 +02:00
Dimitri Papadopoulos
09521edbac Fix residual typos found by codespell
Signed-off-by: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com>
2023-09-16 20:36:56 +02:00
Claudio Cambra
1e9dbf8f14 Operate directly on NSMutableData for incoming socket data, do not work with raw buffers
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-07-24 12:12:29 +02:00
Claudio Cambra
4954debfbe Use more informative NSAssert rather than assert for _registeredDirectories
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-07-24 12:12:29 +02:00
Claudio Cambra
49a9f7f263 Allocate new unsigned char buffer for processed line in heap, fixing crash
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-07-24 12:12:29 +02:00
Claudio Cambra
8fa463b109 Do not GENERATE_INFOPLIST_FILE for FinderSyncExt
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-07-24 12:12:29 +02:00
Claudio Cambra
fe3104c2a8 Correctly initialise internal data members for FinderSync
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-07-24 12:12:29 +02:00
Claudio Cambra
736e65934c Define FinderSync internal data members as private interface extension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-07-24 12:12:29 +02:00
Claudio Cambra
e0da34d36c Use modern dot notation to access _inBuffer properties
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-07-24 12:12:29 +02:00
Claudio Cambra
535402a866 Add quotes to processed line in FinderSyncExt to easily demarcate received line start and end
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-07-24 12:12:29 +02:00
Claudio Cambra
a0088dcd11 Fix parsing of in buffer lines in FinderSyncExt
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-07-24 12:12:29 +02:00
Claudio Cambra
2acec8f4a0 Clean up FinderSyncExt processInBuffer
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-07-24 12:12:29 +02:00
Dimitri Papadopoulos
9d830e94f9 Fix typos found by codespell
Signed-off-by: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com>
2023-06-21 08:47:13 +02:00
Claudio Cambra
60e785ad4e Fix xcodebuild parallel build warning
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-06-14 09:07:29 +02:00
Claudio Cambra
c316ecca91 Simplify variables for propery build paths for FP
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-06-06 22:12:07 +08:00
Claudio Cambra
7937986bc6 Fix Debug builds of File Provider module
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-06-06 22:12:07 +08:00
Claudio Cambra
b7d9826877
Build macOS shell extensions with debug configuration in xcodebuild when CMAKE build type set to debug
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 16:02:39 +08:00
Claudio Cambra
ace8dbc833
Add support for thumbnails in FileProviderExtension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 16:02:39 +08:00
Claudio Cambra
7d47e2371b
Add convenience method to get thumbnailUrl in NextcloudItemMetadataTable
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 16:02:39 +08:00
Claudio Cambra
486c1a2556
Split local file related metadata management into own extension in NextcloudFilesDatabaseManager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 16:02:39 +08:00
Claudio Cambra
4cb1e08d89
Split directory item metadata handling in database to new NextcloudFilesDatabaseManager extension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 16:02:39 +08:00
Claudio Cambra
2b55b43e7b
Correctly report child item count for folders in FileProviderItem
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 16:02:39 +08:00
Claudio Cambra
16a28a7ccb
Add convenience method for NextcloudFilesDatabaseManager to get child items of a directory
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 16:02:39 +08:00
Claudio Cambra
0c78630703
Fix query of childDirectoriesForDirectory in NextcloudFilesDatabaseManager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 16:02:38 +08:00
Claudio Cambra
6797e12f6e
Properly report modification date for FileProviderItem
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 16:02:38 +08:00
Claudio Cambra
e245ec0d2a
Set interpolated log strings in FileProvider logs to public
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 16:02:38 +08:00
Claudio Cambra
7e1ebed8c7
Split client interfacing code into FileProviderExtension extension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 16:02:38 +08:00
Claudio Cambra
ebf96e3e81
Make NKError extension code more Swift-like, clean up
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 16:02:38 +08:00
Claudio Cambra
0f578fabdd
Use specific signalEnumerator method in FileProviderExtension item renaming instead of reinventing wheel
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 16:02:38 +08:00
Claudio Cambra
a7344ba3fd
Fix unused/unmodified variable definition warnings in FileProviderEnumerator
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 16:02:37 +08:00
Claudio Cambra
67daae2626
Ensure we return deleted metadata directory copy rather than live fire realm object in recursive delete of NextcloudFilesDatabaseManager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 16:02:37 +08:00
Claudio Cambra
766ecf410f
Parallelise conversion of NKFiles to NextcloudItemMetadataTables
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 16:02:37 +08:00
Claudio Cambra
7550ed7a1b
Properly handle metadata delete after item deletion in FileProviderExtension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 16:02:37 +08:00
Claudio Cambra
c088f0eb81
Fix recursive metadata delete in NextcloudFilesDatabaseManager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 16:02:37 +08:00
Claudio Cambra
2853b88258
Move NKFile to metadata conversion methods to a new extension for NextcloudItemMetadataTable, where they are better placed
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 16:02:37 +08:00
Claudio Cambra
6169594864
Prevent multi-thread modification of the same array with serial array modification dispatch queue when enumerating items in FileProviderEnumerator
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 16:02:37 +08:00
Claudio Cambra
9c1a035e3c
Reintegrate sync engine into FileProviderEnumerator class
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 16:02:37 +08:00
Claudio Cambra
bd50f753fa
Simplify initial item enumeration, no need to fetch from database in FileProviderEnumerator
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 16:02:37 +08:00
Claudio Cambra
fe7ca12d9c
Perform slow metadata to FileProviderItem conversion concurrently in FileProviderEnumerator
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 16:02:36 +08:00
Claudio Cambra
808f976ae9
Fix children serverurl rename in file provider nc files database
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 16:02:36 +08:00
Claudio Cambra
384093cbc6
Remove redundant double read of serverUrl when often we always want to do a depth 1 read in NextcloudSyncEngine
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 16:02:36 +08:00
Claudio Cambra
27a177ab35
Make sure to include new metadatas in folders to scan for changes in recursive scan of NextcloudSyncEngine
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 16:02:36 +08:00
Claudio Cambra
34a43fea69
Make sure to notify when folder moved in FileProviderExtension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:29:57 +08:00
Claudio Cambra
9fadc89ff0
Fix unsetting of etags on directories (and only) directories on update
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:29:57 +08:00
Claudio Cambra
02e1d6a47f
Fix recursive directory metadata renaming order
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:29:57 +08:00
Claudio Cambra
9cc05457c0
Do not do specific enumeration of items working set in FileProviderEnumerator
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:29:57 +08:00
Claudio Cambra
289f7f2c9f
Ensure we do not set etag if we have set updateDirectoryEtags to false in NextcloudFilesDatabaseManager updateItemMetadatas
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:29:57 +08:00
Claudio Cambra
35570a3160
Move remote sync functionality out of enumerator and into separate NextcloudSyncEngine class
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:29:56 +08:00
Claudio Cambra
1524fc01f0
Progressively enumerate items as we get them for working set
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:29:56 +08:00
Claudio Cambra
5154a57ac6
Move conversion from NSData to NSFileProviderPage to separate func
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:29:56 +08:00
Claudio Cambra
6202f3d70a
Split metadata parsing to complete enumerator into own function
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:29:56 +08:00
Claudio Cambra
8c729fb2f9
Simplify enumerateItems of working set by using fullRecursiveScan in FileProviderEnumerator
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:29:56 +08:00
Claudio Cambra
b369b5d515
Handle invalidation of enumerator during long recursive scans in FileProviderEnumerator
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:29:56 +08:00
Claudio Cambra
213893b13f
Fix recursive scan when scanChangesOnly is false in FileProviderEnumerator
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:29:56 +08:00
Claudio Cambra
d0b4b6853c
Move deleted/updated conflict check to fullRecursiveScan in FileProviderEnumerator+RemoteSync
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:29:56 +08:00
Claudio Cambra
3c2c360a2e
Properly report and handle critical errors during recursive enumeration in FileProviderEnumerator
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:29:56 +08:00
Claudio Cambra
245129de99
Move remote sync stuff in FileProviderEnumerator to own file
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:29:55 +08:00
Claudio Cambra
b2d2f9586e
Properly report deleted metadatas in recursive directory delete in FileProviderEnumerator
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:29:55 +08:00
Claudio Cambra
a779fe76cb
Favour straight return in updateItemMetadatas rather than unnecessary completionHandler in NextcloudFilesDatabaseManager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:29:55 +08:00
Claudio Cambra
0526079504
Fix renaming directories remotely fixing local sync state in file provider
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:29:55 +08:00
Claudio Cambra
29b495335b
Do not update etags for child folders acquired in a depth 1 readServerUrl in FileProviderEnumerator
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:29:55 +08:00
Claudio Cambra
872186248a
Remove redundant directory metadata tables in File Provider
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:29:55 +08:00
Claudio Cambra
2e70c82663
Prevent premature running of completion handler when modifying folder in FileProviderExtension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:29:55 +08:00
Claudio Cambra
3538ce9424
Change fullRecursiveScan function to enable more than just look for changes, also do proper full scan
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:29:55 +08:00
Claudio Cambra
97d2b354df
Ensure we are not marking items as both updated and deleted in FileProviderEnumerator
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:29:55 +08:00
Claudio Cambra
2c64e4b6bd
Ensure xcodebuild uses the Info.plist file verbatim
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:29:54 +08:00
Claudio Cambra
0bdbc956bc
Fix FileProviderExt bundle identifier
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:29:54 +08:00
Ivan Sein
9bcc017fb8
Only set CODE_SIGN_INJECT_BASE_ENTITLEMENTS=NO in FileProviderExt for release configuration.
Signed-off-by: Ivan Sein <ivan@nextcloud.com>
2023-05-12 13:29:54 +08:00
Ivan Sein
ecd55ae37d
Set CODE_SIGN_INJECT_BASE_ENTITLEMENTS=NO in FileProviderExt.
Signed-off-by: Ivan Sein <ivan@nextcloud.com>
2023-05-12 13:29:54 +08:00
Ivan Sein
a859107ec0
Disable automatically manage signing in FileProviderExt target.
Signed-off-by: Ivan Sein <ivan@nextcloud.com>
2023-05-12 13:29:54 +08:00
Ivan Sein
169b1a765e
Use Nextcloud team id.
Signed-off-by: Ivan Sein <ivan@nextcloud.com>
2023-05-12 13:29:54 +08:00
Claudio Cambra
d3c3181c0d
Ensure we are logging error description itself and not NKError wrapper or any Error type
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:29:53 +08:00
Claudio Cambra
4f1f4388af
Rewrite modifyItem to make it non-blocking on the main thread in FileProviderExtension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:29:53 +08:00
Claudio Cambra
ccad81949a
Make enumeration of working set changes non-blocking in FileProviderEnumerator
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:28:46 +08:00
Claudio Cambra
60005d89bc
Ensure we are editing realm database on main thread in FileProviderEnumerator
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:28:46 +08:00
Claudio Cambra
52fe107ec5
Fix blocking main thread when enumerating working set items in FileProviderEnumerator
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:28:46 +08:00
Claudio Cambra
073db8182b
Log errors in fetching local temporary file provider path
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:28:46 +08:00
Claudio Cambra
762aee8e41
Simplify temp local file creation while fetching contents, use File Provider volume
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:28:46 +08:00
Claudio Cambra
8661841c44
Remove unnecessary local file operations in FileProviderExt
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:28:46 +08:00
Claudio Cambra
221848f230
Properly set cancellation, pausing, and resuming handlers on FileProviderExtension task progress
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:28:46 +08:00
Claudio Cambra
607d72615d
Add ability to set handlers from AlamoFire request on Progress extension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:28:46 +08:00
Claudio Cambra
d4d5c8f8da
Removed unused tracking of outstanding session and ocID related tasks
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:28:45 +08:00
Claudio Cambra
a7616502ae
Do not copy pause, cancel, and resuming handlers in Progress extension copyCurrentStateToProgress by default
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:28:45 +08:00
Claudio Cambra
5e8d7217a9
Warn when retrieved size of file upload is different to the expected size in FileProviderExtension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:28:45 +08:00
Claudio Cambra
b8224212ca
Ensure item upload/download states are properly set and reset in FileProviderExtension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:28:45 +08:00
Claudio Cambra
23e623ef0a
Make it possible to disable building file provider module
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:28:45 +08:00
Claudio Cambra
f16f89118e
Set deployment target for FileProviderExt to macOS 11.0
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:35 +08:00
Claudio Cambra
4e536dcd65
Ensure upload errors for modified files are recorded in FileProviderExtension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:35 +08:00
Claudio Cambra
f4be264eee
Ensure existing metadatas being uploaded are set to uploading status in FileProviderExtension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:35 +08:00
Claudio Cambra
9083f982d9
Use completion handler to retrieve updated metadata after status change, fixing race condition in FileProviderDatabaseManager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:35 +08:00
Claudio Cambra
7967ced04e
Properly handle logging interpolation in NextcloudFilesDatabaseManager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:35 +08:00
Claudio Cambra
c88fb7fb3e
Do not hide interpolated log strings in FileProviderSocketLineProcessor
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:35 +08:00
Claudio Cambra
5ae1936328
Handle different interpolated string types differently in FileProviderExtension logging
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:35 +08:00
Claudio Cambra
89164d99ec
Make privacy level of interpolated strings in FileProviderEnumerator logging more granular
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:35 +08:00
Claudio Cambra
3082850e68
Ensure errors are always publicly displayed in unified logging of File Provider
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:34 +08:00
Claudio Cambra
545fe6d56e
Finish replacing NSLog with use of Logger in LocalFilesUtils
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:34 +08:00
Claudio Cambra
810c7d0b19
Also use logger in FileProviderSocketLineProcessor
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:34 +08:00
Claudio Cambra
854b11e477
Use Logger materialisedFileHandling for logging in FileProviderMaterialisedEnumerationObserver
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:34 +08:00
Claudio Cambra
5c72c6a2e9
Replace NSLog in FileProviderExtension with use of Logger
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:34 +08:00
Claudio Cambra
75f18b8bd5
Use enumeration category and logger for FileProviderEnumerator
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:34 +08:00
Claudio Cambra
b16bf24949
Improve logging in files database manager with use of Logger
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:34 +08:00
Claudio Cambra
0f6ceef06f
Add a logger extensions to use system unified logging in File Provider components
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:34 +08:00
Claudio Cambra
8994f31cb9
Remove unnecessary full reimport after initial account configuration in FileProviderExtension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:33 +08:00
Claudio Cambra
7863ba8594
Improve error handling in fetchContents if path is not available FileProviderExtension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:33 +08:00
Claudio Cambra
68044891f0
Properly respond to errors in working set enumerateItems in FileProviderEnumerator
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:33 +08:00
Claudio Cambra
287c98f7f5
Add directoryMetadataLogString convenience method for logging in NextcloudFilesDatabaseManager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:33 +08:00
Claudio Cambra
134e373f1b
Do not delete "no longer existing files" when doing enumeration of items in FileProviderEnumerator
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:33 +08:00
Claudio Cambra
b532b96937
Add helper itemMetadataLogString static func for logging in NextcloudFilesDatabaseManager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:33 +08:00
Claudio Cambra
2ca2609e0c
Properly write item metadata status update to database in NextcloudFilesDatabaseManager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:33 +08:00
Claudio Cambra
412fd0887e
Provide file provider errors in FileProviderExtension methods
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:31 +08:00
Claudio Cambra
b9b408d606
Fix general error handling in FileProviderEnumerator
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:31 +08:00
Claudio Cambra
3873ad126d
Use NKError extension properties instead of magic numbers in FileProviderEnumerator
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:31 +08:00
Claudio Cambra
1ee6d1a1cc
Improve handling of no changes return in readFileOrFolder throughout FileProviderEnumerator
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:31 +08:00
Claudio Cambra
6ffbb5abf6
Properly handle stopping when finding matching etags in readServerUrl of FileProviderEnumerator
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:31 +08:00
Claudio Cambra
d639baeea0
Add no changes error code in NKError extension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:31 +08:00
Claudio Cambra
a0c819fdbe
Make NKError extension conversion more legible
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:30 +08:00
Claudio Cambra
109258f3ce
Use NKError extension method in FileProviderEnumerator enumerate methods
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:30 +08:00
Claudio Cambra
fdaf0d5aa5
Add NKError extension to make conversion to FileProviderError easier
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:30 +08:00
Claudio Cambra
6ef4f8a4f4
Implement better error handling in enumerator changes
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:30 +08:00
Claudio Cambra
d1008df429
Respond to materializedItemsDidChange in FileProviderExtension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:30 +08:00
Claudio Cambra
20363bd241
Add completion handler to materialised observer
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:30 +08:00
Claudio Cambra
61890ddd72
Added FileProviderMaterialisedEnumerationObserver to handle clean up operations after materialisation changes
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:30 +08:00
Claudio Cambra
52f5b6a524
Split up the huge NextcloudFilesDatabaseTables file into separate files for each table schema
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:30 +08:00
Claudio Cambra
32e5dbad4a
Rename misleading FileProviderFilesUtils to LocalFilesUtils
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:29 +08:00
Claudio Cambra
c24ed9b7ac
Remove isFileSynced function which does not work as intended
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:29 +08:00
Claudio Cambra
1d1578447e
Move parentItemIdentifierMetadata helper method to the database manager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:29 +08:00
Claudio Cambra
3ec9968fc2
Move file provider database files into own folder
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:29 +08:00
Claudio Cambra
287a4e4c0b
Unauthenticate the file provider extension when account is logged out
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:29 +08:00
Claudio Cambra
c593bd8a50
Fix variable related warnings in FileProvider
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:27 +08:00
Claudio Cambra
c4d3c4ba88
Improve reliability of modifyItem in FileProviderExtension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:27 +08:00
Claudio Cambra
882e58aa64
Don't compare un-persisted properties of NextcloudItemMetadataTable in isInSameRemoteState, fixing constant updating of metadatas
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:27 +08:00
Claudio Cambra
1cc0cf7129
Fix compatibility with latest NextloudKit version TypeClassFile in NKCommon
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:27 +08:00
Claudio Cambra
81fb05298c
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>
2023-05-12 13:21:26 +08:00
Claudio Cambra
79d89c21c7
Ensure no metadatas get deleted when updating metadata for scanned directory in FileProviderEnumerator
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:26 +08:00
Claudio Cambra
d3f2094866
Remove workarounds no longer needed for Realm thread crashing
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:25 +08:00
Claudio Cambra
17fea88450
Replace full depth scanning of changes on every enumerate changes request with smarter recursive algorithm
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:25 +08:00
Claudio Cambra
1a48e4e06e
Fix root cause of threading issues with metadata updates
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:25 +08:00
Claudio Cambra
7c8aab38d2
Fix erroneous deletion of metadata when updating serverUrl subject directory
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:25 +08:00
Claudio Cambra
2ac3a22523
Further improve/cleanup/simplify file provider extension init
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:25 +08:00
Claudio Cambra
3e269a958b
Fix crash on thread clash with Realm when enumerating changes
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:25 +08:00
Claudio Cambra
147e06c40a
Fix return of updated and deleted metadatas in database manager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:25 +08:00
Claudio Cambra
f427750f2c
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>
2023-05-12 13:21:24 +08:00
Claudio Cambra
24d6c5071c
Create sortedDirectoryMetadatas convenience method in database manager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:24 +08:00
Claudio Cambra
64e32b48eb
Add convenience method to get child directories from database manager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:24 +08:00
Claudio Cambra
65ab13c0f9
Ensure we don't saturate the server with propfind requests
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:24 +08:00
Claudio Cambra
390403ef5e
Properly report pagination for working set enumeration
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:24 +08:00
Claudio Cambra
b52b82134e
Enumerate all known folders as workingSet enumeration
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:24 +08:00
Claudio Cambra
7302c953d8
Rewrite working set handling to make it match the server remote, per Apple recommendation
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:24 +08:00
Claudio Cambra
32e81a693e
Add method to get all item metadatas in database manager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:24 +08:00
Claudio Cambra
24b328f57b
Add method to get all directory metadatas in database manager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:24 +08:00
Claudio Cambra
b73c1d72fb
Better handle initial set up of the file provider extension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:23 +08:00
Claudio Cambra
03c1731fb5
Handle 404 errors from readFileOrFolder as special deletion case in FileProviderEnumerator
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:23 +08:00
Claudio Cambra
25a09e1704
Use ocIds for directory metadata deletion, prevent deletion if no such directory found in NextcloudFilesDatabaseManager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:23 +08:00
Claudio Cambra
65ed3ad846
Use ocIds for item metadata deletion in NextcloudFilesDatabaseManager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:23 +08:00
Claudio Cambra
2b92e9b546
Improve handling of nil values in CompleteChangesObserver
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:23 +08:00
Claudio Cambra
47d50af140
Enumerate changed in the working set
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:23 +08:00
Claudio Cambra
1ffdc5f1c5
Refactor change enumeration completion into separate static function
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:23 +08:00
Claudio Cambra
e2943ab043
Delete new updated items that are now E2EE
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:23 +08:00
Claudio Cambra
2cf4033f9b
Enumerate changes for normal serverUrls in FileProviderEnumerator
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:22 +08:00
Claudio Cambra
53649c2933
Rename completeObserver to completeEnumerationObserver
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:22 +08:00
Claudio Cambra
60dbf167b9
Fix the serverUrl used to fetch database item metadatas on enumerateItems
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:22 +08:00
Claudio Cambra
7734316416
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>
2023-05-12 13:21:22 +08:00
Claudio Cambra
d478320dd3
Refactor readFileOrFolder to be more adaptible to enumerating items or changes
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:22 +08:00
Claudio Cambra
61dd51ae02
Properly delete directory and all children when updating folder metadatas in database manager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:22 +08:00
Claudio Cambra
e7e850094b
Also report all new, updated, and deleted metadatas from updateItemMetadatas in NextcloudFilesDatabaseManager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:22 +08:00
Claudio Cambra
a10b563eb7
Report new item metadatas and updated item metadatas in processItemMetadatasToUpdate in NextcloudFilesDatabaseManager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:22 +08:00
Claudio Cambra
fc376b5fe6
Report deletedItemMetadatas in processItemMetadatasToDelete in NextcloudFilesDatabaseManager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:21 +08:00
Claudio Cambra
76311cc66f
Properly handle readFileOrFolder of file vs folder
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:21 +08:00
Claudio Cambra
cc72cc361c
Keep track of additional details about enumerating item in the FileProviderEnumerator
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:21 +08:00
Claudio Cambra
d22b8e0eb7
Enumerate materialised items when system requests working set
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:21 +08:00
Claudio Cambra
3316d19b90
Add convenience method to get local file metadatas for an account in NextcloudItemMetadataTable form in NextcloudFilesDatabaseManager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:21 +08:00
Claudio Cambra
a18c6dc258
Add convenience method to get all local file metadatas for an account in NextcloudFilesDatabaseManager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:21 +08:00
Claudio Cambra
17f52982bd
Properly report progress for download and upload operations in FileProviderExtension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:21 +08:00
Claudio Cambra
628ff92dec
Add a Progress extension with convenience methods for copying progress data from one progress object to another
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:21 +08:00
Claudio Cambra
53d2fc0c1e
Prevent creation of symbolic link items in FileProviderExtension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:21 +08:00
Claudio Cambra
ca298eff87
Handle version item requests in fetchContents of FileProviderExtension per the documentation
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:20 +08:00
Claudio Cambra
54587e8c07
Clarify current use of sync anchor in FileProviderEnumerator
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:20 +08:00
Claudio Cambra
06b59b6756
Correctly fulfill delete item requests on server
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:20 +08:00
Claudio Cambra
3e0a9e9912
Support reparenting file provider items correctly
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:20 +08:00
Claudio Cambra
a146b65f76
Properly handle several modify item fields at once in FileProviderExtension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:20 +08:00
Claudio Cambra
020c5d5104
Only try upload of modified item in FileProviderExtension if that had its contents changed and we have a valid content url
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:20 +08:00
Claudio Cambra
0f2fbf7518
Handle renaming of both files and folders correctly in FileProviderExtension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:20 +08:00
Claudio Cambra
c7660b50df
Add convenience method to rename file item metadatas in database
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:20 +08:00
Claudio Cambra
5f24527270
Properly handle renaming folders in FileProviderExtension modifyItem
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:19 +08:00
Claudio Cambra
c3f79eecc6
Add methods to rename directory metadata and propagate modifications to all children in NextcloudFilesDatabaseManager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:19 +08:00
Claudio Cambra
47d98a44a8
Add methods to delete metadata types in NextcloudFilesDatabaseManager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:19 +08:00
Claudio Cambra
c6cc87a4b8
Extension can now upload modifications to items on the server
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:19 +08:00
Claudio Cambra
992ef7b62b
Add ability for extension to create items correctly on the server
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:19 +08:00
Claudio Cambra
7d2c21c772
Don't unnecessarily fetch item metadata when fetching contents
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:19 +08:00
Claudio Cambra
81dd5966f8
Unprivate direcotryMetadataFromItemMetadata in database manager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:19 +08:00
Claudio Cambra
dc2e14d57b
Add convenience method to add directory metadata to database
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:19 +08:00
Claudio Cambra
91ad815a6b
Add working file content fetching
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:18 +08:00
Claudio Cambra
b70e9d11bb
Add convenience method to add local file metadata from item metadata to database
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:18 +08:00