CGA_ServiceFactory
internal protocol CGA_ServiceFactory
This allows a generic factory method for Service Wrappers.
-
Declaration
Swift
static var uuid: String { get }
Return Value
A String, with the UUID for this class’ element type.
-
REQUIRED: This creates an instance of the class, using the subclass-defined factory method.
Declaration
Swift
static func createInstance(parent: CGA_Bluetooth_Peripheral, cbElementInstance: CBService) -> CGA_Bluetooth_Service?
Parameters
parent
The Peripheral that “owns” this Service
cbElementInstance
The CB element for this Service.
Return Value
A new instance of CGA_Bluetooth_Service, or a subclass, thereof. Nil, if it fails.