commit | author | age
|
e0ec42
|
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 |
/// A container class for data attachments so that additional metadata can be provided about the attachment. |
|
14 |
NS_SWIFT_NAME(GraphRequestDataAttachment) |
|
15 |
@interface FBSDKGraphRequestDataAttachment : NSObject |
|
16 |
|
|
17 |
- (instancetype)init NS_UNAVAILABLE; |
|
18 |
+ (instancetype)new NS_UNAVAILABLE; |
|
19 |
|
|
20 |
/** |
|
21 |
Initializes the receiver with the attachment data and metadata. |
|
22 |
@param data The attachment data (retained, not copied) |
|
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 |
|
|
31 |
/// The content type for the attachment. |
|
32 |
@property (nonatomic, readonly, copy) NSString *contentType; |
|
33 |
|
|
34 |
/// The attachment data. |
|
35 |
@property (nonatomic, readonly, strong) NSData *data; |
|
36 |
|
|
37 |
/// The filename for the attachment. |
|
38 |
@property (nonatomic, readonly, copy) NSString *filename; |
|
39 |
|
|
40 |
@end |
|
41 |
|
|
42 |
NS_ASSUME_NONNULL_END |