Update change log and spec for wrt-plugins-tizen_0.4.44
[framework/web/wrt-plugins-tizen.git] / src / Systeminfo / JSDeviceOrientationInfo.cpp
old mode 100644 (file)
new mode 100755 (executable)
index ffaee4f..b6c843a
@@ -26,6 +26,7 @@ using namespace WrtDeviceApis::Commons;
 
 namespace {
 const char* DEVICEORIENTATION_STATUS_PROPERTY = "status";
+const char* DEVICEORIENTATION_IS_AUTOROTATION_PROPERTY = "isAutoRotation";
 }
 
 JSClassRef JSDeviceOrientationInfo::m_classRef = NULL;
@@ -52,6 +53,7 @@ JSClassDefinition JSDeviceOrientationInfo::m_classInfo = {
 
 JSStaticValue JSDeviceOrientationInfo::m_properties[] = {
     { DEVICEORIENTATION_STATUS_PROPERTY, getProperty, NULL, kJSPropertyAttributeReadOnly },
+    { DEVICEORIENTATION_IS_AUTOROTATION_PROPERTY, getProperty, NULL, kJSPropertyAttributeReadOnly },
     { 0, 0, 0, 0 }
 };
 
@@ -108,6 +110,8 @@ JSValueRef JSDeviceOrientationInfo::getProperty(JSContextRef context, JSObjectRe
 
         if (JSStringIsEqualToUTF8CString(propertyName, DEVICEORIENTATION_STATUS_PROPERTY)) {
             return convert.toJSValueRef(deviceOrientationInfo->status);
+        } else if (JSStringIsEqualToUTF8CString(propertyName, DEVICEORIENTATION_IS_AUTOROTATION_PROPERTY)) {
+            return convert.toJSValueRef(deviceOrientationInfo->isAutoRotation);
         }
     }
     Catch(Exception)