Mac Developer Library

Developer

DRCoreNotifications.h Reference

Options
Deployment Target:

On This Page
Language:

DRCoreNotifications.h Reference

Inheritance


Not Applicable

Conforms To


Not Applicable

Import Statement


Swift

import DiscRecording

Objective-C

@import DiscRecording;

Disc Recording notification interfaces.

Included Headers

  • <DiscRecording/DRCoreObject.h>

  • <AvailabilityMacros.h>

Functions

  • Adds an observer callback for a notification center.

    Declaration

    Swift

    func DRNotificationCenterAddObserver(_ center: DRNotificationCenter!, _ observer: UnsafePointer<Void>, _ callback: DRNotificationCallback, _ name: CFString!, _ object: DRType!)

    Objective-C

    void DRNotificationCenterAddObserver ( DRNotificationCenterRef center, const void *observer, DRNotificationCallback callback, CFStringRef name, DRTypeRef object );

    Parameters

    center

    The notification center that the new observer callback is for.

    observer

    The observer callback to add, which gets passed to the callback.

    callback

    The observer callback to use for notification delivery.

    name

    The notification name for adding the observer.

    object

    The object the notification name is associated with.

    Import Statement

    Objective-C

    @import DiscRecording;

    Swift

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

  • Creates a notification center that can be used to register for and receive asyncronous notifications.

    Declaration

    Swift

    func DRNotificationCenterCreate() -> Unmanaged<DRNotificationCenter>!

    Objective-C

    DRNotificationCenterRef DRNotificationCenterCreate ( void );

    Return Value

    Returns reference to a new DRNotificationCenter object.

    Import Statement

    Objective-C

    @import DiscRecording;

    Swift

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

  • Creates a run-loop source object for a notification center.

    Declaration

    Swift

    func DRNotificationCenterCreateRunLoopSource(_ center: DRNotificationCenter!) -> Unmanaged<CFRunLoopSource>!

    Objective-C

    CFRunLoopSourceRef DRNotificationCenterCreateRunLoopSource ( DRNotificationCenterRef center );

    Parameters

    center

    The notification center that the new run-loop source object is for.

    If this parameter is not a valid DRNotificationCenter object, the behavior is undefined.

    Return Value

    Returns a reference to a CFRunLoopSource object.

    Import Statement

    Objective-C

    @import DiscRecording;

    Swift

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

  • Returns the type identifier of all DRNotificationCenter instances.

    Declaration

    Swift

    func DRNotificationCenterGetTypeID() -> CFTypeID

    Objective-C

    CFTypeID DRNotificationCenterGetTypeID ( void );

    Import Statement

    Objective-C

    @import DiscRecording;

    Swift

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

  • Removes an observer callback from a notification center.

    Declaration

    Swift

    func DRNotificationCenterRemoveObserver(_ center: DRNotificationCenter!, _ observer: UnsafePointer<Void>, _ name: CFString!, _ object: DRType!)

    Objective-C

    void DRNotificationCenterRemoveObserver ( DRNotificationCenterRef center, const void *observer, CFStringRef name, DRTypeRef object );

    Parameters

    center

    The notification center that the observer callback will be removed from.

    observer

    The observer callback to remove.

    name

    The notification name for removing the observer callback.

    object

    The object the notification name is associated with.

    Import Statement

    Objective-C

    @import DiscRecording;

    Swift

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

Callbacks

  • Delivers a notification.

    Declaration

    Swift

    typealias DRNotificationCallback = CFunctionPointer<((DRNotificationCenter!, UnsafeMutablePointer<Void>, CFString!, DRType!, CFDictionary!) -> Void)>

    Objective-C

    typedef void ( *DRNotificationCallback)( DRNotificationCenterRef center, void *observer, CFStringRef name, DRTypeRef object, CFDictionaryRef info);

    Parameters

    center

    The notification center that this callback is associated with.

    observer

    The observer specified when this callback was added.

    name

    The notification name.

    object

    The object that this notification is associated with, or NULL when there is no associated object.

    info

    A dictionary object containing additional notification information, or NULL when there is no associated object.

    Import Statement

    Objective-C

    @import DiscRecording;

    Swift

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

Data Types

See the Overview section above for header-level documentation.

  • The type of a reference to a DRNotificationCenter object.

    Declaration

    Swift

    typealias DRNotificationCenterRef = DRNotificationCenter

    Objective-C

    typedef struct __DRNotificationCenter* DRNotificationCenterRef;

    Import Statement

    Objective-C

    @import DiscRecording;

    Swift

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.