|
@@ -1520,7 +1520,7 @@
|
|
}];
|
|
}];
|
|
}
|
|
}
|
|
|
|
|
|
-- (void)subscribingNextcloudServerPush:(NSString *)serverPath pushTokenHash:(NSString *)pushTokenHash devicePublicKey:(NSString *)devicePublicKey onCommunication:(OCCommunication *)sharedOCComunication successRequest:(void(^)(NSHTTPURLResponse *response, NSString *publicKey, NSString *deviceIdentifier, NSString *signature, NSString *redirectedServer)) successRequest failureRequest:(void (^)(NSHTTPURLResponse *, NSError *, NSString *))failureRequest {
|
|
|
|
|
|
+- (void)subscribingNextcloudServerPush:(NSString *)serverPath pushTokenHash:(NSString *)pushTokenHash devicePublicKey:(NSString *)devicePublicKey proxyServerPath:(NSString *)proxyServerPath onCommunication:(OCCommunication *)sharedOCComunication successRequest:(void(^)(NSHTTPURLResponse *response, NSString *publicKey, NSString *deviceIdentifier, NSString *signature, NSString *redirectedServer)) successRequest failureRequest:(void (^)(NSHTTPURLResponse *, NSError *, NSString *))failureRequest {
|
|
|
|
|
|
serverPath = [serverPath encodeString:NSUTF8StringEncoding];
|
|
serverPath = [serverPath encodeString:NSUTF8StringEncoding];
|
|
serverPath = [serverPath stringByAppendingString:k_url_acces_remote_subscribing_nextcloud_server_api];
|
|
serverPath = [serverPath stringByAppendingString:k_url_acces_remote_subscribing_nextcloud_server_api];
|
|
@@ -1528,7 +1528,7 @@
|
|
OCWebDAVClient *request = [OCWebDAVClient new];
|
|
OCWebDAVClient *request = [OCWebDAVClient new];
|
|
request = [self getRequestWithCredentials:request];
|
|
request = [self getRequestWithCredentials:request];
|
|
|
|
|
|
- [request subscribingNextcloudServerPush:serverPath authorizationToken:_password pushTokenHash:pushTokenHash devicePublicKey:devicePublicKey onCommunication:sharedOCComunication success:^(NSHTTPURLResponse *response, id responseObject) {
|
|
|
|
|
|
+ [request subscribingNextcloudServerPush:serverPath authorizationToken:_password pushTokenHash:pushTokenHash devicePublicKey:devicePublicKey proxyServerPath:proxyServerPath onCommunication:sharedOCComunication success:^(NSHTTPURLResponse *response, id responseObject) {
|
|
|
|
|
|
NSData *responseData = (NSData*) responseObject;
|
|
NSData *responseData = (NSData*) responseObject;
|
|
|
|
|
|
@@ -1549,10 +1549,10 @@
|
|
}];
|
|
}];
|
|
}
|
|
}
|
|
|
|
|
|
-- (void)subscribingPushProxy:(NSString *)serverPath pushToken:(NSString *)pushToken deviceIdentifier:(NSString *)deviceIdentifier deviceIdentifierSignature:(NSString *)deviceIdentifierSignature userPublicKey:(NSString *)userPublicKey onCommunication:(OCCommunication *)sharedOCComunication successRequest:(void (^)(NSHTTPURLResponse *, NSString *))successRequest failureRequest:(void (^)(NSHTTPURLResponse *, NSError *, NSString *))failureRequest {
|
|
|
|
|
|
+- (void)subscribingPushProxy:(NSString *)serverPath pushToken:(NSString *)pushToken deviceIdentifier:(NSString *)deviceIdentifier deviceIdentifierSignature:(NSString *)deviceIdentifierSignature userPublicKey:(NSString *)userPublicKey onCommunication:(OCCommunication *)sharedOCComunication successRequest:(void (^)(NSHTTPURLResponse *, NSString *redirectedServer))successRequest failureRequest:(void (^)(NSHTTPURLResponse *, NSError *, NSString *))failureRequest {
|
|
|
|
|
|
serverPath = [serverPath encodeString:NSUTF8StringEncoding];
|
|
serverPath = [serverPath encodeString:NSUTF8StringEncoding];
|
|
- serverPath = [serverPath stringByAppendingString:@"/device"];
|
|
|
|
|
|
+ serverPath = [serverPath stringByAppendingString:@"/devices"];
|
|
|
|
|
|
OCWebDAVClient *request = [OCWebDAVClient new];
|
|
OCWebDAVClient *request = [OCWebDAVClient new];
|
|
request = [self getRequestWithCredentials:request];
|
|
request = [self getRequestWithCredentials:request];
|