5 #ifndef FLUTTER_SHELL_PLATFORM_DARWIN_COMMON_FRAMEWORK_HEADERS_FLUTTERCODECS_H_
6 #define FLUTTER_SHELL_PLATFORM_DARWIN_COMMON_FRAMEWORK_HEADERS_FLUTTERCODECS_H_
8 #import <Foundation/Foundation.h>
30 - (NSData* _Nullable)encode:(
id _Nullable)message;
38 - (
id _Nullable)decode:(NSData* _Nullable)message;
96 - (instancetype)initWithData:(NSMutableData*)data;
98 - (void)writeByte:(UInt8)value;
100 - (void)writeBytes:(const
void*)bytes length:(NSUInteger)length;
102 - (void)writeData:(NSData*)data;
104 - (void)writeSize:(UInt32)size;
106 - (void)writeAlignment:(UInt8)alignment;
108 - (void)writeUTF8:(NSString*)value;
121 - (void)writeValue:(
id)value;
136 - (instancetype)initWithData:(NSData*)data;
142 - (void)readBytes:(
void*)destination length:(NSUInteger)length;
144 - (NSData*)readData:(NSUInteger)length;
148 - (void)readAlignment:(UInt8)alignment;
164 - (nullable id)readValueOfType:(UInt8)type;
228 + (instancetype)methodCallWithMethodName:(NSString*)method arguments:(
id _Nullable)arguments;
233 @property(readonly, nonatomic) NSString*
method;
254 + (instancetype)errorWithCode:(NSString*)code
255 message:(NSString* _Nullable)message
256 details:(
id _Nullable)details;
260 @property(readonly, nonatomic) NSString*
code;
265 @property(readonly, nonatomic, nullable) NSString*
message;
270 @property(readonly, nonatomic, nullable)
id details;
281 typedef NS_ENUM(NSInteger, FlutterStandardDataType) {
283 FlutterStandardDataTypeUInt8,
284 FlutterStandardDataTypeInt32,
285 FlutterStandardDataTypeInt64,
286 FlutterStandardDataTypeFloat32,
287 FlutterStandardDataTypeFloat64,
307 + (instancetype)typedDataWithBytes:(NSData*)data;
315 + (instancetype)typedDataWithInt32:(NSData*)data;
323 + (instancetype)typedDataWithInt64:(NSData*)data;
331 + (instancetype)typedDataWithFloat32:(NSData*)data;
339 + (instancetype)typedDataWithFloat64:(NSData*)data;
344 @property(readonly, nonatomic) NSData*
data;
349 @property(readonly, nonatomic, assign) FlutterStandardDataType
type;
368 "FlutterStandardBigInteger was needed because the Dart 1.0 int type had no "
369 "size limit. With Dart 2.0, the int type is a fixed-size, 64-bit signed "
370 "integer. If you need to communicate larger integers, use NSString encoding "
372 @interface FlutterStandardBigInteger : NSObject
391 @protocol FlutterMethodCodec
422 - (NSData*)encodeSuccessEnvelope:(
id _Nullable)result;
440 - (
id _Nullable)decodeEnvelope:(NSData*)envelope;
478 #endif // FLUTTER_SHELL_PLATFORM_DARWIN_COMMON_FRAMEWORK_HEADERS_FLUTTERCODECS_H_