Skip to content

Commit

Permalink
[feature/server-side-search] Add server-side search support (#129)
Browse files Browse the repository at this point in the history
* - OCCapabilities: add serverSideSearchSupported property
- OCConnection:
	- add new method for -searchFilesWithPattern
	- expose internal method -_davItemAttributes for composition of WebDAV queries
	- add new OCConnectionEndpointIDWebDAVSpaces endpoint and MDM parameter needed for server-side search REPORT requests
- OCConnection+Search: first implementation of support for server-side search
- OCCore+Search: first implementation of support for server-side search, handling item resolution and composition in a data source
- OCSearchResult: container for OCCore+Search search results and target to cancel ongoing resolutions
- OCEvent: add new OCEventTypeSearch event type
- OCHTTPDAVRequest: expand -responseItemsForBasePath: method with drives parameter to allow efficient parsing of ocis search responses
- OCItem+OCXMLObjectCreation: add support for oc:fileid, oc:score and search result path -> driveID mapping
- OCItem: add new searchScore property for server-side search results
- OCTypes: add new KQL query string type

* - OCQueryCondition+KQLBuilder: builds a KQL string from a OCQueryCondition tree
- OCItem+OCTypeAlias: add "application/x-bzip" and "application/x-tgz" to typealias "package/x-generic" to make it equivalent to the server's "archive" search criteria

* - fix conflict

* - OCSearchResult:
	- add new .error property where errors are set if they were returned from the server
	- change state of data source to loading on start and then idle on completion

* - OCQueryCondition+KQLBuilder: change syntax expression for greater than / less than to be compatible with oCIS KQL

* - OCCore+Search: add quick check for connectivity and return an error if none is available

* - OCCapabilities: add methods to return supported server-side search properties and server-provided keywords for each property
  • Loading branch information
felix-schwarz authored Feb 14, 2025
1 parent 23a01ee commit 79e217d
Show file tree
Hide file tree
Showing 22 changed files with 871 additions and 12 deletions.
44 changes: 44 additions & 0 deletions ownCloudSDK.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,11 @@
DC6D38802C4E4ED300169BF5 /* OCWaitConditionAvailableOffline.m in Sources */ = {isa = PBXBuildFile; fileRef = DC6D387E2C4E4ED300169BF5 /* OCWaitConditionAvailableOffline.m */; };
DC6D51D924A8BC4D006B75E6 /* OCNetworkMonitor.h in Headers */ = {isa = PBXBuildFile; fileRef = DC6D51D724A8BC4C006B75E6 /* OCNetworkMonitor.h */; settings = {ATTRIBUTES = (Public, ); }; };
DC6D51DA24A8BC4D006B75E6 /* OCNetworkMonitor.m in Sources */ = {isa = PBXBuildFile; fileRef = DC6D51D824A8BC4C006B75E6 /* OCNetworkMonitor.m */; };
DC6D937D2CD5762B00537645 /* OCConnection+Search.m in Sources */ = {isa = PBXBuildFile; fileRef = DC6D937B2CD5762B00537645 /* OCConnection+Search.m */; };
DC6D93822CD6BEC900537645 /* OCCore+Search.h in Headers */ = {isa = PBXBuildFile; fileRef = DC6D93802CD6BEC900537645 /* OCCore+Search.h */; settings = {ATTRIBUTES = (Public, ); }; };
DC6D93832CD6BEC900537645 /* OCCore+Search.m in Sources */ = {isa = PBXBuildFile; fileRef = DC6D93812CD6BEC900537645 /* OCCore+Search.m */; };
DC6D93862CD6BF3200537645 /* OCSearchResult.h in Headers */ = {isa = PBXBuildFile; fileRef = DC6D93842CD6BF3200537645 /* OCSearchResult.h */; settings = {ATTRIBUTES = (Public, ); }; };
DC6D93872CD6BF3200537645 /* OCSearchResult.m in Sources */ = {isa = PBXBuildFile; fileRef = DC6D93852CD6BF3200537645 /* OCSearchResult.m */; };
DC6DB88221C26F4D00189B21 /* XCTestCase+Tagging.m in Sources */ = {isa = PBXBuildFile; fileRef = DC6DB88121C26F4D00189B21 /* XCTestCase+Tagging.m */; };
DC6DEEAD24C5978E00E3772E /* OCHTTPPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = DC6DEEAB24C5978E00E3772E /* OCHTTPPolicy.h */; settings = {ATTRIBUTES = (Public, ); }; };
DC6DEEAE24C5978E00E3772E /* OCHTTPPolicy.m in Sources */ = {isa = PBXBuildFile; fileRef = DC6DEEAC24C5978E00E3772E /* OCHTTPPolicy.m */; };
Expand Down Expand Up @@ -879,6 +884,8 @@
DCF00BF527E28A77001F2AFC /* OCDataSourceSubscription+Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = DCF00BF327E28A77001F2AFC /* OCDataSourceSubscription+Internal.h */; };
DCF00BF627E28A77001F2AFC /* OCDataSourceSubscription+Internal.m in Sources */ = {isa = PBXBuildFile; fileRef = DCF00BF427E28A77001F2AFC /* OCDataSourceSubscription+Internal.m */; };
DCF00C1927E698A4001F2AFC /* DataSourceTests.m in Sources */ = {isa = PBXBuildFile; fileRef = DCF00C1827E698A4001F2AFC /* DataSourceTests.m */; };
DCF06B662CED34AB00B95D79 /* OCQueryCondition+KQLBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = DCF06B642CED34AB00B95D79 /* OCQueryCondition+KQLBuilder.h */; settings = {ATTRIBUTES = (Public, ); }; };
DCF06B672CED34AB00B95D79 /* OCQueryCondition+KQLBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = DCF06B652CED34AB00B95D79 /* OCQueryCondition+KQLBuilder.m */; };
DCF072E42798630900E0B01D /* OCResourceTextPlaceholder.h in Headers */ = {isa = PBXBuildFile; fileRef = DCF072E22798630900E0B01D /* OCResourceTextPlaceholder.h */; settings = {ATTRIBUTES = (Public, ); }; };
DCF072E52798630900E0B01D /* OCResourceTextPlaceholder.m in Sources */ = {isa = PBXBuildFile; fileRef = DCF072E32798630900E0B01D /* OCResourceTextPlaceholder.m */; };
DCF072E82798652500E0B01D /* OCResourceSourceAvatarPlaceholders.h in Headers */ = {isa = PBXBuildFile; fileRef = DCF072E62798652500E0B01D /* OCResourceSourceAvatarPlaceholders.h */; settings = {ATTRIBUTES = (Public, ); }; };
Expand Down Expand Up @@ -1456,6 +1463,11 @@
DC6D387E2C4E4ED300169BF5 /* OCWaitConditionAvailableOffline.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OCWaitConditionAvailableOffline.m; sourceTree = "<group>"; };
DC6D51D724A8BC4C006B75E6 /* OCNetworkMonitor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OCNetworkMonitor.h; sourceTree = "<group>"; };
DC6D51D824A8BC4C006B75E6 /* OCNetworkMonitor.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OCNetworkMonitor.m; sourceTree = "<group>"; };
DC6D937B2CD5762B00537645 /* OCConnection+Search.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "OCConnection+Search.m"; sourceTree = "<group>"; };
DC6D93802CD6BEC900537645 /* OCCore+Search.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "OCCore+Search.h"; sourceTree = "<group>"; };
DC6D93812CD6BEC900537645 /* OCCore+Search.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "OCCore+Search.m"; sourceTree = "<group>"; };
DC6D93842CD6BF3200537645 /* OCSearchResult.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OCSearchResult.h; sourceTree = "<group>"; };
DC6D93852CD6BF3200537645 /* OCSearchResult.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OCSearchResult.m; sourceTree = "<group>"; };
DC6DB88021C26F4D00189B21 /* XCTestCase+Tagging.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "XCTestCase+Tagging.h"; sourceTree = "<group>"; };
DC6DB88121C26F4D00189B21 /* XCTestCase+Tagging.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "XCTestCase+Tagging.m"; sourceTree = "<group>"; };
DC6DEEAB24C5978E00E3772E /* OCHTTPPolicy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OCHTTPPolicy.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1919,6 +1931,8 @@
DCF00BF327E28A77001F2AFC /* OCDataSourceSubscription+Internal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "OCDataSourceSubscription+Internal.h"; sourceTree = "<group>"; };
DCF00BF427E28A77001F2AFC /* OCDataSourceSubscription+Internal.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "OCDataSourceSubscription+Internal.m"; sourceTree = "<group>"; };
DCF00C1827E698A4001F2AFC /* DataSourceTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DataSourceTests.m; sourceTree = "<group>"; };
DCF06B642CED34AB00B95D79 /* OCQueryCondition+KQLBuilder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "OCQueryCondition+KQLBuilder.h"; sourceTree = "<group>"; };
DCF06B652CED34AB00B95D79 /* OCQueryCondition+KQLBuilder.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "OCQueryCondition+KQLBuilder.m"; sourceTree = "<group>"; };
DCF072E22798630900E0B01D /* OCResourceTextPlaceholder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OCResourceTextPlaceholder.h; sourceTree = "<group>"; };
DCF072E32798630900E0B01D /* OCResourceTextPlaceholder.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OCResourceTextPlaceholder.m; sourceTree = "<group>"; };
DCF072E62798652500E0B01D /* OCResourceSourceAvatarPlaceholders.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OCResourceSourceAvatarPlaceholders.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2589,6 +2603,8 @@
DC359690223FA7CC00C4D6E6 /* OCQueryCondition.h */,
DC35969522403E5B00C4D6E6 /* OCQueryCondition+SQLBuilder.m */,
DC35969422403E5B00C4D6E6 /* OCQueryCondition+SQLBuilder.h */,
DCF06B652CED34AB00B95D79 /* OCQueryCondition+KQLBuilder.m */,
DCF06B642CED34AB00B95D79 /* OCQueryCondition+KQLBuilder.h */,
DC3596992240EC0A00C4D6E6 /* OCQueryCondition+Item.m */,
DC3596982240EC0A00C4D6E6 /* OCQueryCondition+Item.h */,
);
Expand Down Expand Up @@ -3031,6 +3047,25 @@
path = Update;
sourceTree = "<group>";
};
DC6D937E2CD5879A00537645 /* Search */ = {
isa = PBXGroup;
children = (
DC6D937B2CD5762B00537645 /* OCConnection+Search.m */,
);
path = Search;
sourceTree = "<group>";
};
DC6D937F2CD6BE9C00537645 /* Search */ = {
isa = PBXGroup;
children = (
DC6D93812CD6BEC900537645 /* OCCore+Search.m */,
DC6D93802CD6BEC900537645 /* OCCore+Search.h */,
DC6D93852CD6BF3200537645 /* OCSearchResult.m */,
DC6D93842CD6BF3200537645 /* OCSearchResult.h */,
);
path = Search;
sourceTree = "<group>";
};
DC6DEEAA24C5977500E3772E /* Policy */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -3323,6 +3358,7 @@
DC19BFE221CB9FAC007C20D1 /* FileProvider */,
DC2FED5D228D5577004FDEC6 /* Favorites */,
DC19BFE121CB9F4F007C20D1 /* Sync */,
DC6D937F2CD6BE9C00537645 /* Search */,
DC2F6377223A61A60063C2DA /* Core Query */,
);
path = Core;
Expand Down Expand Up @@ -3402,6 +3438,7 @@
DCCE49362684BBF5005961D8 /* DAVResponse */,
DCD63279223BB1930090169E /* Capabilities */,
DC85570A204FEA5E00189B9A /* Categories */,
DC6D937E2CD5879A00537645 /* Search */,
DCDB760F2739D26100EE7A06 /* ServerLocator */,
);
path = Connection;
Expand Down Expand Up @@ -4480,6 +4517,7 @@
DC4B1171220830F20062BCDD /* OCHTTPPipelineBackend.h in Headers */,
DC19BFD221CA6C15007C20D1 /* OCSyncIssueChoice.h in Headers */,
DCDB761E2739D4A300EE7A06 /* OCServerLocatorWebFinger.h in Headers */,
DC6D93822CD6BEC900537645 /* OCCore+Search.h in Headers */,
DCEE0B6F25E697AF006534B5 /* OCCoreManager+ItemResolution.h in Headers */,
DCC8FA21202B218100EB6701 /* OCAppIdentity.h in Headers */,
DCC3701324D4D134008B0DEB /* OCScanJobActivity.h in Headers */,
Expand Down Expand Up @@ -4600,6 +4638,7 @@
DC41C79025EA5F7A0074F23B /* OCResourceSource.h in Headers */,
DCF575DF27956D84003BEBBA /* OCViewProviderContext.h in Headers */,
DC701477220AE696009D4FD9 /* OCHTTPPipelineTask.h in Headers */,
DC6D93862CD6BF3200537645 /* OCSearchResult.h in Headers */,
DC47E4DD27A5820D0020E8EF /* GAODataError.h in Headers */,
DC622C4E29019515001D73A0 /* OCLocale+SystemLanguage.h in Headers */,
DC47E4D727A5820D0020E8EF /* GAQuota.h in Headers */,
Expand Down Expand Up @@ -4781,6 +4820,7 @@
DCAEB06921FA617D0067E147 /* OCActivity.h in Headers */,
DCFFF57E20D3A51C0096D2D3 /* OCSyncContext.h in Headers */,
DC0283632090A3E8005B6334 /* OCItemThumbnail.h in Headers */,
DCF06B662CED34AB00B95D79 /* OCQueryCondition+KQLBuilder.h in Headers */,
DCADC04D2072D54200DB8E83 /* OCSQLiteTableSchema.h in Headers */,
DC73F3BF254BFE9900CE5FA9 /* NSArray+ObjCRuntime.h in Headers */,
DCC4F3FF27D75BF700ABF4C9 /* OCDataConverterPipeline.h in Headers */,
Expand Down Expand Up @@ -5246,6 +5286,7 @@
DCDD9B15222986D50052A001 /* OCShare+OCXMLObjectCreation.m in Sources */,
DC54396520D50B8A002BF291 /* OCCore+CommandDelete.m in Sources */,
DCF163F7274BA6C300E0182A /* OCSQLiteCollationLocalized.m in Sources */,
DC6D93872CD6BF3200537645 /* OCSearchResult.m in Sources */,
DC4B116E2208306C0062BCDD /* OCHTTPPipeline.m in Sources */,
DC8B7B3A22D88FFD00E63657 /* OCItemPolicyProcessor.m in Sources */,
DC8266602818972200F91F7D /* OCVaultLocation.m in Sources */,
Expand All @@ -5270,6 +5311,7 @@
DC7014262209CE7A009D4FD9 /* OCHTTPPipelineManager.m in Sources */,
DC6ABF6C2534633E00689C7B /* OCHostSimulatorManager.m in Sources */,
DCD2D40422F059190071FB8F /* OCClassSettingsUserPreferences.m in Sources */,
DC6D937D2CD5762B00537645 /* OCConnection+Search.m in Sources */,
DC5D9E6924963DED00BFFE8E /* OCMessageChoice.m in Sources */,
DCC26FBA2B722C8900904000 /* OCPasswordPolicyReport.m in Sources */,
DC855700204F597800189B9A /* OCXMLParserNode.m in Sources */,
Expand Down Expand Up @@ -5369,6 +5411,7 @@
DC0BE5B228F80BBA00CE2101 /* OCShareRole.m in Sources */,
DCC26FC02B7397D400904000 /* OCPasswordPolicyRule+StandardRules.m in Sources */,
DCC6567520CA695600110A97 /* OCCoreManager.m in Sources */,
DCF06B672CED34AB00B95D79 /* OCQueryCondition+KQLBuilder.m in Sources */,
DC2F66A12603FCF6001BFDB6 /* OCCancelAction.m in Sources */,
DC6DEEBA24C5C82400E3772E /* OCHTTPPolicyBookmark.m in Sources */,
DCEE0B7025E697AF006534B5 /* OCCoreManager+ItemResolution.m in Sources */,
Expand Down Expand Up @@ -5415,6 +5458,7 @@
DC85571D2050196000189B9A /* OCItem+OCXMLObjectCreation.m in Sources */,
DC7E0A702036F28B006111FA /* OCKeychain.m in Sources */,
DC826666281AC59D00F91F7D /* OCVFSCore.m in Sources */,
DC6D93832CD6BEC900537645 /* OCCore+Search.m in Sources */,
DC49B55428339BE200DAF13B /* NSArray+OCMapping.m in Sources */,
DC4AFAB1206A8C1D00189B9A /* OCSQLiteStatement.m in Sources */,
DCEEB2F6204802CF00189B9A /* OCIssue.m in Sources */,
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions ownCloudSDK/Connection/Capabilities/OCCapabilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@ typedef NSNumber* OCCapabilityBool;

