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 |
|
|
13 |
/** |
|
14 |
A container class for data attachments so that additional metadata can be provided about the attachment. |
|
15 |
*/ |
|
16 |
NS_SWIFT_NAME(GraphRequestDataAttachment) |
|
17 |
@interface FBSDKGraphRequestDataAttachment : NSObject |
|
18 |
|
|
19 |
- (instancetype)init NS_UNAVAILABLE; |
|
20 |
+ (instancetype)new NS_UNAVAILABLE; |
|
21 |
|
|
22 |
/** |
|
23 |
Initializes the receiver with the attachment data and metadata. |
|
24 |
@param data The attachment data (retained, not copied) |
|
25 |
@param filename The filename for the attachment |
|
26 |
@param contentType The content type for the attachment |
|
27 |
*/ |
|
28 |
- (instancetype)initWithData:(NSData *)data |
|
29 |
filename:(NSString *)filename |
|
30 |
contentType:(NSString *)contentType |
|
31 |
NS_DESIGNATED_INITIALIZER; |
|
32 |
|
|
33 |
/** |
|
34 |
The content type for the attachment. |
|
35 |
*/ |
|
36 |
@property (nonatomic, readonly, copy) NSString *contentType; |
|
37 |
|
|
38 |
/** |
|
39 |
The attachment data. |
|
40 |
*/ |
|
41 |
@property (nonatomic, readonly, strong) NSData *data; |
|
42 |
|
|
43 |
/** |
|
44 |
The filename for the attachment. |
|
45 |
*/ |
|
46 |
@property (nonatomic, readonly, copy) NSString *filename; |
|
47 |
|
|
48 |
@end |
|
49 |
|
|
50 |
NS_ASSUME_NONNULL_END |