diff options
Diffstat (limited to 'iPhone/CordovaLib/Classes/CDVPluginResult.h')
-rwxr-xr-x | iPhone/CordovaLib/Classes/CDVPluginResult.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/iPhone/CordovaLib/Classes/CDVPluginResult.h b/iPhone/CordovaLib/Classes/CDVPluginResult.h index 8683205..11b5377 100755 --- a/iPhone/CordovaLib/Classes/CDVPluginResult.h +++ b/iPhone/CordovaLib/Classes/CDVPluginResult.h @@ -37,6 +37,9 @@ typedef enum { @property (nonatomic, strong, readonly) NSNumber* status; @property (nonatomic, strong, readonly) id message; @property (nonatomic, strong) NSNumber* keepCallback; +// This property can be used to scope the lifetime of another object. For example, +// Use it to store the associated NSData when `message` is created using initWithBytesNoCopy. +@property (nonatomic, strong) id associatedObject; - (CDVPluginResult*)init; + (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal; @@ -47,6 +50,7 @@ typedef enum { + (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsBool:(BOOL)theMessage; + (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsDictionary:(NSDictionary*)theMessage; + (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsArrayBuffer:(NSData*)theMessage; ++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsMultipart:(NSArray*)theMessages; + (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageToErrorObject:(int)errorCode; + (void)setVerbose:(BOOL)verbose; @@ -54,6 +58,9 @@ typedef enum { - (void)setKeepCallbackAsBool:(BOOL)bKeepCallback; +- (NSString*)argumentsAsJSON; + +// These methods are used by the legacy plugin return result method - (NSString*)toJSONString; - (NSString*)toSuccessCallbackString:(NSString*)callbackId; - (NSString*)toErrorCallbackString:(NSString*)callbackId; |