merge wrt-plugins-tizen_0.2.0-2
[profile/ivi/wrt-plugins-tizen.git] / src / standards / Tizen / Filesystem / Converter.cpp
index c42370b..e46e381 100755 (executable)
@@ -72,6 +72,7 @@ JSValueRef Converter::toJSValueRef(
 
        switch (arg->getState()) {
        case Api::Filesystem::StorageProperties::STATE_MOUNTED :
+       case Api::Filesystem::StorageProperties::STATE_MOUNTED_READONLY :
                tmpStorage.setState(JSStorage::STATE_MOUNTED);
                break;
        case Api::Filesystem::StorageProperties::STATE_REMOVED:
@@ -107,6 +108,7 @@ JSValueRef Converter::toJSValueRef(
 
                switch (arg[i]->getState()) {
                case Api::Filesystem::StorageProperties::STATE_MOUNTED :
+               case Api::Filesystem::StorageProperties::STATE_MOUNTED_READONLY :
                        tmpStorage.setState(JSStorage::STATE_MOUNTED);
                        break;
                case Api::Filesystem::StorageProperties::STATE_REMOVED:
@@ -245,21 +247,21 @@ std::string Converter::toEncoding(const JSValueRef& arg)
        }
        ThrowMsg(Commons::InvalidArgumentException, "Invalid encoding");
 }
-JSValueRef Converter::toStorageType(const short type)
+JSValueRef Converter::toStorageState(const short type)
 {
        switch (type) 
        {
-               case Api::Filesystem::StorageProperties::STATE_MOUNTED:
+               case JSStorage::STATE_MOUNTED:
                        return toJSValueRef(STORAGE_TYPE_STATE_MOUNTED);
-               case Api::Filesystem::StorageProperties::STATE_REMOVED:
+               case JSStorage::STATE_REMOVED:
                        return toJSValueRef(STORAGE_TYPE_STATE_REMOVED);
-               case Api::Filesystem::StorageProperties::STATE_UNMOUNTABLE:
+               case JSStorage::STATE_UNMOUNTABLE:
                        return toJSValueRef(STORAGE_TYPE_STATE_UNMOUNTABLE);
        }
        ThrowMsg(Commons::InvalidArgumentException, "Invalid storage type");
 }
 
-JSValueRef Converter::toStorageState(const short state)
+JSValueRef Converter::toStorageType(const short state)
 {
        switch (state) 
        {