blob: 4a0e02eb02fd0af90ea8d4a6ac817c794ac957a2 [file] [log] [blame]
//
// Copyright 2019 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface ServiceRegistrationHelper : NSObject
/**
* Initializes the helper for test to register all services with prepared info.
*
* @param prefix The prefix of service name. All services will be appended with an index
* number.
* @param numberOfServices The number of services to register to the target device.
*/
- (instancetype)initWithServiceNamePrefix:(NSString *)prefix
numberOfServices:(NSUInteger)numberOfServices NS_DESIGNATED_INITIALIZER;
- (instancetype)init NS_UNAVAILABLE;
/**
* Register all services to the target device asynchronously.
*
* @param deviceID The ID of the target device to register services.
* @param queue The queue to handle incoming requests to registered services.
* @timeout timeout The timeout of service registration.
*/
- (void)registerServicesToDevice:(NSString *)deviceID
queue:(dispatch_queue_t)queue
timeout:(NSTimeInterval)timeout;
@end
NS_ASSUME_NONNULL_END