namespace WrtDeviceApis {
namespace CommonsJavaScript {
-
class JSCallbackManager;
typedef DPL::SharedPtr<JSCallbackManager> JSCallbackManagerPtr;
{
private:
JSCallbackManager()
- {
- }
+ {}
/**
- * Used to create JSCallbackManagerPtr object by factory method createObject
+ * Used to create JSCallbackManagerPtr object by factory method
+ * createObject
*/
JSCallbackManager(JSContextRef context,
- JSObjectRef onSuccess,
- JSObjectRef onError);
+ JSObjectRef onSuccess,
+ JSObjectRef onError);
public:
- //JSCallbackManager( JSContextRef context, JSValueRef onSuccess, JSValueRef onError );
+ //JSCallbackManager( JSContextRef context, JSValueRef onSuccess, JSValueRef
+ // onError );
/**
* Create JSCallbackManagerPtr object witch checking callback parameters
- * if callbacks are NULL it was programmer intention to not use callback and no exception will be rised
+ * if callbacks are NULL it was programmer intention to not use callback and
+ * no exception will be rised
* if callbacks are some object but not a function it will rise exception
* @param[in] context - global context
* @param[in] onSuccess - success callback (may be NULL if not needed)
* @param[in] onError - error callback (may be NULL if not needed)
- * @param[in] acceptJSNullAsOnSuccess - converts JSNull on onSuccess to NULL when true
- * @param[in] acceptJSNullAsOnError - converts JSNull on onError to NULL when true
- * @throw Commons::InvalidArgumentException - if callback is not null and is not a js function
+ * @param[in] acceptJSNullAsOnSuccess - converts JSNull on onSuccess to NULL
+ * when true
+ * @param[in] acceptJSNullAsOnError - converts JSNull on onError to NULL
+ * when true
+ * @throw Commons::InvalidArgumentException - if callback is not null and is
+ * not a js function
*/
static JSCallbackManagerPtr createObject(
- JSContextRef context,
- JSValueRef onSuccess = NULL,
- JSValueRef onError = NULL,
- bool acceptJSNullAsOnSuccess = false,
- bool acceptJSNullAsOnError = false);
+ JSContextRef context,
+ JSValueRef onSuccess = NULL,
+ JSValueRef onError = NULL,
+ bool acceptJSNullAsOnSuccess = false,
+ bool acceptJSNullAsOnError = false);
virtual ~JSCallbackManager();