@property(readonly,nonatomic) BOOL federatedSharingSupported;

#pragma mark - Search
@property(readonly,nonatomic) BOOL serverSideSearchSupported; //!< Indicates if ocis-style KQL-based server-side search is available
@property(readonly,nullable,nonatomic) NSArray<NSString *> *enabledServerSideSearchProperties; //!< Returns a list of enabled/supported server-side search properties (f.ex. "name", "mtime", "size", "mediatype", "type", "tag", "tags", "content", "scope")
- (nullable NSArray<NSString *> *)supportedKeywordsForServerSideSearchProperty:(NSString *)searchPropertyName; //!< Returns the server-provided list of supported keywords for that property (f.ex. "document", "spreadsheet", … for "mediatype")

#pragma mark - Notifications
@property(readonly,nullable,nonatomic) NSArray<NSString *> *notificationEndpoints;

Expand Down
56 changes: 56 additions & 0 deletions ownCloudSDK/Connection/Capabilities/OCCapabilities.m
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ @implementation OCCapabilities
@dynamic federatedSharingIncoming;
@dynamic federatedSharingOutgoing;

#pragma mark - Search
@dynamic serverSideSearchSupported;

#pragma mark - Notifications
@dynamic notificationEndpoints;

Expand Down Expand Up @@ -774,6 +777,59 @@ - (BOOL)federatedSharingSupported
return (self.federatedSharingIncoming.boolValue || self.federatedSharingOutgoing.boolValue);
}

