CBLCoreCameraManualDiscoveryProvider

Objective-C

@protocol CBLCoreCameraManualDiscoveryProvider <NSObject>

Swift

protocol CameraManualDiscoveryProvider : NSObjectProtocol

Implement the CBLCoreCameraManualDiscoveryProvider protocol in order to provide direct connections to your cameras via CascableCore based on user input (i.e., “connect to the camera at 192.168.1.46”). You can then register your manual discovery provider with CascableCore in the plugin entrypoint.

  • Attempt to discover a camera at the given descriptor.

    Your plugin should make a good effort to ensure that there is indeed a camera matching your plugin’s camera family at the given descriptor, and error out if that’s not the case. However, if this isn’t possible to determine (or doing so is tricky without affecting camera state), it’s alright to return a camera object that will generate a connection error when the user attempts to actually connect to the camera.

    Declaration

    Objective-C

    - (void)attemptToDiscoverCameraWithDescriptor:
                (CBLCameraDescriptor *_Nonnull)descriptor
                                       clientName:(NSString *_Nonnull)clientName
                                  completionQueue:
                                      (dispatch_queue_t _Nonnull)completionQueue
                                completionHandler:
                                    (CBLCameraCreationOperationCallback _Nonnull)
                                        completionHandler;

    Swift

    func attemptToDiscoverCamera(with descriptor: CameraDescriptor, clientName: String, completionQueue: dispatch_queue_t) async throws -> CBLCamera

    Parameters

    descriptor

    The descriptor that describes where the camera is.

    clientName

    The client name to display on the camera, if appropriate.

    completionQueue

    The queue on which to call the completion handler.

    completionHandler

    The completion handler to be called on completionQueue when the operation succeeds or fails.

  • Returns the camera family this provider can connect to.

    Declaration

    Objective-C

    @property (nonatomic, readonly) CBLCameraFamily providerCameraFamily;

    Swift

    var providerCameraFamily: CameraFamily { get }
  • Returns a unique identifier for the provider. Can be the plugin’s bundle ID if it only has one provider.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly, nonnull) NSString *providerIdentifier;

    Swift

    var providerIdentifier: String { get }