JSValueRef appIdValue = JSUtil::getProperty(context, notiInitDict, STATUS_NOTIFICATION_APP_ID);
if (!JSValueIsUndefined(context, appIdValue))
priv->setApplicationId(JSUtil::JSValueToString(context, appIdValue));
-
+
+ //Light
+ JSValueRef lightValue = JSUtil::getProperty(context, notiInitDict, STATUS_NOTIFICATION_LIGHT);
+ LoggerI("Light :" << JSUtil::JSValueToString(context, lightValue));
+ if (!JSValueIsUndefined(context, lightValue))
+ priv->setLight(JSUtil::JSValueToString(context, lightValue));
+
+ //onTime
+ JSValueRef onTimeValue = JSUtil::getProperty(context, notiInitDict, STATUS_NOTIFICATION_LIGHT_ONTIME);
+ if (!JSValueIsUndefined(context, onTimeValue))
+ priv->setLightOnTime(JSUtil::JSValueToLong(context, onTimeValue));
+
+ //offTime
+ JSValueRef offTimeValue = JSUtil::getProperty(context, notiInitDict, STATUS_NOTIFICATION_LIGHT_OFFTIME);
+ if (!JSValueIsUndefined(context, offTimeValue))
+ priv->setLightOffTime(JSUtil::JSValueToLong(context, offTimeValue));
+
//progressType
NotificationProgressType progressType = NOTI_PROGRESS_TYPE_PERCENTAGE;
JSValueRef appId = JSUtil::getProperty(context, object, STATUS_NOTIFICATION_APP_ID);
if (!JSValueIsNull(context, appId))
priv->setApplicationId(JSUtil::JSValueToString(context, appId));
+
+ // light
+ JSValueRef light = JSUtil::getProperty(context, object, STATUS_NOTIFICATION_LIGHT);
+ if (!JSValueIsNull(context, light))
+ priv->setLight(JSUtil::JSValueToString(context, light));
+
+ // onTime
+ JSValueRef onTime = JSUtil::getProperty(context, object, STATUS_NOTIFICATION_LIGHT_ONTIME);
+ if (!JSValueIsNull(context, onTime))
+ priv->setLightOnTime(JSUtil::JSValueToLong(context, onTime));
+
+ // offTime
+ JSValueRef offTime = JSUtil::getProperty(context, object, STATUS_NOTIFICATION_LIGHT_OFFTIME);
+ if (!JSValueIsNull(context, offTime))
+ priv->setLightOffTime(JSUtil::JSValueToLong(context, offTime));
#if 0
// progressType
else
JSUtil::setProperty(context, object, STATUS_NOTIFICATION_APP_ID, JSValueMakeNull(context), kJSPropertyAttributeNone);
+ //Light
+ JSUtil::setProperty(context, object, STATUS_NOTIFICATION_LIGHT,
+ JSUtil::toJSValueRef(context, priv->getLight()), kJSPropertyAttributeNone);
+
+ JSUtil::setProperty(context, object, STATUS_NOTIFICATION_LIGHT_ONTIME,
+ JSUtil::toJSValueRef(context, priv->getLightOnTime()), kJSPropertyAttributeNone);
+
+ JSUtil::setProperty(context, object, STATUS_NOTIFICATION_LIGHT_OFFTIME,
+ JSUtil::toJSValueRef(context, priv->getLightOffTime()), kJSPropertyAttributeNone);
+
#if 0
// progressType & Value
LoggerI("Progress Type=" << priv->getProgressType());