Commit graph

9830 commits

Author SHA1 Message Date
Claudio Cambra
6fa969d8f2
Add a starter ProgressObserver Objective-C class
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:20 +08:00
Claudio Cambra
fe6d03a16b
Add q pointer to MacImplementation for FileProviderDomainSyncStatus
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:20 +08:00
Claudio Cambra
62c85de35b
Define basic FileProviderDomainSyncStatus private implementation
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:19 +08:00
Claudio Cambra
7a9a17a2f3
Add starter FileProviderDomainSyncStatus
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:19 +08:00
Claudio Cambra
369c1d737a
Add UI button to signal file provider domain
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:19 +08:00
Claudio Cambra
f1c7811962
Add method to signal file provider domain via file provider settings controller
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:19 +08:00
Claudio Cambra
1d01f67790
Always perform fallback document size discovery in fileprovideritemmetadata
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:19 +08:00
Claudio Cambra
3b179cc1a1
Remove unused usage property from enumeration observer
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:19 +08:00
Claudio Cambra
fd95ab7171
Directly generate file provider item metadatas and cache
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:19 +08:00
Claudio Cambra
6a0f76de7e
Mark MacImplementation constructor for FileProviderSettingsController as explicit
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:19 +08:00
Claudio Cambra
62bbf6a2ad
Create debug archive on client side
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
b2e5659c43
Replace old and now broken socket based debug archive command with command over XPC
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:18 +08:00
Claudio Cambra
9733c11f7f
Add button to create debug archive
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:18 +08:00
Claudio Cambra
24dda9b437
Add createFileProvider slot to FileProviderSettingsController
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:18 +08:00
Claudio Cambra
292ff9b3bc
Add convenience method in FileProvider to send a message to a given file provider domain
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:17 +08:00
Claudio Cambra
0a5df3ba66
Add public convenience static method to get domainIdentifier from a given accountState
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:17 +08:00
Claudio Cambra
b9cf135080
Update the materialised items model post-file eviction
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:17 +08:00
Claudio Cambra
cfbdf3a773
Provide feedback when materialised item eviction fails
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:17 +08:00
Claudio Cambra
a204f114d2
Have backup for 0 value in itemmetadata documentsize in materialised items model
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:17 +08:00
Claudio Cambra
5c3cd69252
Improve visuals of file delegate details UI
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:17 +08:00
Claudio Cambra
f22bf9e527
Display file sizes as nicely formatted string in file provider file delegate
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:16 +08:00
Claudio Cambra
643d30a3d5
Fix retain crash when calling managerForDomain
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:16 +08:00
Claudio Cambra
84d8561a8e
Use FileProviderUtils function to get manager from domain id in FileProviderMaterialisedItemsModel
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:16 +08:00
Claudio Cambra
b23e6bc4ee
Use FileProviderUtils function to get manager for domain id in FileProviderItemMetadata
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:16 +08:00
Claudio Cambra
44a6f4673e
Separate domain finding into separate function in FileProviderUtils
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:16 +08:00
Claudio Cambra
b47665efba
Add convenience function to FileProviderUtils to get manager for a given domain identifier
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:16 +08:00
Claudio Cambra
ba2bef2495
Add fileproviderutils namespace
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:16 +08:00
Claudio Cambra
64e1166066
Fix layout for FileProviderFileDelegate
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:15 +08:00
Claudio Cambra
d905f13d83
Enable use of "Delete" button in FileProviderFileDelegate to evict item
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:15 +08:00
Claudio Cambra
c763a9a227
Expose items' domain identifier in FileProviderMaterialisedItemsModel
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:15 +08:00
Claudio Cambra
0b961e9e17
Add method to evict an item in FileProviderMaterialisedItemsModel
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:15 +08:00
Claudio Cambra
da20e7e179
Add basic FileProviderFileDelegate UI component
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:15 +08:00
Claudio Cambra
b3c75750ab
Add file type role to FileProviderMaterialisedItemsModel
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:15 +08:00
Claudio Cambra
371257a6de
Add a user-understandable file type string to itemmetadata
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:15 +08:00
Claudio Cambra
f060f0c271
Add UserVisiblePathRole to FileProviderMaterialisedItemsModel
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:15 +08:00
Claudio Cambra
beb889c2f6
Get and set userVisiblePath at item metadata construction time
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:15 +08:00
Claudio Cambra
e03edc131d
Add method to get user visible path for an item metadata
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:14 +08:00
Claudio Cambra
ad2baeaba0
Keep track of item metadata's parent domain identifier
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:14 +08:00
Claudio Cambra
f2547140c4
Ensure correct index is set on hidden tab widget
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:14 +08:00
Claudio Cambra
bfaba671f3
Add rolenames for FileProviderMaterialisedItemsModel
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:14 +08:00
Claudio Cambra
89bb008bd7
Add additional roles to FileProviderMaterialisedItemsModel
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:14 +08:00
Claudio Cambra
d51c2a486b
Add a general actions grid to the settings qml component to enable users to manage storage usage
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:14 +08:00
Claudio Cambra
af98e48805
Add starter FileProviderEvictionDialog component
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:14 +08:00
Claudio Cambra
2ce4e91383
Add method to generate eviction of materialised item windows in settings controller
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:14 +08:00
Claudio Cambra
c1a5e788f8
Add method to generate materialised item models in settings controller
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:13 +08:00
Claudio Cambra
85b3a135b6
Emit signal when materialised items for an account change
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:13 +08:00
Claudio Cambra
f90f86d696
Set FileProviderItemMetadata vector in materialised items model
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:13 +08:00
Claudio Cambra
726503f3c7
Add custom equality check to FileProviderItemMetadata
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:13 +08:00
Claudio Cambra
269fb03351
Add starter FileProviderMaterialisedItemsModel
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:13 +08:00
Claudio Cambra
389e663219
Add method to get qtified file provider item metadata for account in FileProviderSettingsController
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:13 +08:00
Claudio Cambra
134eae63dd
Add static convenience method to FileProviderItemMetadata to convert from NSFileProviderItem
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:13 +08:00
Claudio Cambra
e3a0dabb07
Add convenience function to convert extendedAttributes to QHash
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:13 +08:00
Claudio Cambra
a34a390790
Add a convenience function to convert from nsnamecomponents to qstring
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:12 +08:00
Claudio Cambra
57d1dc84aa
Add a Qt-based data class for file provider items
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:12 +08:00
Claudio Cambra
fec9902a25
Store materialised file metadata in file provider settings controller
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:12 +08:00
Claudio Cambra
c3490db271
Keep track of materialised files in storageuseenumerationobserver
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:12 +08:00
Claudio Cambra
0b8a2315a0
Leave usage as a property of materialised files enumerator
Do this instead of passing as variable in completion handler

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:12 +08:00
Claudio Cambra
02b47b47f8
Fix positioning fo elements in FileProviderSettings UI
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:12 +08:00
Claudio Cambra
679177eae2
Add property to file provider settings controller displaying remote file storage usage
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:12 +08:00
Claudio Cambra
f68965a241
Fetch and store user info for accounts in file provider settings controller
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:12 +08:00
Claudio Cambra
7d229b569f
Move GB with decimal number calculation to function
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:11 +08:00
Claudio Cambra
4e8eab6cd9
Handle edge cases with materialised files enumeration and improve logging
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:11 +08:00
Claudio Cambra
22a521d2a2
Hold a strong reference to UsageEnumerationFinishedHandler
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:11 +08:00
Claudio Cambra
9105a4584e
Use NSUInteger directly when calculationg usage in FileProviderStorageUseEnumerationObserver
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:11 +08:00
Claudio Cambra
18ed46ef77
Expose local storage usage for account in gigabytes to QML
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:11 +08:00
Claudio Cambra
2105596643
Fetch materialised files storage usage per account on creation of FileProviderSettingsController
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:11 +08:00
Claudio Cambra
8fdc69b3cc
Calculate total storage use from enumerator for materialised files in fileproviderstorageuseenumerationobserver
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:11 +08:00
Claudio Cambra
435e25d75c
Define ompletion block for fileproviderstorageuseenumerationobserver
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:11 +08:00
Claudio Cambra
b83f0a51a9
Add starter fileproviderstorageuseenumerationobserver
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:10 +08:00
Claudio Cambra
97c963dcab
Remove fp domain id from registered domains when removal is confirmed
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:10 +08:00
Claudio Cambra
5aa7138643
Do not bother trying to add a fp domain if we know it is active
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:10 +08:00
Claudio Cambra
e4aeb5b481
Update file provider domain enablement status upon settings change
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:10 +08:00
Claudio Cambra
15525bca62
Separate file provider domain updating into separate slot
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:10 +08:00
Claudio Cambra
ee6c081603
Enable file provider domains per the settings in the file provider domain manager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:10 +08:00
Claudio Cambra
1db59fecc1
Remove ConfigFile().macFileProviderModuleEnabled() config flag
Since we are going to distribute the file provider client as separate
from the normal client, this flag doesn't make any practical sense.
The user using the FileProvider desktop client will not want to not
use the file provider module

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:10 +08:00
Claudio Cambra
0c40ceff9c
Init widely-used variables in MacImplementation at declaration, fix nullability warnings
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:10 +08:00
Claudio Cambra
58262a8d94
Ensure account is file provider vfs enablement is correctly set in NSUserDefaults
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:09 +08:00
Claudio Cambra
f5b80e9ec1
Run initial check on creation of FileProviderSettingsController
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:09 +08:00
Claudio Cambra
5f059a23ce
Add method to enable file provider vfs for all accounts
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:09 +08:00
Claudio Cambra
42b72f9d9a
Use [[nodiscard]] for MacImplementation methods
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:09 +08:00
Claudio Cambra
556bce2672
Move fp settings controller out of ui folder
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:09 +08:00
Claudio Cambra
e9451e9281
Set account as property of settings view root object rather than context property
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:09 +08:00
Claudio Cambra
a57cb3df9d
Register file provider settings controller as singleton in qml engine
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:09 +08:00
Claudio Cambra
ba3baa406b
Expose account user id with host to QML
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:09 +08:00
Claudio Cambra
3c26e25a3c
Notify when enabled file provider vfs accounts change
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:08 +08:00
Claudio Cambra
ac608a661d
Use default constructor for FileProviderSettingsController::MacImplementation
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:08 +08:00
Claudio Cambra
9a880f4199
Implement modification of file provider enabled for account
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:08 +08:00
Claudio Cambra
c69bb4375c
Make it possible to check whether an account has vfs enabled or not
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:08 +08:00
Claudio Cambra
94ce3da9c5
Treat FileProviderSettingsController::settingsViewWidget as a factory method
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:08 +08:00
Claudio Cambra
20f89c6999
Make the fp settings controller static
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:08 +08:00
Claudio Cambra
0e02a64c5e
Lazily load settings view widget
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:08 +08:00
Claudio Cambra
d80962b634
Instantiate internal MacImplementation in file provider settings controller
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:08 +08:00
Claudio Cambra
27c803a3d8
Add MacImplementation private class to interface with obj-c settings API
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:07 +08:00
Claudio Cambra
7e4d643ade
Add starter FileProviderSettings objective c class
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:07 +08:00
Claudio Cambra
2863415428
Add access to FileProviderSettingsController in FileProviderSettings page
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:07 +08:00
Claudio Cambra
f607bfaca1
Make file provider settings controller implementation an Objective-C++ file
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:07 +08:00
Claudio Cambra
8070dbd9f6
Implement basic layout for file provider configuration UI
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:07 +08:00
Claudio Cambra
174d3ec9e0
Remove Virtual files section of settings, move this instead to individual tab in each account page
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:07 +08:00
Claudio Cambra
d4fb1e7dad
Move disguising of tab widget into separate method
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:07 +08:00
Claudio Cambra
c57a5820d0
Make sure qtabwidget in account settings is unnoticeable when file provider module is disabled
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:07 +08:00
Claudio Cambra
5af363ad9c
Wrap normal folder settings in tab widget
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:06 +08:00
Claudio Cambra
f158e275fc
Resize settings object to root view
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:06 +08:00
Claudio Cambra
58e6385093
Make settings page use other internal QML components, correct palette
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:06 +08:00
Claudio Cambra
346a07643c
Simplify widget creation of file provider settings UI
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:06 +08:00
Claudio Cambra
4b8338ce91
Expose QML engine in systray
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:06 +08:00
Claudio Cambra
dae1643542
Add basic fitting styling for FileProviderSettings component
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:06 +08:00
Claudio Cambra
40389a2197
Use file provider settings controller in settings dialog
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:06 +08:00
Claudio Cambra
a6f15ea700
Set up QML file provider settings within the FileProviderSettingsController
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:06 +08:00
Claudio Cambra
8643acfdaa
Add a start fileprovidersettingscontroller
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:05 +08:00
Claudio Cambra
e547ae22b7
Add basic, start FileProviderSettings page
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:05 +08:00
Claudio Cambra
35659bbda2
Add mac-specific virtual files settings section
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:45:04 +08:00
Claudio Cambra
71119fe65a Improve socket controller logging
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
9611e47a3b Simplify xpc service acquisition completion handler
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
41133e4cd8 Clarify utility of xpc system for file provider
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
a44454daf8 Simplify and clarify utility of socket system for file provider
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
a01e55272a Only start XPC after file provider domains have been configured
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
45b123130f Separate XPC init from file provider constructor
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
423891230e Separate starting of domain manager tasks from constructor
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
58dc42a521 Get services using better non-url based method if available (macOS 13.0+)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
798f77fa2b Improve domain discovery logging
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
43b7ae55df Use accountStateFromFileProviderDomainIdentifier method in authenticateExtension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
6d4e785ebb Remove unused extension ID NSString
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
be3bd7bb3b Do not shadow sender()
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
784cd129fb Remove all obj-c classes from fileproviderxpc.h
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
fca6b37804 Fix clang-tidy namespace concatenation warning
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
0856138b2e Implement recognition of account state changing in FileProviderXPC
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
c1fa6621ae Move extension authentication into separate method
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
94bfa035c3 Define NSDictionary types in _clientCommServices
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
f728ec1b75 Add method to unauthenticate file provider extension in FileProviderXPC
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
502d73814e Cast clientCommServices to NSObject with correct protocol
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
23a3a3e554 Extract account id acquisition from clientCommService into separate function
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
8a8d3b3ef5 Remove redundant static in anonymous fileproviderxpc utils namespace
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
c9997ce5f9 Extract remote service object acquisistion from connection into separate function
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
595c23cf76 Extract file provider connection configuration into separate util function
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
6f5b07c1ae Fix clientcommservices datatype
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
95bebc5214 Clean up FileProviderXPC code, separate everything into single-responsibility methods
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
5ee2cfa749 Moved XPC Utils into separate file
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
a0376a2dab Move acquisition of file provider services to different function
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
4a8d50144a Move domain url acquisition to separate function
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
8eaf4e6324 Move domain manager acquisition into separate function
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
59b8b8ef21 Upon acquisition of client communication services, send account configuration
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
7716860bc9 Retrieve extension account ids over XPC, store client comm service per account
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
eb774adc95 Check for protocol type in fileproviderxpc start
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
ee82968c69 Cache NSXPCConnections when starting FileProviderXPC
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
a6e3f18168 Ensure FileProvider components instantiated after account setup
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
d4d0cf550e Fix retain issues with domains in FileProviderXPC
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
0b505a9c2c Flatten FileProviderXPC::start()
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
25201116a0 Implement connection begin in XPC
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00
Claudio Cambra
9dddaf4f9f Fix logging for fileproviderdomainmanager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-02-19 22:39:37 +08:00