Update change log and spec for wrt-plugins-tizen_0.4.20
[platform/framework/web/wrt-plugins-tizen.git] / src / Notification / JSStatusNotification.h
index 78cd909..a2c2a49 100755 (executable)
 // limitations under the License.
 //
 
-
-#ifndef TIZENAPIS_TIZEN_JS_STATUS_NOTIFICATION_H_
-#define TIZENAPIS_TIZEN_JS_STATUS_NOTIFICATION_H_
+#ifndef __TIZEN_JS_STATUS_NOTIFICATION_H__
+#define __TIZEN_JS_STATUS_NOTIFICATION_H__
 
 #include <JavaScriptCore/JavaScript.h>
-#include <CommonsJavaScript/PrivateObject.h>
-#include "INotification.h"
+#include "StatusNotification.h"
 
 namespace DeviceAPI {
 namespace Notification {
 
-
-typedef WrtDeviceApis::CommonsJavaScript::PrivateObjectT<INotificationPtr>::Type JSStatusNotificationPriv;
-
-#define NOTIFICATION_ID "id"
-#define NOTIFICATION_TYPE "type"
-#define NOTIFICATION_POSTED_TIME "postedTime"
-#define NOTIFICATION_TITLE "title"
-#define NOTIFICATION_CONTENT "content"
-
-#define NOTIFICATION_STATUS_TYPE "statusType"
-#define NOTIFICATION_ICON_PATH "iconPath"
-#define NOTIFICATION_SOUND_PATH "soundPath"
-#define NOTIFICATION_VIBRATION "vibration"
-#ifdef APPLICATION_API_BACKWARD_COMPATIBILITY
-#define NOTIFICATION_SEVICE "service"
-#endif
-#define NOTIFICATION_APP_CONTROL "appControl"
-#define NOTIFICATION_APP_ID "appId"
-#define NOTIFICATION_PROGRESS_TYPE "progressType"
-#define NOTIFICATION_PROGRESS_VALUE "progressValue"
-#define NOTIFICATION_LINES "detailInfo"
-#define NOTIFICATION_BACKGROUND_IMAGE_PATH "backgroundImagePath"
-#define NOTIFICATION_NUMBER "number"
-#define NOTIFICATION_THUMBNAILS "thumbnails"
-#define NOTIFICATION_SUB_ICON_PATH "subIconPath"
-
-
-class JSStatusNotification {
+class JSStatusNotification
+{
 public:
-       static const JSClassDefinition* getClassInfo();
-       static const JSClassRef getClassRef();
-       static INotificationPtr getNotification(JSContextRef context, JSValueRef value);
-       static JSValueRef getProperty(JSContextRef context, JSObjectRef object,
-               JSStringRef propertyName, JSValueRef* exception);       
-       static bool setProperty(JSContextRef context, JSObjectRef object,
-        JSStringRef propertyName, JSValueRef value, JSValueRef* exception);    
-       static JSObjectRef createJSObject(JSContextRef context, INotificationPtr notification);
-       
+    static const JSClassDefinition* getClassInfo();
+    static const JSClassRef getClassRef();
+
+    static JSObjectRef constructor(JSContextRef context,
+            JSObjectRef constructor,
+            size_t argumentCount,
+            const JSValueRef arguments[],
+            JSValueRef* exception);
+
+    static StatusNotification* getPrivateObject(JSContextRef context, JSObjectRef object);
+    static void setPrivateObject(JSContextRef context, JSObjectRef object, StatusNotification *priv);
+    static bool setProperty(JSContextRef context, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception);
+    static JSValueRef getProperty(JSContextRef context, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception);          
 private:
-       static void initialize(JSContextRef context, JSObjectRef object);
-       static void finalize(JSObjectRef object);
-       static bool hasInstance(JSContextRef context, JSObjectRef constructor,
-       JSValueRef possibleInstance, JSValueRef* exception);
-
-       static JSObjectRef constructor(JSContextRef context,
-               JSObjectRef constructor,
-               size_t argumentCount,
-               const JSValueRef arguments[],
-               JSValueRef* exception);
-
-       static JSClassDefinition m_classInfo;
-       static JSStaticValue m_properties[];
-       
-       static JSClassRef m_jsClassRef;
+
+    /**
+     * The callback invoked when an object is first created.
+     */
+    static void initialize(JSContextRef context,
+            JSObjectRef object);
+
+    /**
+     * The callback invoked when an object is finalized.
+     */
+    static void finalize(JSObjectRef object);
+
+    /**
+     * This member variable contains the values which has to be passed
+     * when the this class is embedded into JS Engine.
+     */
+    static JSClassDefinition m_classInfo;
+
+
+    /**
+     * This member variable contains the initialization values for the
+     * properties of this class. The values are given according to
+     * the data structure JSPropertySpec
+     */
+    static JSStaticValue m_property[];
+
+    static JSClassRef m_jsClassRef;
 };
 
-}
-}
 
-#endif
 
+} // Notification
+} // DeviceAPI
+
+#endif // __TIZEN_JS_DOWNLOAD_MANAGER_H__