Update change log and spec for wrt-plugins-tizen_0.4.30 submit/tizen_2.1/20130514.055435
authorDongjin Choi <milkelf.choi@samsung.com>
Fri, 10 May 2013 07:56:13 +0000 (16:56 +0900)
committerDongjin Choi <milkelf.choi@samsung.com>
Fri, 10 May 2013 08:03:30 +0000 (17:03 +0900)
[Issue#] N/A
[Problem] PermissionDeniedError used instead of SecurityError
[Cause] Misused MACRO
[Solution] Fixed Macros

17 files changed:
packaging/wrt-plugins-tizen.spec
src/Callhistory/ResponseDispatcher.cpp
src/Common/SecurityExceptions.h
src/DataControl/DataControlListener.cpp
src/Filesystem/JSFile.cpp
src/Filesystem/JSFilesystemManager.cpp
src/Filesystem/ResponseDispatcher.cpp
src/SecureElement/SEUtil.cpp
src/SecureStorage/CMakeLists.txt [deleted file]
src/SecureStorage/JSSecureStorageManager.cpp [deleted file]
src/SecureStorage/JSSecureStorageManager.h [deleted file]
src/SecureStorage/SecureStorageManager.cpp [deleted file]
src/SecureStorage/SecureStorageManager.h [deleted file]
src/SecureStorage/config.xml [deleted file]
src/SecureStorage/plugin_config.cpp [deleted file]
src/SecureStorage/plugin_config.h [deleted file]
src/SecureStorage/plugin_initializer.cpp [deleted file]

index 16dd410..0f1aec8 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       wrt-plugins-tizen
 Summary:    JavaScript plugins for WebRuntime
-Version:    0.4.29
+Version:    0.4.30
 Release:    0
 Group:      Development/Libraries
 License:    Apache License, Version 2.0
index ae0fdcf..8002c0f 100755 (executable)
@@ -68,7 +68,7 @@ void ResponseDispatcher::OnAnswerReceived(const EventFindCallHistoryPtr& event)
        } else {
                JSObjectRef jsException = NULL;
                if (event->getExceptionCode() == WrtDeviceApis::Commons::ExceptionCodes::SecurityException) {
-                       jsException = JSWebAPIErrorFactory::makeErrorObject(data->getContext(), JSWebAPIErrorFactory::PERMISSION_DENIED_ERROR, "Permission denied error");
+                       jsException = JSWebAPIErrorFactory::makeErrorObject(data->getContext(), JSWebAPIErrorFactory::SECURITY_ERROR, "Permission denied error");
                } else {
                        jsException = JSWebAPIErrorFactory::makeErrorObject(data->getContext(), JSWebAPIErrorFactory::UNKNOWN_ERROR, "Unknown error");
                }
@@ -89,7 +89,7 @@ void ResponseDispatcher::OnAnswerReceived(const EventRemoveBatchPtr& event)
        } else {
                JSObjectRef jsException = NULL;
                if (event->getExceptionCode() == WrtDeviceApis::Commons::ExceptionCodes::SecurityException) {
-                       jsException = JSWebAPIErrorFactory::makeErrorObject(data->getContext(), JSWebAPIErrorFactory::PERMISSION_DENIED_ERROR, "Permission denied error");
+                       jsException = JSWebAPIErrorFactory::makeErrorObject(data->getContext(), JSWebAPIErrorFactory::SECURITY_ERROR, "Permission denied error");
                } else {
                        jsException = JSWebAPIErrorFactory::makeErrorObject(data->getContext(), JSWebAPIErrorFactory::UNKNOWN_ERROR, "Unknown error");
                }
@@ -110,7 +110,7 @@ void ResponseDispatcher::OnAnswerReceived(const EventRemoveAllPtr& event)
        } else {
                JSObjectRef jsException = NULL;
                if (event->getExceptionCode() == WrtDeviceApis::Commons::ExceptionCodes::SecurityException) {
-                       jsException = JSWebAPIErrorFactory::makeErrorObject(data->getContext(), JSWebAPIErrorFactory::PERMISSION_DENIED_ERROR, "Permission denied error");
+                       jsException = JSWebAPIErrorFactory::makeErrorObject(data->getContext(), JSWebAPIErrorFactory::SECURITY_ERROR, "Permission denied error");
                } else {
                        jsException = JSWebAPIErrorFactory::makeErrorObject(data->getContext(), JSWebAPIErrorFactory::UNKNOWN_ERROR, "Unknown error");
                }
index 0c5c3d0..f76b623 100644 (file)
@@ -37,7 +37,7 @@ namespace Common {
                                break; \
                        case AceSecurityStatus::AccessDenied:                                  \
                                return JSWebAPIErrorFactory::postException(context, exception, \
-                                       JSWebAPIErrorFactory::PERMISSION_DENIED_ERROR); \
+                                       JSWebAPIErrorFactory::SECURITY_ERROR); \
                                break; \
                        default: \
                                break; \
@@ -57,7 +57,7 @@ namespace Common {
                        return JSValueMakeNull(context); \
                case AceSecurityStatus::AccessDenied: \
                        cbm->callOnError(JSWebAPIErrorFactory::makeErrorObject(context, \
-                                               JSWebAPIErrorFactory::PERMISSION_DENIED_ERROR, "PERMISSION_DENIED_ERROR")); \
+                                               JSWebAPIErrorFactory::SECURITY_ERROR, "Security Error")); \
                        return JSValueMakeNull(context); \
                default: \
                        break; \
index 3254502..d0eb7f6 100644 (file)
@@ -81,7 +81,7 @@ void DataControlListener::MakeErrorJSCallBack(JSCallbackManagerPtr cbm, JSContex
                        
                        err[0] = converter.toJSValueRef(reqid);
                        err[1] = JSWebAPIErrorFactory::makeErrorObject(globalContext,
-                                       JSWebAPIErrorFactory::PERMISSION_DENIED_ERROR, errorMsg);
+                                       JSWebAPIErrorFactory::SECURITY_ERROR, errorMsg);
 
                        break;
                case ExceptionCodes::UnsupportedException:
index b083d25..b669a6c 100644 (file)
@@ -539,7 +539,7 @@ JSValueRef JSFile::openStream(JSContextRef context,
                }
 
                if ((AM_READ != mode) && (PERM_READ == privateObject->getObject()->getNode()->getPermissions())) {
-                       return JSWebAPIErrorFactory::postException(context, exception, JSWebAPIErrorFactory::PERMISSION_DENIED_ERROR, "Permission denied error");
+                       return JSWebAPIErrorFactory::postException(context, exception, JSWebAPIErrorFactory::SECURITY_ERROR, "Permission denied error");
                }
 
                std::string path = privateObject->getObject()->getNode()->getPath()->getFullPath();
@@ -816,7 +816,7 @@ JSValueRef JSFile::moveTo(JSContextRef context,
                }
 
                if ((privateObject->getObject()->getNode()->getPermissions() & PERM_WRITE) == 0) {
-                       return JSWebAPIErrorFactory::postException(context, exception, JSWebAPIErrorFactory::PERMISSION_DENIED_ERROR, "Permission denied error");
+                       return JSWebAPIErrorFactory::postException(context, exception, JSWebAPIErrorFactory::SECURITY_ERROR, "Permission denied error");
                }
 
                Converter converter(context);