#pragma mark - Search
- (BOOL)serverSideSearchSupported
{
return (OCTypedCast(_capabilities[@"search"], NSDictionary) != nil);
}

- (NSArray<NSString *> *)enabledServerSideSearchProperties
{
NSDictionary<NSString *, NSDictionary *> *searchCapabilityDict = OCTypedCast(_capabilities[@"search"], NSDictionary);
NSMutableArray<NSString *> *enabledProperties = nil;
if (searchCapabilityDict != nil)
{
NSDictionary<NSString *, NSDictionary *> *propertyListDict = OCTypedCast(searchCapabilityDict[@"property"], NSDictionary);
if (propertyListDict != nil)
{
for (NSString *property in propertyListDict)
{
NSDictionary<NSString *, id> *propertyDict = OCTypedCast(propertyListDict[property], NSDictionary);

if (propertyDict != nil)
{
if ([propertyDict[@"enabled"] isKindOfClass:NSNumber.class] && (((NSNumber *)propertyDict[@"enabled"]).boolValue))
{
if (enabledProperties == nil) { enabledProperties = [NSMutableArray new]; }
[enabledProperties addObject:property];
}
}
}
}
}

return (enabledProperties);
}

- (nullable NSArray<NSString *> *)supportedKeywordsForServerSideSearchProperty:(NSString *)searchPropertyName
{
NSDictionary<NSString *, NSDictionary *> *searchCapabilityDict = OCTypedCast(_capabilities[@"search"], NSDictionary);
NSMutableArray<NSString *> *enabledProperties = nil;
if (searchCapabilityDict != nil)
{
NSDictionary<NSString *, NSDictionary *> *propertyListDict = OCTypedCast(searchCapabilityDict[@"property"], NSDictionary);
if (propertyListDict != nil)
{
NSDictionary<NSString *, id> *propertyDict = OCTypedCast(propertyListDict[searchPropertyName], NSDictionary);
if ((propertyDict != nil) && [propertyDict[@"keywords"] isKindOfClass:NSArray.class])
{
return (propertyDict[@"keywords"]);
}
}
}
return (nil);
}

