PTNotification Class Reference
Inherits from | NSObject |
Declared in | PTNotification.h |
Overview
PTNotification class.
PTNotificationHistory mantains a list of elements, each element containing a separate insstance of PTNotificationclass. This class encapsulates the object represantation of a single notification event.
Tasks
Creating a PTNotification
-
+ notificationWithType:code:description:
Convenience method to create a PTNotification instance with a type, code and description PTNotificationType Types: PTNotificationTypeInfo, PTNotificationTypeWarning, PTNotificationTypeError,PTNotificationTypeUndefined;
-
+ notificationWithType:code:description:metadata:innerNotification:
Convenience method to create a PTNotification instance with a type, code, description, metadata and inner notification. PTNotificationType Types: PTNotificationTypeInfo, PTNotificationTypeWarning, PTNotificationTypeError,PTNotificationTypeUndefined;
-
+ notificationWithAVPlayerItemErrorLogEvent:
Convenience method to create a PTNotification from a AVPlayerItemErrorLogEvent.
-
+ notificationWithNSError:
Convenience method to create a PTNotification from a NSError.
-
– initWithType:code:description:
Creating a notification Initializes the notification with the specified type, code and description. PTNotificationType Types: PTNotificationTypeInfo, PTNotificationTypeWarning, PTNotificationTypeError,PTNotificationTypeUndefined;
-
– initWithType:code:description:metadata:innerNotification:
Creating a notification Initializes the notification with the specified type, code, description, metadata and inner notification. PTNotificationType Types: PTNotificationTypeInfo, PTNotificationTypeWarning, PTNotificationTypeError,PTNotificationTypeUndefined;
-
– setMetadataValue:forKey:
Adding metadata values Convinience method to add metadata values to a notification
-
– metadataValueforKey:
Getting metadata values Convinience method to get metadata values from a notification.
-
type
PTNotificationType Describes the notification event type. Types: PTNotificationTypeInfo, PTNotificationTypeWarning, PTNotificationTypeError,PTNotificationTypeUndefined;
property -
code
NSInteger A code describing the notification generated by the PMP framework
property -
description
NSString A description of the error. A free-form string containing a human-readable description of the notification event.
property -
metadata
NSMutableDictionary A dictionary for arbitrary added info. Depending on the notification, useful information can be stored in the metadata such as: URL, run-time variable values, etc.
property -
innerNotification
PTNotification Instance of the notification. The semantics of this link is that of “event notification reason”. The notification that caused the current notification to be dispatched.
property
Properties
code
NSInteger A code describing the notification generated by the PMP framework
@property (nonatomic, readonly) NSInteger code
Discussion
NSInteger A code describing the notification generated by the PMP framework
Declared In
PTNotification.h
description
NSString A description of the error. A free-form string containing a human-readable description of the notification event.
@property (nonatomic, readonly, getter=notification_description) NSString *description
Discussion
NSString A description of the error. A free-form string containing a human-readable description of the notification event.
Declared In
PTNotification.h
innerNotification
PTNotification Instance of the notification. The semantics of this link is that of “event notification reason”. The notification that caused the current notification to be dispatched.
@property (nonatomic, readonly) PTNotification *innerNotification
Discussion
PTNotification Instance of the notification. The semantics of this link is that of “event notification reason”. The notification that caused the current notification to be dispatched.
Declared In
PTNotification.h
metadata
NSMutableDictionary A dictionary for arbitrary added info. Depending on the notification, useful information can be stored in the metadata such as: URL, run-time variable values, etc.
@property (nonatomic, retain) NSMutableDictionary *metadata
Discussion
NSMutableDictionary A dictionary for arbitrary added info. Depending on the notification, useful information can be stored in the metadata such as: URL, run-time variable values, etc.
Declared In
PTNotification.h
type
PTNotificationType Describes the notification event type. Types: PTNotificationTypeInfo, PTNotificationTypeWarning, PTNotificationTypeError,PTNotificationTypeUndefined;
@property (nonatomic, readonly) PTNotificationType type
Discussion
PTNotificationType Describes the notification event type. Types: PTNotificationTypeInfo, PTNotificationTypeWarning, PTNotificationTypeError,PTNotificationTypeUndefined;
Declared In
PTNotification.h
Class Methods
notificationWithAVPlayerItemErrorLogEvent:
Convenience method to create a PTNotification from a AVPlayerItemErrorLogEvent.
+ (PTNotification *)notificationWithAVPlayerItemErrorLogEvent:(AVPlayerItemErrorLogEvent *)error
Discussion
Convenience method to create a PTNotification from a AVPlayerItemErrorLogEvent.
Declared In
PTNotification.h
notificationWithNSError:
Convenience method to create a PTNotification from a NSError.
+ (PTNotification *)notificationWithNSError:(NSError *)error
Discussion
Convenience method to create a PTNotification from a NSError.
Declared In
PTNotification.h
notificationWithType:code:description:
Convenience method to create a PTNotification instance with a type, code and description PTNotificationType Types: PTNotificationTypeInfo, PTNotificationTypeWarning, PTNotificationTypeError,PTNotificationTypeUndefined;
+ (PTNotification *)notificationWithType:(PTNotificationType)type code:(NSInteger)code description:(NSString *)description
Discussion
Convenience method to create a PTNotification instance with a type, code and description PTNotificationType Types: PTNotificationTypeInfo, PTNotificationTypeWarning, PTNotificationTypeError,PTNotificationTypeUndefined;
Declared In
PTNotification.h
notificationWithType:code:description:metadata:innerNotification:
Convenience method to create a PTNotification instance with a type, code, description, metadata and inner notification. PTNotificationType Types: PTNotificationTypeInfo, PTNotificationTypeWarning, PTNotificationTypeError,PTNotificationTypeUndefined;
+ (PTNotification *)notificationWithType:(PTNotificationType)type code:(NSInteger)code description:(NSString *)description metadata:(NSMutableDictionary *)metadata innerNotification:(PTNotification *)notification
Discussion
Convenience method to create a PTNotification instance with a type, code, description, metadata and inner notification. PTNotificationType Types: PTNotificationTypeInfo, PTNotificationTypeWarning, PTNotificationTypeError,PTNotificationTypeUndefined;
Declared In
PTNotification.h
Instance Methods
initWithType:code:description:
Creating a notification Initializes the notification with the specified type, code and description. PTNotificationType Types: PTNotificationTypeInfo, PTNotificationTypeWarning, PTNotificationTypeError,PTNotificationTypeUndefined;
- (id)initWithType:(PTNotificationType)type code:(NSInteger)code description:(NSString *)description
Discussion
Creating a notification Initializes the notification with the specified type, code and description. PTNotificationType Types: PTNotificationTypeInfo, PTNotificationTypeWarning, PTNotificationTypeError,PTNotificationTypeUndefined;
Declared In
PTNotification.h
initWithType:code:description:metadata:innerNotification:
Creating a notification Initializes the notification with the specified type, code, description, metadata and inner notification. PTNotificationType Types: PTNotificationTypeInfo, PTNotificationTypeWarning, PTNotificationTypeError,PTNotificationTypeUndefined;
- (id)initWithType:(PTNotificationType)type code:(NSInteger)code description:(NSString *)description metadata:(NSMutableDictionary *)metadata innerNotification:(PTNotification *)notification
Discussion
Creating a notification Initializes the notification with the specified type, code, description, metadata and inner notification. PTNotificationType Types: PTNotificationTypeInfo, PTNotificationTypeWarning, PTNotificationTypeError,PTNotificationTypeUndefined;
Declared In
PTNotification.h