diff options
author | Struan Donald <struan@exo.org.uk> | 2013-07-10 15:17:41 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2013-07-10 15:17:41 +0100 |
commit | 8c81bd47bbe3ed65a55a2c5fd376bfd726bd6777 (patch) | |
tree | 4076c08e5e85159da272ee455de412a1ae92679b /iPhone/CordovaLib/Classes/CDVPluginResult.h | |
parent | 7d57c4bfa201c12885b26b186ebac4b3028d570b (diff) |
upgrade iOS to phonegap 2.9
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; |