commit | author | age
|
2e29a3
|
1 |
/* |
L |
2 |
* Copyright (c) Meta Platforms, Inc. and affiliates. |
|
3 |
* All rights reserved. |
|
4 |
* |
|
5 |
* This source code is licensed under the license found in the |
|
6 |
* LICENSE file in the root directory of this source tree. |
|
7 |
*/ |
|
8 |
|
|
9 |
#import <Foundation/Foundation.h> |
|
10 |
|
|
11 |
NS_ASSUME_NONNULL_BEGIN |
|
12 |
|
e0ec42
|
13 |
/// A container class for data attachments so that additional metadata can be provided about the attachment. |
2e29a3
|
14 |
NS_SWIFT_NAME(GraphRequestDataAttachment) |
L |
15 |
@interface FBSDKGraphRequestDataAttachment : NSObject |
|
16 |
|
|
17 |
- (instancetype)init NS_UNAVAILABLE; |
|
18 |
+ (instancetype)new NS_UNAVAILABLE; |
|
19 |
|
|
20 |
/** |
e0ec42
|
21 |
Initializes the receiver with the attachment data and metadata. |
2e29a3
|
22 |
@param data The attachment data (retained, not copied) |
L |
23 |
@param filename The filename for the attachment |
|
24 |
@param contentType The content type for the attachment |
|
25 |
*/ |
|
26 |
- (instancetype)initWithData:(NSData *)data |
|
27 |
filename:(NSString *)filename |
|
28 |
contentType:(NSString *)contentType |
|
29 |
NS_DESIGNATED_INITIALIZER; |
|
30 |
|
e0ec42
|
31 |
/// The content type for the attachment. |
2e29a3
|
32 |
@property (nonatomic, readonly, copy) NSString *contentType; |
L |
33 |
|
e0ec42
|
34 |
/// The attachment data. |
2e29a3
|
35 |
@property (nonatomic, readonly, strong) NSData *data; |
L |
36 |
|
e0ec42
|
37 |
/// The filename for the attachment. |
2e29a3
|
38 |
@property (nonatomic, readonly, copy) NSString *filename; |
L |
39 |
|
|
40 |
@end |
|
41 |
|
|
42 |
NS_ASSUME_NONNULL_END |