#pragma mark - Notifications
- (NSArray<NSString *> *)notificationEndpoints
{
Expand Down
4 changes: 2 additions & 2 deletions ownCloudSDK/Connection/OCConnection+Sharing.m
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,7 @@ - (nullable NSProgress *)retrievePrivateLinkForItem:(OCItem *)item completionHan
NSArray <NSError *> *errors = nil;
NSArray <OCItem *> *items = nil;

if ((items = [((OCHTTPDAVRequest *)request) responseItemsForBasePath:endpointURL.path reuseUsersByID:self->_usersByUserID driveID:nil withErrors:&errors]) != nil)
if ((items = [((OCHTTPDAVRequest *)request) responseItemsForBasePath:endpointURL.path drives:nil reuseUsersByID:self->_usersByUserID driveID:nil withErrors:&errors]) != nil)
{
NSURL *privateLink;

Expand Down Expand Up @@ -1011,7 +1011,7 @@ - (nullable NSProgress *)retrievePathForPrivateLink:(NSURL *)privateLink complet
NSArray <NSError *> *errors = nil;
NSArray <OCItem *> *items = nil;

if ((items = [((OCHTTPDAVRequest *)request) responseItemsForBasePath:endpointURL.path reuseUsersByID:self->_usersByUserID driveID:nil withErrors:&errors]) != nil)
if ((items = [((OCHTTPDAVRequest *)request) responseItemsForBasePath:endpointURL.path drives:nil reuseUsersByID:self->_usersByUserID driveID:nil withErrors:&errors]) != nil)
{
OCLocation *location;

Expand Down
9 changes: 9 additions & 0 deletions ownCloudSDK/Connection/OCConnection.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ NS_ASSUME_NONNULL_BEGIN
- (nullable NSProgress *)retrieveItemListAtLocation:(OCLocation *)location depth:(NSUInteger)depth options:(nullable OCConnectionOptions)options completionHandler:(void(^)(NSError * _Nullable error, NSArray <OCItem *> * _Nullable items))completionHandler; //!< Retrieves the items at the specified path with options
- (nullable NSProgress *)retrieveItemListAtLocation:(OCLocation *)location depth:(NSUInteger)depth options:(nullable OCConnectionOptions)options resultTarget:(OCEventTarget *)eventTarget; //!< Retrieves the items at the specified path, with options to schedule on the background queue and with a "not before" date.

- (NSMutableArray <OCXMLNode *> *)_davItemAttributes; //!< Returns a newly created array of XML nodes that are requested by a PROPFIND by default

#pragma mark - Actions
- (nullable OCProgress *)createFolder:(NSString *)folderName inside:(OCItem *)parentItem options:(nullable OCConnectionOptions)options resultTarget:(OCEventTarget *)eventTarget;

Expand Down Expand Up @@ -439,11 +441,18 @@ typedef void(^OCConnectionRecipientsRetrievalCompletionHandler)(NSError * _Nulla
- (nullable NSError *)supportsServerVersion:(NSString *)serverVersion product:(NSString *)product longVersion:(NSString *)longVersion allowHiddenVersion:(BOOL)allowHiddenVersion;
@end

@interface OCConnection (Search)

- (nullable OCProgress *)searchFilesWithPattern:(NSString *)pattern limit:(nullable NSNumber *)limit options:(nullable NSDictionary<OCConnectionOptionKey,id> *)options resultTarget:(OCEventTarget *)eventTarget;

@end

extern OCConnectionEndpointID OCConnectionEndpointIDWellKnown;
extern OCConnectionEndpointID OCConnectionEndpointIDCapabilities;
extern OCConnectionEndpointID OCConnectionEndpointIDUser;
extern OCConnectionEndpointID OCConnectionEndpointIDWebDAV;
extern OCConnectionEndpointID OCConnectionEndpointIDWebDAVMeta;
extern OCConnectionEndpointID OCConnectionEndpointIDWebDAVSpaces; //!< Spaces DAV endpoint, used for f.ex. search (see ocis#9367)
extern OCConnectionEndpointID OCConnectionEndpointIDWebDAVRoot; //!< Virtual, non-configurable endpoint, builds the root URL based on OCConnectionEndpointIDWebDAV and the username found in connection.loggedInUser
extern OCConnectionEndpointID OCConnectionEndpointIDPreview; //!< Virtual, non-configurable endpoint, builds the root URL for requesting previews based on OCConnectionEndpointIDWebDAV, the username found in connection.loggedInUser and the drive ID
extern OCConnectionEndpointID OCConnectionEndpointIDStatus;
Expand Down
Loading

0 comments on commit 79e217d

Please sign in to comment.