@@ -1083,7 +1083,7 @@ JSValueRef JSFile::deleteDirectory(JSContextRef context,
                cbm->setObject(thisObject);
 
                if ((privateObject->getObject()->getNode()->getPermissions() & PERM_WRITE) == 0) {
-                       return JSWebAPIErrorFactory::postException(context, exception, JSWebAPIErrorFactory::PERMISSION_DENIED_ERROR, "Permission denied error");
+                       return JSWebAPIErrorFactory::postException(context, exception, JSWebAPIErrorFactory::SECURITY_ERROR, "Permission denied error");
                }
 
                if (privateObject->getObject()->getNode()->getType() != NT_DIRECTORY) {
@@ -1194,7 +1194,7 @@ JSValueRef JSFile::deleteFile(JSContextRef context,
 
 
                if ((privateObject->getObject()->getNode()->getPermissions() & PERM_WRITE) == 0) {
-                       return JSWebAPIErrorFactory::postException(context, exception, JSWebAPIErrorFactory::PERMISSION_DENIED_ERROR, "Permission denied error");
+                       return JSWebAPIErrorFactory::postException(context, exception, JSWebAPIErrorFactory::SECURITY_ERROR, "Permission denied error");
                }
 
                JSValueRef onSuccess = NULL;
index 80ed8d9..47d6182 100644 (file)
@@ -557,7 +557,7 @@ JSValueRef JSFilesystemManager::resolve(JSContextRef context,
                }
 
                if (permissions & PERM_WRITE && virtualPath == "wgt-package") {
-                       return JSWebAPIErrorFactory::postException(context, exception, JSWebAPIErrorFactory::PERMISSION_DENIED_ERROR, "permission denied");
+                       return JSWebAPIErrorFactory::postException(context, exception, JSWebAPIErrorFactory::SECURITY_ERROR, "permission denied");
                }
 
                PermissionsAccessInfo perms(permissions, virtualPath);
index e41fd70..ca51a1a 100644 (file)
@@ -108,7 +108,7 @@ void ResponseDispatcher::OnAnswerReceived(const EventListNodesPtr& event)
        } else {
                JSObjectRef jsException = NULL;
                if (event->getExceptionCode() == WrtDeviceApis::Commons::ExceptionCodes::SecurityException) {
-                       jsException = JSWebAPIErrorFactory::makeErrorObject(data->getContext(), JSWebAPIErrorFactory::PERMISSION_DENIED_ERROR, "Permission denied error");
+                       jsException = JSWebAPIErrorFactory::makeErrorObject(data->getContext(), JSWebAPIErrorFactory::SECURITY_ERROR, "Permission denied error");
                } else {
                        jsException = JSWebAPIErrorFactory::makeErrorObject(data->getContext(), JSWebAPIErrorFactory::IO_ERROR, "IO error");
                }
@@ -160,7 +160,7 @@ void ResponseDispatcher::OnAnswerReceived(const EventCopyPtr& event)
        } else {
                JSObjectRef jsException = NULL;
                if (event->getExceptionCode() == WrtDeviceApis::Commons::ExceptionCodes::SecurityException) {
-                       jsException = JSWebAPIErrorFactory::makeErrorObject(data->getContext(), JSWebAPIErrorFactory::PERMISSION_DENIED_ERROR, "Permission denied error");
+                       jsException = JSWebAPIErrorFactory::makeErrorObject(data->getContext(), JSWebAPIErrorFactory::SECURITY_ERROR, "Permission denied error");
                } 
                else if (event->getExceptionCode() == WrtDeviceApis::Commons::ExceptionCodes::NotFoundException) {
                        jsException = JSWebAPIErrorFactory::makeErrorObject(data->getContext(), JSWebAPIErrorFactory::NOT_FOUND_ERROR, "NotFoundError");
@@ -192,7 +192,7 @@ void ResponseDispatcher::OnAnswerReceived(const EventMovePtr& event)
        } else {
                JSObjectRef jsException = NULL;
                if (event->getExceptionCode() == WrtDeviceApis::Commons::ExceptionCodes::SecurityException) {
-                       jsException = JSWebAPIErrorFactory::makeErrorObject(data->getContext(), JSWebAPIErrorFactory::PERMISSION_DENIED_ERROR, "Permission denied error");
+                       jsException = JSWebAPIErrorFactory::makeErrorObject(data->getContext(), JSWebAPIErrorFactory::SECURITY_ERROR, "Permission denied error");
                } 
                else if (event->getExceptionCode() == WrtDeviceApis::Commons::ExceptionCodes::NotFoundException) {
                        jsException = JSWebAPIErrorFactory::makeErrorObject(data->getContext(), JSWebAPIErrorFactory::NOT_FOUND_ERROR, "NotFoundError");
@@ -218,7 +218,7 @@ void ResponseDispatcher::OnAnswerReceived(const EventRemovePtr& event)
        } else {
                JSObjectRef jsException = NULL;
                if (event->getExceptionCode() ==WrtDeviceApis::Commons::ExceptionCodes::SecurityException) {
-                       jsException = JSWebAPIErrorFactory::makeErrorObject(data->getContext(), JSWebAPIErrorFactory::PERMISSION_DENIED_ERROR, "Permission denied error");
+                       jsException = JSWebAPIErrorFactory::makeErrorObject(data->getContext(), JSWebAPIErrorFactory::SECURITY_ERROR, "Permission denied error");
                } 
                else if (event->getExceptionCode() == WrtDeviceApis::Commons::ExceptionCodes::NotFoundException) {
                        jsException = JSWebAPIErrorFactory::makeErrorObject(data->getContext(), JSWebAPIErrorFactory::NOT_FOUND_ERROR, "NotFoundError");
@@ -266,7 +266,7 @@ void ResponseDispatcher::OnAnswerReceived(const EventReadTextPtr& event)
        }  else {
                JSObjectRef jsException = NULL;
                if (event->getExceptionCode() == WrtDeviceApis::Commons::ExceptionCodes::SecurityException) {
-                       jsException = JSWebAPIErrorFactory::makeErrorObject(data->getContext(), JSWebAPIErrorFactory::PERMISSION_DENIED_ERROR, "Permission denied error");
+                       jsException = JSWebAPIErrorFactory::makeErrorObject(data->getContext(), JSWebAPIErrorFactory::SECURITY_ERROR, "Permission denied error");
                } 
                else if (event->getExceptionCode() == WrtDeviceApis::Commons::ExceptionCodes::NotFoundException) {
                        jsException = JSWebAPIErrorFactory::makeErrorObject(data->getContext(), JSWebAPIErrorFactory::NOT_FOUND_ERROR, "NotFoundError");
@@ -296,7 +296,7 @@ void ResponseDispatcher::OnAnswerReceived(const EventGetStoragePtr& event)
        } else {
                JSObjectRef jsException = NULL;
                if (event->getExceptionCode() == WrtDeviceApis::Commons::ExceptionCodes::SecurityException) {
-                       jsException = JSWebAPIErrorFactory::makeErrorObject(data->getContext(), JSWebAPIErrorFactory::PERMISSION_DENIED_ERROR, "Permission denied error");
+                       jsException = JSWebAPIErrorFactory::makeErrorObject(data->getContext(), JSWebAPIErrorFactory::SECURITY_ERROR, "Permission denied error");
                } 
                else if (event->getExceptionCode() == WrtDeviceApis::Commons::ExceptionCodes::NotFoundException) {
                        jsException = JSWebAPIErrorFactory::makeErrorObject(data->getContext(), JSWebAPIErrorFactory::NOT_FOUND_ERROR, "Not found error");                      
@@ -326,7 +326,7 @@ void ResponseDispatcher::OnAnswerReceived(const EventListStoragesPtr& event)
        } else {
                JSObjectRef jsException = NULL;
                if (event->getExceptionCode() == WrtDeviceApis::Commons::ExceptionCodes::SecurityException) {
-                       jsException = JSWebAPIErrorFactory::makeErrorObject(data->getContext(), JSWebAPIErrorFactory::PERMISSION_DENIED_ERROR, "Permission denied error");
+                       jsException = JSWebAPIErrorFactory::makeErrorObject(data->getContext(), JSWebAPIErrorFactory::SECURITY_ERROR, "Permission denied error");
                } else {
                        jsException = JSWebAPIErrorFactory::makeErrorObject(data->getContext(), JSWebAPIErrorFactory::IO_ERROR, "IO error");
                }
index 0f50002..5d32bce 100644 (file)
@@ -68,7 +68,7 @@ std::string SEUtil::getErrorString(const int errorCode) {
                case SCARD_ERROR_ILLEGAL_PARAM:
                        return DeviceAPI::Common::JSWebAPIErrorFactory::INVALID_VALUES_ERROR;
                case SCARD_ERROR_SECURITY_NOT_ALLOWED:
-                       return DeviceAPI::Common::JSWebAPIErrorFactory::PERMISSION_DENIED_ERROR;
+                       return DeviceAPI::Common::JSWebAPIErrorFactory::SECURITY_ERROR;
                case SCARD_ERROR_IO_FAILED:
                        return DeviceAPI::Common::JSWebAPIErrorFactory::NOT_FOUND_ERROR;
        }
diff --git a/src/SecureStorage/CMakeLists.txt b/src/SecureStorage/CMakeLists.txt
deleted file mode 100644 (file)
index a329913..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-SET(TARGET_NAME ${securestorage_target})
-SET(DESTINATION_NAME ${securestorage_dest})
-
-PKG_CHECK_MODULES(platform_pkgs_securestorage REQUIRED secure-storage)
-
-INCLUDE_DIRECTORIES(
-       ${platform_pkgs_securestorage_INCLUDE_DIRS}
-)
-
-SET(SRCS
-       plugin_initializer.cpp
-       plugin_config.cpp
-       SecureStorageManager.cpp
-       JSSecureStorageManager.cpp
-)
-
-ADD_LIBRARY(${TARGET_NAME} SHARED ${SRCS})
-
-TARGET_LINK_LIBRARIES(${TARGET_NAME}
-       ${LIBS_COMMON}
-       ${platform_pkgs_securestorage_LIBRARIES}
-)
-
-INSTALL(TARGETS ${TARGET_NAME} LIBRARY DESTINATION ${DESTINATION_NAME})
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/config.xml DESTINATION  ${DESTINATION_NAME})
diff --git a/src/SecureStorage/JSSecureStorageManager.cpp b/src/SecureStorage/JSSecureStorageManager.cpp
deleted file mode 100644 (file)
index b2a5561..0000000
+++ /dev/null
@@ -1,406 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License. 
- */
-
-#include <CommonsJavaScript/Converter.h>
-#include <CommonsJavaScript/Validator.h>
-#include <CommonsJavaScript/JSUtils.h>
-#include <CommonsJavaScript/JSCallbackManager.h>
-#include <CommonsJavaScript/Utils.h>
-#include <SecurityExceptions.h>
-#include <JSWebAPIErrorFactory.h>
-#include "JSSecureStorageManager.h"
-#include "plugin_config.h"
-
-using namespace std;
-using namespace DPL;
-using namespace WrtDeviceApis;
-using namespace WrtDeviceApis::CommonsJavaScript;
-using namespace DeviceAPI::Common;
-
-namespace TizenApis {
-namespace Tizen1_0 {
-
-JSClassDefinition JSSecureStorageManager::m_classInfo =
-{
-       0,
-       kJSClassAttributeNone,
-       "SecureStorageManager",
-       NULL,
-       NULL,
-       m_function,
-       initialize,
-       finalize,
-       NULL, 
-       NULL, 
-       NULL, 
-       NULL, 
-       NULL, 
-       NULL,
-       NULL,
-       hasInstance,
-       NULL
-};
-
-       
-JSStaticFunction JSSecureStorageManager::m_function[] =
-{
-       { "remove", JSSecureStorageManager::remove, kJSPropertyAttributeNone },
-       { "set", JSSecureStorageManager::set, kJSPropertyAttributeNone },
-       { "get", JSSecureStorageManager::get, kJSPropertyAttributeNone },       
-       { "listKeys", JSSecureStorageManager::listKeys, kJSPropertyAttributeNone },     
-       { "removeAll", JSSecureStorageManager::removeAll, kJSPropertyAttributeNone },           
-       { 0, 0, 0 }
-};
-
-
-const JSClassRef JSSecureStorageManager::getClassRef() 
-{
-       if (!m_jsClassRef) {
-               m_jsClassRef = JSClassCreate(&m_classInfo);
-       }
-       return m_jsClassRef;
-}
-
-const JSClassDefinition* JSSecureStorageManager::getClassInfo() 
-{
-       return &m_classInfo;
-}
-
-JSClassRef JSSecureStorageManager::m_jsClassRef = JSClassCreate(JSSecureStorageManager::getClassInfo());
-
-void JSSecureStorageManager::initialize(JSContextRef context, JSObjectRef object) 
-{
-       LoggerD("JSSecureStorageManager::initialize ");
-       JSSecureStorageManagerPriv* priv = static_cast<JSSecureStorageManagerPriv*>(JSObjectGetPrivate(object));
-
-       if (priv == NULL)
-       {
-               SecureStorageManagerPtr secureStorage(new SecureStorageManager());
-               priv = new JSSecureStorageManagerPriv( context, secureStorage);
-               if(!JSObjectSetPrivate(object, static_cast<void*>(priv))) 
-               {
-                       LoggerE("Object can't store private data.");
-                       delete priv;
-               }
-       }
-       else
-       {
-               LoggerD("JSSecureStorageManager::already exist ");              
-       }
-}
-
-void JSSecureStorageManager::finalize(JSObjectRef object) 
-{
-       JSSecureStorageManagerPriv* priv = static_cast<JSSecureStorageManagerPriv*>(JSObjectGetPrivate(object));
-
-       LoggerD("JSSecureStorageManager::Finalrize");
-
-       if (priv != NULL) 
-       {
-               JSObjectSetPrivate(object, NULL);
-               delete priv;
-       }
-}
-
-bool JSSecureStorageManager::hasInstance(JSContextRef context, JSObjectRef constructor,
-               JSValueRef possibleInstance, JSValueRef* exception) 
-{
-       return JSValueIsObjectOfClass(context, possibleInstance, getClassRef());
-}
-
-
-JSValueRef JSSecureStorageManager::listKeys(JSContextRef context, JSObjectRef object,
-       JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[],
-       JSValueRef* exception)
-{
-       JSSecureStorageManagerPriv* priv = static_cast<JSSecureStorageManagerPriv*>(JSObjectGetPrivate(thisObject));    
-
-       try 
-       {
-               if (priv == NULL)
-               {
-                       LoggerE("priv null");
-                       Throw(WrtDeviceApis::Commons::ConversionException);
-               }
-
-
-               // to do : need to update TizenPolicy.xml
-               // AceSecurityStatus status = SECURE_STORAGE_CHECK_ACCESS(SECURE_STORAGE_FUNC_READ);
-               // TIZEN_SYNC_ACCESS_HANDLER(status, context, exception);
-               
-               SecureStorageManagerPtr secureStorage(priv->getObject());
-               Converter converter(priv->getContext());
-               std::vector<std::string> keys = secureStorage->listKeys();
-               return converter.toJSValueRef(keys);    
-       }
-       catch (const WrtDeviceApis::Commons::Exception& ex) 
-       {
-               LoggerD("Error message" << ex.GetMessage());
-               switch(ex.getCode())
-               {
-                       case WrtDeviceApis::Commons::ExceptionCodes::NotFoundException:
-                               return JSWebAPIErrorFactory::postException(context, exception, 
-                                       JSWebAPIErrorFactory::NOT_FOUND_ERROR, "not found error"); 
-                       case WrtDeviceApis::Commons::ExceptionCodes::InvalidArgumentException:
-                               return JSWebAPIErrorFactory::postException(context, exception, 
-                                       JSWebAPIErrorFactory::INVALID_VALUES_ERROR, "invalid parameter error"); 
-                       case WrtDeviceApis::Commons::ExceptionCodes::ConversionException:
-                               return JSWebAPIErrorFactory::postException(context, exception, 
-                                       JSWebAPIErrorFactory::TYPE_MISMATCH_ERROR, "type mismatch error");      
-                       case WrtDeviceApis::Commons::ExceptionCodes::SecurityException:
-                               return JSWebAPIErrorFactory::postException(context, exception, 
-                                       JSWebAPIErrorFactory::PERMISSION_DENIED_ERROR, "permission denied error");      
-                       case WrtDeviceApis::Commons::ExceptionCodes::Exception:
-                       default:
-                               return JSWebAPIErrorFactory::postException(context, exception, 
-                                       JSWebAPIErrorFactory::UNKNOWN_ERROR, "Unkown error");
-               }
-       }
-       return JSValueMakeUndefined(context);
-
-}
-
-
-JSValueRef JSSecureStorageManager::set(JSContextRef context, JSObjectRef object,
-       JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[],
-       JSValueRef* exception)
-{
-       JSSecureStorageManagerPriv* priv = static_cast<JSSecureStorageManagerPriv*>(JSObjectGetPrivate(thisObject));    
-       JSValueRef reserveArguments[2];
-       size_t index = 0;
-
-
-       try 
-       {
-               if (priv == NULL)
-               {
-                       LoggerE("priv null");
-
-                       Throw(WrtDeviceApis::Commons::ConversionException);
-               }
-
-               // to do : need to update TizenPolicy.xml
-               // AceSecurityStatus status = SECURE_STORAGE_CHECK_ACCESS(SECURE_STORAGE_FUNC_WRITE);
-               // TIZEN_SYNC_ACCESS_HANDLER(status, context, exception);
-               
-
-               for (index = 0; index < 2; index++)
-               {
-                       if (index < argumentCount)
-                               reserveArguments[index] = arguments[index];
-                       else 
-                               reserveArguments[index] = JSValueMakeUndefined(context);
-               }
-
-               SecureStorageManagerPtr secureStorage(priv->getObject());
-               Converter converter(priv->getContext());
-               std::string key = converter.toString(reserveArguments[0]);
-               std::string value = converter.toString(reserveArguments[1]);
-               secureStorage->set(key, value);
-               
-       }
-       catch (const WrtDeviceApis::Commons::Exception& ex) 
-       {
-               LoggerD("Error message" << ex.GetMessage());
-               switch(ex.getCode())
-               {
-                       case WrtDeviceApis::Commons::ExceptionCodes::NotFoundException:
-                               return JSWebAPIErrorFactory::postException(context, exception, 
-                                       JSWebAPIErrorFactory::NOT_FOUND_ERROR, "not found error"); 
-                       case WrtDeviceApis::Commons::ExceptionCodes::InvalidArgumentException:
-                               return JSWebAPIErrorFactory::postException(context, exception, 
-                                       JSWebAPIErrorFactory::INVALID_VALUES_ERROR, "invalid parameter error"); 
-                       case WrtDeviceApis::Commons::ExceptionCodes::ConversionException:
-                               return JSWebAPIErrorFactory::postException(context, exception, 
-                                       JSWebAPIErrorFactory::TYPE_MISMATCH_ERROR, "type mismatch error");      
-                       case WrtDeviceApis::Commons::ExceptionCodes::SecurityException:
-                               return JSWebAPIErrorFactory::postException(context, exception, 
-                                       JSWebAPIErrorFactory::PERMISSION_DENIED_ERROR, "permission denied error");      
-                       case WrtDeviceApis::Commons::ExceptionCodes::Exception:
-                       default:
-                               return JSWebAPIErrorFactory::postException(context, exception, 
-                                       JSWebAPIErrorFactory::UNKNOWN_ERROR, "Unkown error");
-               }
-       }
-       return JSValueMakeUndefined(context);
-}
-
-JSValueRef JSSecureStorageManager::get(JSContextRef context, JSObjectRef object,
-       JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[],
-       JSValueRef* exception)
-{
-       JSSecureStorageManagerPriv* priv = static_cast<JSSecureStorageManagerPriv*>(JSObjectGetPrivate(thisObject));    
-       JSValueRef reserveArguments;
-
-       try 
-       {
-               if (priv == NULL)
-               {
-                       LoggerE("priv null");
-                       Throw(WrtDeviceApis::Commons::ConversionException);
-               }
-
-               // to do : need to update TizenPolicy.xml
-               // AceSecurityStatus status = SECURE_STORAGE_CHECK_ACCESS(SECURE_STORAGE_FUNC_READ);
-               // TIZEN_SYNC_ACCESS_HANDLER(status, context, exception);
-
-               if (argumentCount > 0) 
-                       reserveArguments = arguments[0];
-               else 
-                       reserveArguments = JSValueMakeUndefined(context);
-               
-               SecureStorageManagerPtr secureStorage(priv->getObject());
-               Converter converter(priv->getContext());
-               std::string key = converter.toString(reserveArguments);
-               std::string value = secureStorage->get(key);
-               return converter.toJSValueRef(value);
-       }
-       catch (const WrtDeviceApis::Commons::Exception& ex) 
-       {
-               LoggerD("Error message" << ex.GetMessage());
-               switch(ex.getCode())
-               {
-                       case WrtDeviceApis::Commons::ExceptionCodes::NotFoundException:
-                               return JSWebAPIErrorFactory::postException(context, exception, 
-                                       JSWebAPIErrorFactory::NOT_FOUND_ERROR, "not found error"); 
-                       case WrtDeviceApis::Commons::ExceptionCodes::InvalidArgumentException:
-                               return JSWebAPIErrorFactory::postException(context, exception, 
-                                       JSWebAPIErrorFactory::INVALID_VALUES_ERROR, "invalid parameter error"); 
-                       case WrtDeviceApis::Commons::ExceptionCodes::ConversionException:
-                               return JSWebAPIErrorFactory::postException(context, exception, 
-                                       JSWebAPIErrorFactory::TYPE_MISMATCH_ERROR, "type mismatch error");      
-                       case WrtDeviceApis::Commons::ExceptionCodes::SecurityException:
-                               return JSWebAPIErrorFactory::postException(context, exception, 
-                                       JSWebAPIErrorFactory::PERMISSION_DENIED_ERROR, "permission denied error");      
-                       case WrtDeviceApis::Commons::ExceptionCodes::Exception:
-                       default:
-                               return JSWebAPIErrorFactory::postException(context, exception, 
-                                       JSWebAPIErrorFactory::UNKNOWN_ERROR, "Unkown error");
-               }
-       }
-       return JSValueMakeUndefined(context);
-
-}
-
-JSValueRef JSSecureStorageManager::remove(JSContextRef context, JSObjectRef object,
-       JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[],
-       JSValueRef* exception)
-{
-       JSSecureStorageManagerPriv* priv = static_cast<JSSecureStorageManagerPriv*>(JSObjectGetPrivate(thisObject));    
-       JSValueRef reserveArguments;
-
-       try 
-       {
-               if (priv == NULL)
-               {
-                       LoggerE("priv null");
-                       Throw(WrtDeviceApis::Commons::ConversionException);
-               }
-
-               // to do : need to update TizenPolicy.xml
-               // AceSecurityStatus status = SECURE_STORAGE_CHECK_ACCESS(SECURE_STORAGE_FUNC_WRITE);
-               // TIZEN_SYNC_ACCESS_HANDLER(status, context, exception);
-
-               if (argumentCount > 0) 
-                       reserveArguments = arguments[0];
-               else 
-                       reserveArguments = JSValueMakeUndefined(context);
-               
-               SecureStorageManagerPtr secureStorage(priv->getObject());
-               Converter converter(priv->getContext());
-               std::string key = converter.toString(reserveArguments);
-               secureStorage->remove(key);
-       }
-       catch (const WrtDeviceApis::Commons::Exception& ex) 
-       {
-               LoggerD("Error message" << ex.GetMessage());
-               switch(ex.getCode())
-               {
-                       case WrtDeviceApis::Commons::ExceptionCodes::NotFoundException:
-                               return JSWebAPIErrorFactory::postException(context, exception, 
-                                       JSWebAPIErrorFactory::NOT_FOUND_ERROR, "not found error"); 
-                       case WrtDeviceApis::Commons::ExceptionCodes::InvalidArgumentException:
-                               return JSWebAPIErrorFactory::postException(context, exception, 
-                                       JSWebAPIErrorFactory::INVALID_VALUES_ERROR, "invalid parameter error"); 
-                       case WrtDeviceApis::Commons::ExceptionCodes::ConversionException:
-                               return JSWebAPIErrorFactory::postException(context, exception, 
-                                       JSWebAPIErrorFactory::TYPE_MISMATCH_ERROR, "type mismatch error");      
-                       case WrtDeviceApis::Commons::ExceptionCodes::SecurityException:
-                               return JSWebAPIErrorFactory::postException(context, exception, 
-                                       JSWebAPIErrorFactory::PERMISSION_DENIED_ERROR, "permission denied error");      
-                       case WrtDeviceApis::Commons::ExceptionCodes::Exception:
-                       default:
-                               return JSWebAPIErrorFactory::postException(context, exception, 
-                                       JSWebAPIErrorFactory::UNKNOWN_ERROR, "Unkown error");
-               }
-       }       
-       return JSValueMakeUndefined(context);
-
-}
-
-JSValueRef JSSecureStorageManager::removeAll(JSContextRef context, JSObjectRef object,
-       JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[],
-       JSValueRef* exception)
-{
-       JSSecureStorageManagerPriv* priv = static_cast<JSSecureStorageManagerPriv*>(JSObjectGetPrivate(thisObject));    
-
-       try 
-       {
-               if (priv == NULL)
-               {
-                       LoggerE("priv null");
-                       Throw(WrtDeviceApis::Commons::ConversionException);
-               }
-
-               // to do : need to update TizenPolicy.xml
-               // AceSecurityStatus status = SECURE_STORAGE_CHECK_ACCESS(SECURE_STORAGE_FUNC_WRITE);
-               // TIZEN_SYNC_ACCESS_HANDLER(status, context, exception);
-
-               SecureStorageManagerPtr secureStorage(priv->getObject());
-               Converter converter(priv->getContext());
-               secureStorage->removeAll();
-
-       }
-       catch (const WrtDeviceApis::Commons::Exception& ex) 
-       {
-               LoggerD("Error message" << ex.GetMessage());
-               switch(ex.getCode())
-               {
-                       case WrtDeviceApis::Commons::ExceptionCodes::NotFoundException:
-                               return JSWebAPIErrorFactory::postException(context, exception, 
-                                       JSWebAPIErrorFactory::NOT_FOUND_ERROR, "not found error"); 
-                       case WrtDeviceApis::Commons::ExceptionCodes::InvalidArgumentException:
-                               return JSWebAPIErrorFactory::postException(context, exception, 
-                                       JSWebAPIErrorFactory::INVALID_VALUES_ERROR, "invalid parameter error"); 
-                       case WrtDeviceApis::Commons::ExceptionCodes::ConversionException:
-                               return JSWebAPIErrorFactory::postException(context, exception, 
-                                       JSWebAPIErrorFactory::TYPE_MISMATCH_ERROR, "type mismatch error");      
-                       case WrtDeviceApis::Commons::ExceptionCodes::SecurityException:
-                               return JSWebAPIErrorFactory::postException(context, exception, 
-                                       JSWebAPIErrorFactory::PERMISSION_DENIED_ERROR, "permission denied error");      
-                       case WrtDeviceApis::Commons::ExceptionCodes::Exception:
-                       default:
-                               return JSWebAPIErrorFactory::postException(context, exception, 
-                                       JSWebAPIErrorFactory::UNKNOWN_ERROR, "Unkown error");
-               }
-       }
-       return JSValueMakeUndefined(context);
-
-}
-
-}
-}
-
diff --git a/src/SecureStorage/JSSecureStorageManager.h b/src/SecureStorage/JSSecureStorageManager.h
deleted file mode 100644 (file)
index b0ba72a..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License. 
- */
-
-
-#ifndef TIZENAPIS_TIZEN_JS_SECURE_STORAGE_MANAGER_H_
-#define TIZENAPIS_TIZEN_JS_SECURE_STORAGE_MANAGER_H_
-
-#include <JavaScriptCore/JavaScript.h>
-#include "SecureStorageManager.h"
-#include <CommonsJavaScript/PrivateObject.h>
-
-using namespace WrtDeviceApis::CommonsJavaScript;
-using namespace WrtDeviceApis;
-using namespace WrtDeviceApis::Commons;
-
-       
-namespace TizenApis {
-namespace Tizen1_0 {
-
-
-typedef PrivateObjectT<SecureStorageManagerPtr>::Type JSSecureStorageManagerPriv;
-
-class JSSecureStorageManager {
-public:
-       static const JSClassDefinition* getClassInfo();
-       static const JSClassRef getClassRef();
-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 JSValueRef listKeys(JSContextRef context, JSObjectRef object,
-               JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[],
-               JSValueRef* exception);
-       static JSValueRef set(JSContextRef context, JSObjectRef object,
-               JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[],
-               JSValueRef* exception); 
-       static JSValueRef get(JSContextRef context, JSObjectRef object,
-               JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[],
-               JSValueRef* exception); 
-       static JSValueRef remove(JSContextRef context, JSObjectRef object,
-               JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[],
-               JSValueRef* exception); 
-       static JSValueRef removeAll(JSContextRef context, JSObjectRef object,
-               JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[],
-               JSValueRef* exception); 
-
-       static JSClassDefinition m_classInfo;
-       static JSStaticFunction m_function[];
-       static JSClassRef m_jsClassRef;
-};
-
-}
-}
-
-#endif
-
diff --git a/src/SecureStorage/SecureStorageManager.cpp b/src/SecureStorage/SecureStorageManager.cpp
deleted file mode 100644 (file)
index 842b93d..0000000
+++ /dev/null
@@ -1,265 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License. 
- */
-
-#include "SecureStorageManager.h"
-#include <ss_manager.h>
-#include <cassert>
-#include <exception>
-#include <Commons/Exception.h>
-#include <CommonsJavaScript/JSUtils.h>
-#include <dpl/scoped_array.h>
-
-using namespace DPL;
-using namespace WrtDeviceApis::Commons;
-
-namespace TizenApis {
-namespace Tizen1_0{
-       
-std::string SecureStorageManager::m_filePath = "securedata.txt";
-int SecureStorageManager::m_maxLength = 256;
-
-SecureStorageManager::SecureStorageManager()
-{
-       LoggerD("OK");
-
-       try 
-       {
-               loadSecurePairData();
-       }
-       catch (const WrtDeviceApis::Commons::Exception& ex) 
-       {
-               LoggerE("Exception: " << ex.GetMessage());
-               LoggerD("there is no file");
-       }
-
-       LoggerD("initial map size : " << m_securePairData.size());
-}
-
-SecureStorageManager::~SecureStorageManager()
-{
-       LoggerD("OK");
-}
-
-std::string SecureStorageManager::get(std::string key)
-{
-       LoggerD("OK");
-
-       std::map<std::string,std::string>::iterator it = m_securePairData.find(key);    
-
-       if (it == m_securePairData.end())
-       {
-               ThrowMsg(WrtDeviceApis::Commons::NotFoundException, "not found key");
-       }
-       
-       return m_securePairData[key];
-}
-
-std::vector<std::string> SecureStorageManager::listKeys()
-{
-       std::vector<std::string> vector;
-       std::map<std::string,std::string>::iterator it; 
-
-       LoggerD("OK");
-
-       for (it = m_securePairData.begin(); it != m_securePairData.end(); ++it)
-       {
-               vector.push_back((*it).first);
-       }
-       
-       return vector;
-}
-void SecureStorageManager::set(std::string key, std::string value)
-{
-       m_securePairData[key] = value;
-
-       LoggerD("Save current data");
-       saveSecurePairData();
-}
-
-void SecureStorageManager::remove(std::string key)
-{
-       LoggerD("OK");
-
-       std::map<std::string,std::string>::iterator it = m_securePairData.find(key);    
-
-       if (it == m_securePairData.end())
-       {
-               ThrowMsg(WrtDeviceApis::Commons::NotFoundException, "not found key");
-       }
-       m_securePairData.erase(it);
-       LoggerD("Save current data");
-       saveSecurePairData();
-}
-
-void SecureStorageManager::removeAll()
-{
-       LoggerD("OK");
-
-       ssm_flag flag = SSM_FLAG_SECRET_OPERATION;
-               
-       m_securePairData.clear();
-       ssm_delete_file(m_filePath.c_str(), flag, NULL);
-}
-
-void SecureStorageManager::saveSecurePairData()
-{
-       LoggerD("OK");
-
-       std::map<std::string,std::string>::iterator it; 
-       size_t dataSize = 0;
-       size_t index = 0;
-       size_t num = 0;
-       size_t mapSize = m_securePairData.size();
-       int ret = -1;   
-
-       for (it = m_securePairData.begin(); it != m_securePairData.end(); ++it)
-       {
-               dataSize += (*it).first.size();
-               dataSize += (*it).second.size();
-       }
-       
-       dataSize += sizeof(size_t) * 2 * m_securePairData.size();
-       dataSize += sizeof(size_t) * 2;
-
-       DPL::ScopedArray<char> saveBuf(new char[dataSize]);
-
-       memcpy(&saveBuf[index], (char*)&mapSize, sizeof(size_t));
-       index += sizeof(size_t);
-
-       memcpy(&saveBuf[index], (char*)&dataSize, sizeof(size_t));
-       index += sizeof(size_t);
-       
-       for (it = m_securePairData.begin(); it != m_securePairData.end(); ++it)
-       {
-               num = (*it).first.size();
-               memcpy(&saveBuf[index], (char*)&num, sizeof(size_t));
-               index += sizeof(size_t);
-
-               memcpy(&saveBuf[index], (char*)(*it).first.c_str(), (*it).first.size());
-               index += (*it).first.size();                    
-
-               num = (*it).second.size();              
-               memcpy(&saveBuf[index], (char*)&num, sizeof(size_t));
-               index += sizeof(size_t);
-               memcpy(&saveBuf[index], (char*)(*it).second.c_str(), (*it).second.size());
-               index += (*it).second.size();                   
-       }       
-
-       ssm_flag flag = SSM_FLAG_SECRET_OPERATION;
-
-       ret = ssm_write_buffer(saveBuf.Get(), dataSize, m_filePath.c_str(), flag, NULL);
-
-       if (ret < 0) 
-       {
-               ThrowMsg(WrtDeviceApis::Commons::PlatformException, "ssm write buf error");
-       }
-       LoggerD("save result : " << ret);
-}
-
-std::string SecureStorageManager::readStringFromMemory(const char *saveBuf, size_t &current, size_t dataSize) 
-{
-       std::string value = "";
-       size_t num = 0;
-       char tempbuf[m_maxLength];
-
-       if (current + sizeof(size_t) > dataSize)
-       {
-               ThrowMsg(WrtDeviceApis::Commons::PlatformException, "get size error ");
-       }
-       
-       memcpy(&num, &saveBuf[current], sizeof(size_t));
-       memset(tempbuf, 0, sizeof(tempbuf));
-       current += sizeof(size_t);      
-
-       if (current + num > dataSize)
-       {
-               ThrowMsg(WrtDeviceApis::Commons::PlatformException, "get size error ");
-       }               
-       
-       memcpy(tempbuf, &saveBuf[current], num);
-       current += num; 
-       value = tempbuf;        
-       
-       return value;
-}
-
-
-void SecureStorageManager::loadSecurePairData()
-{
-       LoggerD("OK");
-       
-       int ret = -1;   
-       size_t num = 0;
-       size_t dataSize = 0;
-       size_t i = 0;   
-       size_t readlen = 0;     
-       char* retbuf = NULL;    
-       ssm_file_info_t sfi;
-       ssm_flag flag = SSM_FLAG_SECRET_OPERATION;
-       size_t index = 0;
-
-       m_securePairData.clear();
-       ret = ssm_getinfo(m_filePath.c_str(), &sfi, flag, NULL);
-
-       if (ret < 0)
-       {
-               ThrowMsg(WrtDeviceApis::Commons::PlatformException, "get info error");
-       }
-
-       if (sfi.originSize == 0) 
-       {
-               ThrowMsg(WrtDeviceApis::Commons::PlatformException, "originSize error");
-       }
-       
-       DPL::ScopedArray<char> saveBuf(new char[sfi.originSize]);
-       retbuf = saveBuf.Get();
-
-       memset(retbuf, 0x00, sizeof(char) * sfi.originSize);
-       ret = ssm_read(m_filePath.c_str(), retbuf, sfi.originSize, &readlen, flag, NULL);
-
-       if (ret < 0)
-       {
-               ThrowMsg(WrtDeviceApis::Commons::PlatformException, "read buf error");
-       }
-
-       LoggerD("read result : " << ret << ", length:" << readlen);
-
-       memcpy(&num, &saveBuf[index], sizeof(size_t));
-       index += sizeof(size_t);
-
-       memcpy(&dataSize, &saveBuf[index], sizeof(size_t));
-       index += sizeof(size_t);
-       
-       LoggerD("dataSize" <<  dataSize << "-" << num);
-
-       for (i = 0; i < num; i++) 
-       {
-               std::string key = readStringFromMemory(retbuf, index, dataSize);
-               std::string value = readStringFromMemory(retbuf, index, dataSize);
-
-               if (key.size() == 0 || value.size() == 0) 
-               {
-                       ThrowMsg(WrtDeviceApis::Commons::PlatformException, "read buf error");
-               }
-               m_securePairData[key] = value;
-               LoggerD("contents:" << key << "-" << m_securePairData[key]);
-       }       
-}
-
-
-}
-}
-
diff --git a/src/SecureStorage/SecureStorageManager.h b/src/SecureStorage/SecureStorageManager.h
deleted file mode 100644 (file)
index bb37aab..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License. 
- */
-
-#ifndef TIZENAPIS_TIZEN_SECURE_STORAGE_MANAGER_H_
-#define TIZENAPIS_TIZEN_SECURE_STORAGE_MANAGER_H_
-
-#include <dpl/shared_ptr.h>
-#include <map>
-#include <string>
-#include <vector>
-
-namespace TizenApis {
-namespace Tizen1_0 {
-
-class SecureStorageManager;
-typedef DPL::SharedPtr<SecureStorageManager> SecureStorageManagerPtr;
-
-
-class SecureStorageManager
-{
-public:        
-       std::string get(std::string key);
-       std::vector<std::string> listKeys();
-       void set(std::string key, std::string value);
-       void remove(std::string key);
-       void removeAll();
-       SecureStorageManager();
-       ~SecureStorageManager();
-private:       
-       static std::string m_filePath;
-       static int m_maxLength;
-       std::map<std::string, std::string> m_securePairData;
-       void saveSecurePairData();
-       void loadSecurePairData();
-       std::string readStringFromMemory(const char *saveBuf, size_t &current, size_t dataSize);
-};
-}
-}
-#endif
diff --git a/src/SecureStorage/config.xml b/src/SecureStorage/config.xml
deleted file mode 100644 (file)
index b8835e9..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE plugin-properties SYSTEM "/usr/etc/tizen-apis/config.dtd">
-<plugin-properties>
-       <library-name>libwrt-plugins-tizen-securestorage.so</library-name>
-       <feature-install-uri>securestorage.install.uri</feature-install-uri>
-       <feature-key-cn>SAMSUNG plugin group</feature-key-cn>
-       <feature-root-cn>SAMSUNG certificate authority</feature-root-cn>
-       <feature-root-fingerprint>AAAABBBBCCCCDDDEEEE0000</feature-root-fingerprint>
-       <api-feature>
-               <name>http://tizen.org/privilege/securestorage.read</name>
-               <device-capability>securestorage.read</device-capability>
-       </api-feature>
-       <api-feature>
-               <name>http://tizen.org/privilege/securestorage.write</name>
-               <device-capability>securestorage.write</device-capability> 
-       </api-feature>
-</plugin-properties>
-
diff --git a/src/SecureStorage/plugin_config.cpp b/src/SecureStorage/plugin_config.cpp
deleted file mode 100644 (file)
index 3265456..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License. 
- */
-
-
-#include <map>
-#include <utility>
-#include <Commons/FunctionDefinition.h>
-#include <Commons/FunctionDeclaration.h>
-#include <Commons/Exception.h>
-#include "plugin_config.h"
-
-#define SECURE_STORAGE_FEATURE_API_READ "http://tizen.org/privilege/securestorage.read"
-#define SECURE_STORAGE_FEATURE_API_WRITE "http://tizen.org/privilege/securestorage.write"
-
-#define SECURE_STORAGE_DEVICE_CAP_READ "securestorage.read"
-#define SECURE_STORAGE_DEVICE_CAP_WRITE "securestorage.write"
-
-namespace TizenApis {
-namespace Tizen1_0 {
-
-const char* SECURE_STORAGE_FUNC_READ = "SecureStroageReadFunc";
-const char* SECURE_STORAGE_FUNC_WRITE = "SecureStroageWriteFunc";
-const char* SECURE_STORAGE_FUNC_READWRITE = "SecureStroageReadWriteFunc";
-
-static WrtDeviceApis::Commons::FunctionMapping createSecureStorageFunctions();
-
-static WrtDeviceApis::Commons::FunctionMapping SecureStorageFunctions =
-    createSecureStorageFunctions();
-
-#pragma GCC visibility push(default)
-
-DEFINE_FUNCTION_GETTER(SecureStorage, SecureStorageFunctions);
-
-#pragma GCC visibility pop
-
-static WrtDeviceApis::Commons::FunctionMapping createSecureStorageFunctions()
-{
-       using namespace WrtDeviceApis::Commons;
-
-       ACE_CREATE_DEVICE_CAP(DEVICE_CAP_SECURE_STORAGE_READ, SECURE_STORAGE_DEVICE_CAP_READ);
-       ACE_CREATE_DEVICE_CAP(DEVICE_CAP_SECURE_STORAGE_WRITE, SECURE_STORAGE_DEVICE_CAP_WRITE);
-
-
-       ACE_CREATE_DEVICE_CAPS_LIST(EMPTY_DEVICE_LIST);
-
-       ACE_CREATE_DEVICE_CAPS_LIST(DEVICE_LIST_SECURE_STORAGE_READ);
-       ACE_ADD_DEVICE_CAP(DEVICE_LIST_SECURE_STORAGE_READ, DEVICE_CAP_SECURE_STORAGE_READ);
-
-       ACE_CREATE_DEVICE_CAPS_LIST(DEVICE_LIST_SECURE_STORAGE_WRITE);
-       ACE_ADD_DEVICE_CAP(DEVICE_LIST_SECURE_STORAGE_WRITE, DEVICE_CAP_SECURE_STORAGE_WRITE);
-
-
-       ACE_CREATE_DEVICE_CAPS_LIST(DEVICE_LIST_SECURE_STORAGE_READWRITE);
-    ACE_ADD_DEVICE_CAP(DEVICE_LIST_SECURE_STORAGE_READWRITE, DEVICE_CAP_SECURE_STORAGE_READ);
-    ACE_ADD_DEVICE_CAP(DEVICE_LIST_SECURE_STORAGE_READWRITE, DEVICE_CAP_SECURE_STORAGE_WRITE);
-       
-
-       ACE_CREATE_FEATURE(FEATURE_READ, SECURE_STORAGE_FEATURE_API_READ);
-       ACE_CREATE_FEATURE(FEATURE_WRITE, SECURE_STORAGE_FEATURE_API_WRITE);
-
-       ACE_CREATE_FEATURE_LIST(SECURE_STORAGE_FEATURES_SECURE_READWRITE);
-       ACE_ADD_API_FEATURE(SECURE_STORAGE_FEATURES_SECURE_READWRITE, FEATURE_READ);
-       ACE_ADD_API_FEATURE(SECURE_STORAGE_FEATURES_SECURE_READWRITE, FEATURE_WRITE);
-       
-       ACE_CREATE_FEATURE_LIST(SECURE_STORAGE_FEATURES_READ);
-       ACE_ADD_API_FEATURE(SECURE_STORAGE_FEATURES_READ, FEATURE_READ);
-
-       ACE_CREATE_FEATURE_LIST(SECURE_STORAGE_FEATURES_WRITE);
-       ACE_ADD_API_FEATURE(SECURE_STORAGE_FEATURES_WRITE, FEATURE_WRITE);
-
-
-   FunctionMapping SecureStorageFunctions;
-
-       AceFunction secureStorageRead = ACE_CREATE_FUNCTION(
-            FUNCTION_SECURE_STORAGE_READ_FUNCTIONS,
-            SECURE_STORAGE_FUNC_READ,
-            SECURE_STORAGE_FEATURES_READ,
-            DEVICE_LIST_SECURE_STORAGE_READ);
-
-    SecureStorageFunctions.insert(std::make_pair(
-                               SECURE_STORAGE_FUNC_READ,
-                               secureStorageRead));
-
-       AceFunction secureStorageWrite = ACE_CREATE_FUNCTION(
-            FUNCTION_SECURE_STORAGE_WRITE_FUNCTIONS,
-            SECURE_STORAGE_FUNC_WRITE,
-            SECURE_STORAGE_FEATURES_WRITE,
-            DEVICE_LIST_SECURE_STORAGE_WRITE);
-
-    SecureStorageFunctions.insert(std::make_pair(
-                               SECURE_STORAGE_FUNC_WRITE,
-                               secureStorageWrite));
-       
-       AceFunction secureStorageReadWrite = ACE_CREATE_FUNCTION(
-            FUNCTION_SECURE_STORAGE_READWRITE_FUNCTIONS,
-            SECURE_STORAGE_FUNC_READWRITE,
-            SECURE_STORAGE_FEATURES_SECURE_READWRITE,
-            DEVICE_LIST_SECURE_STORAGE_READWRITE);
-
-    SecureStorageFunctions.insert(std::make_pair(
-                               SECURE_STORAGE_FUNC_READWRITE,
-                               secureStorageReadWrite));
-       
-       return SecureStorageFunctions;
-}
-} 
-}
-
-#undef SECURE_STORAGE_FEATURE_API 
-#undef SECURE_STORAGE_FEATURE_API_WRITE 
-#undef SECURE_STORAGE_FEATURE_API_READ
-#undef SECURE_STORAGE_DEVICE_CAP_WRITE 
-#undef SECURE_STORAGE_DEVICE_CAP_READ
-
diff --git a/src/SecureStorage/plugin_config.h b/src/SecureStorage/plugin_config.h
deleted file mode 100644 (file)
index 572b634..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License. 
- */
-
-#ifndef TIZENAPIS_TIZEN_JS_SECURE_STORAGE_PLUGIN_CONFIG_H_
-#define TIZENAPIS_TIZEN_JS_SECURE_STORAGE_PLUGIN_CONFIG_H_
-
-#include <Commons/FunctionDeclaration.h>
-
-namespace TizenApis {
-namespace Tizen1_0 {
-
-extern const char* SECURE_STORAGE_FUNC_READ;
-extern const char* SECURE_STORAGE_FUNC_WRITE;
-
-
-WrtDeviceApis::Commons::AceFunction getSecureStorageFunctionData(const std::string & functionId);
-
-#define SECURE_STORAGE_CHECK_ACCESS(functionName)                       \
-    aceCheckAccess<AceFunctionGetter, DefaultArgsVerifier<> >(                \
-        getSecureStorageFunctionData,    \
-        functionName)
-}
-}
-
-#endif 
diff --git a/src/SecureStorage/plugin_initializer.cpp b/src/SecureStorage/plugin_initializer.cpp
deleted file mode 100644 (file)
index d1e1c6a..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <Commons/plugin_initializer_def.h>
-#include <Commons/WrtAccess/WrtAccess.h>
-#include "JSSecureStorageManager.h"
-#include <Logger.h>
-
-using namespace WrtDeviceApis;
-using namespace WrtDeviceApis::Commons;
-
-void on_widget_start_callback(int widgetId)
-{
-       LoggerD("[Tizen\\Bluetooth ] on_widget_start_callback ("<<widgetId<<")");
-       Try
-       {
-        WrtAccessSingleton::Instance().initialize(widgetId);
-       }
-       Catch(Commons::Exception)
-       {
-               LoggerE("WrtAccess initialization failed");
-       }
-}
-
-void on_widget_stop_callback(int widgetId)
-{
-       LoggerD("[Tizen\\Bluetooth] on_widget_stop_callback ("<<widgetId<<")");
-       Try
-       {
-        WrtAccessSingleton::Instance().deinitialize(widgetId);
-       }
-       Catch(Commons::Exception)
-       {
-               LoggerE("WrtAccess deinitialization failed");
-       }
-}
-
-PLUGIN_ON_WIDGET_START(on_widget_start_callback)
-PLUGIN_ON_WIDGET_STOP(on_widget_stop_callback)
-
-#define SECURE_STORAGE "securestorage"
-
-PLUGIN_CLASS_MAP_BEGIN
-PLUGIN_CLASS_MAP_ADD_CLASS(WRT_JS_EXTENSION_OBJECT_TIZEN, SECURE_STORAGE,
-      (js_class_template_getter)TizenApis::Tizen1_0::JSSecureStorageManager::getClassRef,NULL)
-PLUGIN_CLASS_MAP_END
-