commit | author | age
|
bad748
|
1 |
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. |
W |
2 |
// |
|
3 |
// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, |
|
4 |
// copy, modify, and distribute this software in source code or binary form for use |
|
5 |
// in connection with the web services and APIs provided by Facebook. |
|
6 |
// |
|
7 |
// As with any software that integrates with the Facebook platform, your use of |
|
8 |
// this software is subject to the Facebook Developer Principles and Policies |
|
9 |
// [http://developers.facebook.com/policy/]. This copyright notice shall be |
|
10 |
// included in all copies or substantial portions of the software. |
|
11 |
// |
|
12 |
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
13 |
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS |
|
14 |
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR |
|
15 |
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER |
|
16 |
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
|
17 |
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
|
18 |
|
|
19 |
#import <Foundation/Foundation.h> |
|
20 |
|
|
21 |
@class FBSDKShareOpenGraphObject; |
|
22 |
@class FBSDKSharePhoto; |
|
23 |
|
|
24 |
/*! |
|
25 |
@abstract Protocol defining operations on open graph actions and objects. |
|
26 |
@discussion The property keys MUST have namespaces specified on them, such as `og:image`. |
|
27 |
*/ |
|
28 |
@protocol FBSDKShareOpenGraphValueContaining <NSObject, NSSecureCoding> |
|
29 |
|
|
30 |
/*! |
|
31 |
@abstract Gets an NSArray out of the receiver. |
|
32 |
@param key The key for the value |
|
33 |
@return The NSArray value or nil |
|
34 |
*/ |
|
35 |
- (NSArray *)arrayForKey:(NSString *)key; |
|
36 |
|
|
37 |
/*! |
|
38 |
@abstract Applies a given block object to the entries of the receiver. |
|
39 |
@param block A block object to operate on entries in the receiver |
|
40 |
*/ |
|
41 |
- (void)enumerateKeysAndObjectsUsingBlock:(void (^)(NSString *key, id object, BOOL *stop))block; |
|
42 |
|
|
43 |
/*! |
|
44 |
@abstract Returns an enumerator object that lets you access each key in the receiver. |
|
45 |
@return An enumerator object that lets you access each key in the receiver |
|
46 |
*/ |
|
47 |
- (NSEnumerator *)keyEnumerator; |
|
48 |
|
|
49 |
/*! |
|
50 |
@abstract Gets an NSNumber out of the receiver. |
|
51 |
@param key The key for the value |
|
52 |
@return The NSNumber value or nil |
|
53 |
*/ |
|
54 |
- (NSNumber *)numberForKey:(NSString *)key; |
|
55 |
|
|
56 |
/*! |
|
57 |
@abstract Returns an enumerator object that lets you access each value in the receiver. |
|
58 |
@return An enumerator object that lets you access each value in the receiver |
|
59 |
*/ |
|
60 |
- (NSEnumerator *)objectEnumerator; |
|
61 |
|
|
62 |
/*! |
|
63 |
@abstract Gets an FBSDKShareOpenGraphObject out of the receiver. |
|
64 |
@param key The key for the value |
|
65 |
@return The FBSDKShareOpenGraphObject value or nil |
|
66 |
*/ |
|
67 |
- (FBSDKShareOpenGraphObject *)objectForKey:(NSString *)key; |
|
68 |
|
|
69 |
/*! |
|
70 |
@abstract Enables subscript access to the values in the receiver. |
|
71 |
@param key The key for the value |
|
72 |
@return The value |
|
73 |
*/ |
|
74 |
- (id)objectForKeyedSubscript:(NSString *)key; |
|
75 |
|
|
76 |
/*! |
|
77 |
@abstract Parses properties out of a dictionary into the receiver. |
|
78 |
@param properties The properties to parse. |
|
79 |
*/ |
|
80 |
- (void)parseProperties:(NSDictionary *)properties; |
|
81 |
|
|
82 |
/*! |
|
83 |
@abstract Gets an FBSDKSharePhoto out of the receiver. |
|
84 |
@param key The key for the value |
|
85 |
@return The FBSDKSharePhoto value or nil |
|
86 |
*/ |
|
87 |
- (FBSDKSharePhoto *)photoForKey:(NSString *)key; |
|
88 |
|
|
89 |
/*! |
|
90 |
@abstract Removes a value from the receiver for the specified key. |
|
91 |
@param key The key for the value |
|
92 |
*/ |
|
93 |
- (void)removeObjectForKey:(NSString *)key; |
|
94 |
|
|
95 |
/*! |
|
96 |
@abstract Sets an NSArray on the receiver. |
|
97 |
@discussion This method will throw if the array contains any values that is not an NSNumber, NSString, NSURL, |
|
98 |
FBSDKSharePhoto or FBSDKShareOpenGraphObject. |
|
99 |
@param array The NSArray value |
|
100 |
@param key The key for the value |
|
101 |
*/ |
|
102 |
- (void)setArray:(NSArray *)array forKey:(NSString *)key; |
|
103 |
|
|
104 |
/*! |
|
105 |
@abstract Sets an NSNumber on the receiver. |
|
106 |
@param number The NSNumber value |
|
107 |
@param key The key for the value |
|
108 |
*/ |
|
109 |
- (void)setNumber:(NSNumber *)number forKey:(NSString *)key; |
|
110 |
|
|
111 |
/*! |
|
112 |
@abstract Sets an FBSDKShareOpenGraphObject on the receiver. |
|
113 |
@param object The FBSDKShareOpenGraphObject value |
|
114 |
@param key The key for the value |
|
115 |
*/ |
|
116 |
- (void)setObject:(FBSDKShareOpenGraphObject *)object forKey:(NSString *)key; |
|
117 |
|
|
118 |
/*! |
|
119 |
@abstract Sets an FBSDKSharePhoto on the receiver. |
|
120 |
@param photo The FBSDKSharePhoto value |
|
121 |
@param key The key for the value |
|
122 |
*/ |
|
123 |
- (void)setPhoto:(FBSDKSharePhoto *)photo forKey:(NSString *)key; |
|
124 |
|
|
125 |
/*! |
|
126 |
@abstract Sets an NSString on the receiver. |
|
127 |
@param string The NSString value |
|
128 |
@param key The key for the value |
|
129 |
*/ |
|
130 |
- (void)setString:(NSString *)string forKey:(NSString *)key; |
|
131 |
|
|
132 |
/*! |
|
133 |
@abstract Sets an NSURL on the receiver. |
|
134 |
@param URL The NSURL value |
|
135 |
@param key The key for the value |
|
136 |
*/ |
|
137 |
- (void)setURL:(NSURL *)URL forKey:(NSString *)key; |
|
138 |
|
|
139 |
/*! |
|
140 |
@abstract Gets an NSString out of the receiver. |
|
141 |
@param key The key for the value |
|
142 |
@return The NSString value or nil |
|
143 |
*/ |
|
144 |
- (NSString *)stringForKey:(NSString *)key; |
|
145 |
|
|
146 |
/*! |
|
147 |
@abstract Gets an NSURL out of the receiver. |
|
148 |
@param key The key for the value |
|
149 |
@return The NSURL value or nil |
|
150 |
*/ |
|
151 |
- (NSURL *)URLForKey:(NSString *)key; |
|
152 |
|
|
153 |
@end |
|
154 |
|
|
155 |
/*! |
|
156 |
@abstract A base class to container Open Graph values. |
|
157 |
*/ |
|
158 |
@interface FBSDKShareOpenGraphValueContainer : NSObject <FBSDKShareOpenGraphValueContaining> |
|
159 |
|
|
160 |
@end |