Archive Project
This commit is contained in:
44
Notifications for YouTube/NYTChannelRestriction.h
Executable file
44
Notifications for YouTube/NYTChannelRestriction.h
Executable file
@@ -0,0 +1,44 @@
|
||||
//
|
||||
// NYTChannelRestrictions.h
|
||||
// Notifications for YouTube
|
||||
//
|
||||
// Created by Kim Wittenburg on 21.07.13.
|
||||
// Copyright (c) 2013 Kim Wittenburg. All rights reserved.
|
||||
//
|
||||
|
||||
@class NYTUser;
|
||||
|
||||
/* A channel restriction contains information about the rules that apply to a specific channel. Like a predicate a restriction eventually evaluates to YES or NO giving information wether a specific video should be included in the notifications or not.
|
||||
You should be aware that encoding a restriction will NOT encode the associated user. Since every channel restriction belongs to one user it is recommended that you store any restrictions as the value for a key that identifies the user (preferably the user id or the channel id).
|
||||
*/
|
||||
@interface NYTChannelRestriction : NSObject <NSCoding>
|
||||
|
||||
/* Initializes a restriction. By default a restriction always evaluates to YES.
|
||||
*/
|
||||
- (id)init;
|
||||
|
||||
/* The user this restriction belongs to. This property is not necessary but it may make things easier if you, say, want to bind restrictions to a user interface.
|
||||
*/
|
||||
@property NYTUser *user;
|
||||
|
||||
/* If YES any other properties are ignored and this restriction just evaluates to NO.
|
||||
*/
|
||||
@property BOOL disableAllNotifications;
|
||||
|
||||
/* Specifies the way of interpretation of the predicate. If this is YES a positive predicate evaluation means that the video should be included in the notifications, if this is NO a positive predicate evaluation means that the video should NOT be included. The default value is YES.
|
||||
*/
|
||||
@property BOOL positivePredicate;
|
||||
|
||||
/* The predicate that is used to evaluate this restriction. The object this predicate eventually should be evaluated with should be an instance of NYTVideo.
|
||||
*/
|
||||
@property NSPredicate *predicate;
|
||||
|
||||
/* A localized string that summarizes this restriction. It can be "Show all", "Restricted" or "Show none".
|
||||
*/
|
||||
- (NSString *)localizedRestrictionSummary;
|
||||
|
||||
/* Returns YES if this predicate evaluates to the same value as a newly created restriction would. You can use this method to efficiently store only those restrictions that are NOT the default.
|
||||
*/
|
||||
- (BOOL)differsFromDefaultValues;
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user