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 |
|
9febd9
|
24 |
/** |
W |
25 |
Protocol defining operations on open graph actions and objects. |
|
26 |
|
|
27 |
The property keys MUST have namespaces specified on them, such as `og:image`. |
bad748
|
28 |
*/ |
W |
29 |
@protocol FBSDKShareOpenGraphValueContaining <NSObject, NSSecureCoding> |
|
30 |
|
9febd9
|
31 |
/** |
W |
32 |
Gets an NSArray out of the receiver. |
|
33 |
- Parameter key: The key for the value |
|
34 |
- Returns: The NSArray value or nil |
bad748
|
35 |
*/ |
W |
36 |
- (NSArray *)arrayForKey:(NSString *)key; |
|
37 |
|
9febd9
|
38 |
/** |
W |
39 |
Applies a given block object to the entries of the receiver. |
|
40 |
- Parameter block: A block object to operate on entries in the receiver |
bad748
|
41 |
*/ |
W |
42 |
- (void)enumerateKeysAndObjectsUsingBlock:(void (^)(NSString *key, id object, BOOL *stop))block; |
|
43 |
|
9febd9
|
44 |
/** |
W |
45 |
Returns an enumerator object that lets you access each key in the receiver. |
|
46 |
- Returns: An enumerator object that lets you access each key in the receiver |
bad748
|
47 |
*/ |
W |
48 |
- (NSEnumerator *)keyEnumerator; |
|
49 |
|
9febd9
|
50 |
/** |
W |
51 |
Gets an NSNumber out of the receiver. |
|
52 |
- Parameter key: The key for the value |
|
53 |
- Returns: The NSNumber value or nil |
bad748
|
54 |
*/ |
W |
55 |
- (NSNumber *)numberForKey:(NSString *)key; |
|
56 |
|
9febd9
|
57 |
/** |
W |
58 |
Returns an enumerator object that lets you access each value in the receiver. |
|
59 |
- Returns: An enumerator object that lets you access each value in the receiver |
bad748
|
60 |
*/ |
W |
61 |
- (NSEnumerator *)objectEnumerator; |
|
62 |
|
9febd9
|
63 |
/** |
W |
64 |
Gets an FBSDKShareOpenGraphObject out of the receiver. |
|
65 |
- Parameter key: The key for the value |
|
66 |
- Returns: The FBSDKShareOpenGraphObject value or nil |
bad748
|
67 |
*/ |
W |
68 |
- (FBSDKShareOpenGraphObject *)objectForKey:(NSString *)key; |
|
69 |
|
9febd9
|
70 |
/** |
W |
71 |
Enables subscript access to the values in the receiver. |
|
72 |
- Parameter key: The key for the value |
|
73 |
- Returns: The value |
bad748
|
74 |
*/ |
W |
75 |
- (id)objectForKeyedSubscript:(NSString *)key; |
|
76 |
|
9febd9
|
77 |
/** |
W |
78 |
Parses properties out of a dictionary into the receiver. |
|
79 |
- Parameter properties: The properties to parse. |
bad748
|
80 |
*/ |
W |
81 |
- (void)parseProperties:(NSDictionary *)properties; |
|
82 |
|
9febd9
|
83 |
/** |
W |
84 |
Gets an FBSDKSharePhoto out of the receiver. |
|
85 |
- Parameter key: The key for the value |
|
86 |
- Returns: The FBSDKSharePhoto value or nil |
bad748
|
87 |
*/ |
W |
88 |
- (FBSDKSharePhoto *)photoForKey:(NSString *)key; |
|
89 |
|
9febd9
|
90 |
/** |
W |
91 |
Removes a value from the receiver for the specified key. |
|
92 |
- Parameter key: The key for the value |
bad748
|
93 |
*/ |
W |
94 |
- (void)removeObjectForKey:(NSString *)key; |
|
95 |
|
9febd9
|
96 |
/** |
W |
97 |
Sets an NSArray on the receiver. |
|
98 |
|
|
99 |
This method will throw if the array contains any values that is not an NSNumber, NSString, NSURL, |
bad748
|
100 |
FBSDKSharePhoto or FBSDKShareOpenGraphObject. |
9febd9
|
101 |
- Parameter array: The NSArray value |
W |
102 |
- Parameter key: The key for the value |
bad748
|
103 |
*/ |
W |
104 |
- (void)setArray:(NSArray *)array forKey:(NSString *)key; |
|
105 |
|
9febd9
|
106 |
/** |
W |
107 |
Sets an NSNumber on the receiver. |
|
108 |
- Parameter number: The NSNumber value |
|
109 |
- Parameter key: The key for the value |
bad748
|
110 |
*/ |
W |
111 |
- (void)setNumber:(NSNumber *)number forKey:(NSString *)key; |
|
112 |
|
9febd9
|
113 |
/** |
W |
114 |
Sets an FBSDKShareOpenGraphObject on the receiver. |
|
115 |
- Parameter object: The FBSDKShareOpenGraphObject value |
|
116 |
- Parameter key: The key for the value |
bad748
|
117 |
*/ |
W |
118 |
- (void)setObject:(FBSDKShareOpenGraphObject *)object forKey:(NSString *)key; |
|
119 |
|
9febd9
|
120 |
/** |
W |
121 |
Sets an FBSDKSharePhoto on the receiver. |
|
122 |
- Parameter photo: The FBSDKSharePhoto value |
|
123 |
- Parameter key: The key for the value |
bad748
|
124 |
*/ |
W |
125 |
- (void)setPhoto:(FBSDKSharePhoto *)photo forKey:(NSString *)key; |
|
126 |
|
9febd9
|
127 |
/** |
W |
128 |
Sets an NSString on the receiver. |
|
129 |
- Parameter string: The NSString value |
|
130 |
- Parameter key: The key for the value |
bad748
|
131 |
*/ |
W |
132 |
- (void)setString:(NSString *)string forKey:(NSString *)key; |
|
133 |
|
9febd9
|
134 |
/** |
W |
135 |
Sets an NSURL on the receiver. |
|
136 |
- Parameter URL: The NSURL value |
|
137 |
- Parameter key: The key for the value |
bad748
|
138 |
*/ |
W |
139 |
- (void)setURL:(NSURL *)URL forKey:(NSString *)key; |
|
140 |
|
9febd9
|
141 |
/** |
W |
142 |
Gets an NSString out of the receiver. |
|
143 |
- Parameter key: The key for the value |
|
144 |
- Returns: The NSString value or nil |
bad748
|
145 |
*/ |
W |
146 |
- (NSString *)stringForKey:(NSString *)key; |
|
147 |
|
9febd9
|
148 |
/** |
W |
149 |
Gets an NSURL out of the receiver. |
|
150 |
- Parameter key: The key for the value |
|
151 |
- Returns: The NSURL value or nil |
bad748
|
152 |
*/ |
W |
153 |
- (NSURL *)URLForKey:(NSString *)key; |
|
154 |
|
|
155 |
@end |
|
156 |
|
9febd9
|
157 |
/** |
W |
158 |
A base class to container Open Graph values. |
bad748
|
159 |
*/ |
W |
160 |
@interface FBSDKShareOpenGraphValueContainer : NSObject <FBSDKShareOpenGraphValueContaining> |
|
161 |
|
|
162 |
@end |