Merge "Modify the max count of player" into tizen_2.1
authorEonseokLee <eonseok.lee@samsung.com>
Wed, 10 Apr 2013 07:15:11 +0000 (16:15 +0900)
committerGerrit Code Review <gerrit2@kim11>
Wed, 10 Apr 2013 07:15:11 +0000 (16:15 +0900)
13 files changed:
inc/FAppPkgPackageLicenseManager.h [deleted file]
packaging/osp-appfw.spec
src/CMakeLists.txt
src/app/CMakeLists.txt
src/app/package/FAppPkgPackageInfo.cpp
src/app/package/FAppPkgPackageLicenseManager.cpp [deleted file]
src/app/package/FAppPkgPackageManager.cpp
src/io/FIo_DataSetEnumeratorImpl.cpp
src/io/FIo_DataSetImpl.cpp
src/io/inc/FIo_DataSetEnumeratorImpl.h [changed mode: 0644->0755]
src/io/inc/FIo_DataSetImpl.h
src/security/FSec_PrivacyInfoImpl.cpp
src/security/FSec_PrivacyManagerImpl.cpp

diff --git a/inc/FAppPkgPackageLicenseManager.h b/inc/FAppPkgPackageLicenseManager.h
deleted file mode 100755 (executable)
index 263ead1..0000000
+++ /dev/null
@@ -1,149 +0,0 @@
-//
-// Open Service Platform
-// Copyright (c) 2012 Samsung Electronics Co., Ltd.
-//
-// 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.
-//
-
-/**
- * @file       FAppPkgPackageLicenseManager.h
- * @brief      This is the header file for the %PackageLicenseManager class.
- *
- * This header file contains the declarations of the %PackageLicenseManager class.
- */
-
-#ifndef _FAPP_PKG_PACKAGE_LICENSE_MANAGER_H_
-#define _FAPP_PKG_PACKAGE_LICENSE_MANAGER_H_
-
-#include <FBase.h>
-#include <FAppTypes.h>
-
-namespace Tizen { namespace App { namespace Package
-{
-
-/**
- * @class   PackageLicenseManager
- * @brief   This class gets the information of a package's license and manages its installation.
- *
- * @since 2.1
- *
- * @remarks  Do not use this class without obtaining prior permissions from the %Tizen platform team.
- *
- * The %PackageLicenseManager class gets the information of a package's license and manages its installation.
- */
-class _OSP_EXPORT_ PackageLicenseManager
-{
-public:
-
-       /**
-       * Generates a license request and URL.
-       *
-       * @since 2.1
-       * @privlevel    platform
-       * @privilege    %http://tizen.org/privilege/packagelicensemanager
-       *
-       * @return               An error code
-       * @param[in]    licenseRequestInfo      The string buffer of license request information
-       * @param[out]   licenseRequest          The string buffer of Package DRM license request
-       * @param[out]   licenseUrl                      The URL for Package DRM license
-       * @exception    E_SUCCESS                       The method is successful.
-       * @exception    E_INVALID_ARG           A specified input parameter is invalid.
-       * @exception    E_INVALID_DATA          A specified XML field of input string is invalid. @n
-       *                                                                       For example, the requested ID is invalid.
-       * @exception    E_PARSING_FAILED        An error has occurred when parsing the input string.
-       * @exception    E_PRIVILEGE_DENIED      The application does not have the privilege to call this method.
-       * @remarks      Do not use this method without obtaining prior permissions from the %Tizen platform team.
-       */
-       static result GenerateDrmLicenseRequest(const Tizen::Base::String& licenseRequestInfo, Tizen::Base::String& licenseRequest, Tizen::Base::String& licenseUrl);
-
-       /**
-       * Saves a Package DRM license(right object) to a DRM repository. @n
-       * It stores the DRM license (right object) when it does not exist in the DRM repository.
-       * When the same @c packgeId of DRM license(right object) already exists in the DRM repository, it is overwritten.
-       *
-       * @since 2.1
-       * @privlevel    platform
-       * @privilege    %http://tizen.org/privilege/packagelicensemanager
-       *
-       * @return               An error code
-       * @param[in]    rightObject                     The Package DRM license (right object)
-       * @exception    E_SUCCESS                       The method is successful.
-       * @exception    E_INVALID_ARG           The specified input parameter is invalid.
-       * @exception    E_DATABASE                      An error has occurred when handling the rights object repository.
-       * @exception    E_INVALID_BINDING       The input right object is not binded to the device.
-       * @exception    E_INVALID_SIGNATURE             The signature verification of the input string has failed.
-       * @exception    E_INVALID_CERTIFICATE   The certificate chain verification of the input string has failed.
-       * @exception    E_INVALID_DATA          A specified XML field of input string is invalid. @n
-       *                                                                       For example, the @c appId field is empty.
-       * @exception    E_PARSING_FAILED        An error has occurred when parsing the input string.
-       * @exception    E_PRIVILEGE_DENIED      The application does not have the privilege to call this method.
-       * @remarks      Do not use this method without obtaining prior permissions from the %Tizen platform team.
-       */
-       static result SaveDrmLicense(const Tizen::Base::String& rightObject);
-
-       /**
-       * Gets the remaining time of the package until the DRM license expiration.
-       *
-       * @since 2.1
-       * @privlevel    platform
-       * @privilege    %http://tizen.org/privilege/packagelicensemanager
-       *
-       * @return               The remaining time of the DRM license @n
-       *                               If the remaining time is unlimited, the return value of Tizen::Base::TimeSpan's days will be set to @c 9999.
-       * @param[in]    pkgId                           The package ID with which to get the information of time-based constraint
-       * @exception    E_SUCCESS                       The method is successful.
-       * @exception    E_INVALID_ARG           The specified input parameter is invalid.
-       * @exception    E_DATABASE                      An error has occurred when handling the rights object repository.
-       * @exception    E_OBJ_NOT_FOUND         The specified @c pkgId does not exist in the rights management repository.
-       * @exception    E_RIGHT_EXPIRED         The DRM license has expired.
-       * @exception    E_RIGHT_UNLIMITED       The DRM license is unlimited.
-       * @exception    E_PRIVILEGE_DENIED      The application does not have the privilege to call this method.
-       * @remarks              The specific error code can be accessed using the GetLastResult() method.
-       * @remarks      Do not use this method without obtaining prior permissions from the %Tizen platform team.
-       */
-       static Tizen::Base::TimeSpan GetRemainingTimeUntilDrmExpiration(const Tizen::App::PackageId& pkgId);
-
-       /**
-       * Saves a CEK (Contents Encryption Key) to a DRM repository. @n
-       * It stores the CEK when it does not exist in the DRM repository.
-       * When the same @c PackageId of CEK already exists in the DRM repository, it is overwritten.
-       *
-       * @since 2.1
-       * @privlevel    platform
-       * @privilege    %http://tizen.org/privilege/packagelicensemanager
-       *
-       * @return               An error code
-       * @param[in]    licenseInfo                     The CEK (Contents Encryption Key)
-       * @exception    E_SUCCESS                       The method is successful.
-       * @exception    E_INVALID_ARG           The specified input parameter is invalid.
-       * @exception    E_INVALID_DATA          A specified XML field of input string is invalid. @n
-       *                                                                       For example, the @c appId field is empty.
-       * @exception    E_DATABASE                      An error has occurred when handling the rights object repository.
-       * @exception    E_PARSING_FAILED        An error has occurred when parsing the input string.
-       * @exception    E_PRIVILEGE_DENIED      The application does not have the privilege to call this method.
-       * @remarks      Do not use this method without obtaining prior permissions from the %Tizen platform team.
-       */
-       static result SaveLicenseInfoForPackage(const Tizen::Base::String& licenseInfo);
-
-private:
-       PackageLicenseManager(void);
-       ~PackageLicenseManager(void);
-
-       PackageLicenseManager(const PackageLicenseManager& rhs);
-       PackageLicenseManager& operator = (const PackageLicenseManager);
-
-}; // PackageLicenseManager
-
-}}} // Tizen::App::Package
-
-#endif // _FAPP_PKG_PACKAGE_LICENSE_MANAGER_H_
index 6a734fd..bd0e247 100755 (executable)
@@ -49,7 +49,6 @@ BuildRequires:  pkgconfig(sqlite3)
 BuildRequires:  pkgconfig(uuid)
 BuildRequires:  pkgconfig(vconf)
 BuildRequires:  pkgconfig(zlib)
-BuildRequires:  pkgconfig(drm-service-core-intel)
 BuildRequires:  pkgconfig(haptic)
 BuildRequires:  pkgconfig(x11)
 BuildRequires:  privacy-manager-client-devel
index 0604dd7..fe5e017 100755 (executable)
@@ -10,7 +10,6 @@ pkg_check_modules(pkgs REQUIRED
        dbus-glib-1
        devman
        dlog
-       drm-service-core-intel
        dukgenerator
        ecore
        glib-2.0
index 26f22d0..47d7ecb 100644 (file)
@@ -18,7 +18,6 @@ SET (${this_target}_SOURCE_FILES
        package/FAppPkg_PackageAppInfoImpl.cpp
        package/FAppPkg_PackageInfoImpl.cpp
        package/FAppPkg_PackageManagerImpl.cpp
-       package/FAppPkgPackageLicenseManager.cpp
        package/FAppPkg_PackageParser.cpp
        FAppApp.cpp
        FApp_AppImpl.cpp
index bf2dfdc..63e3243 100755 (executable)
@@ -153,7 +153,7 @@ PackageInfo::GetType(void) const
 {
        result r = E_SUCCESS;
 
-       r = _AccessController::CheckUserPrivilege(_PRV_PACKAGESETTING);
+       r = _AccessController::CheckUserPrivilege(_PRV_PACKAGESETTING, _PRV_PACKAGEMANAGER_SETTING);
        SysTryReturn(NID_APP, r == E_SUCCESS, PACKAGE_TYPE_TPK, E_PRIVILEGE_DENIED, "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.");
 
        return __pPackageInfoImpl->GetType();
@@ -162,9 +162,6 @@ PackageInfo::GetType(void) const
 IList*
 PackageInfo::GetPrivilegeListN(void) const
 {
-       //result r = _AccessController::CheckUserPrivilege(_PRV_PACKAGESETTING);
-       //SysTryReturn(NID_APP, r == E_SUCCESS, PACKAGE_TYPE_TPK, E_PRIVILEGE_DENIED, "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.");
-
        return __pPackageInfoImpl->GetPrivilegeListN();
 }
 
diff --git a/src/app/package/FAppPkgPackageLicenseManager.cpp b/src/app/package/FAppPkgPackageLicenseManager.cpp
deleted file mode 100644 (file)
index 6d64196..0000000
+++ /dev/null
@@ -1,129 +0,0 @@
-//
-// Open Service Platform
-// Copyright (c) 2012 Samsung Electronics Co., Ltd.
-//
-// 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.
-//
-
-/**
- * @file       FAppPkgPackageLicenseManager.cpp
- * @brief      This is the implementation for the PackageLicenseManager class.
- */
-#include <FBaseErrorDefine.h>
-#include <FBase_StringConverter.h>
-#include <string.h>
-#include <FSec_AccessController.h>
-#include <FAppPkgPackageLicenseManager.h>
-#include <FBaseSysLog.h>
-
-#include <drm-oem-intel.h>
-
-using namespace Tizen::Base;
-using namespace Tizen::Security;
-
-namespace Tizen { namespace App { namespace Package
-{
-
-PackageLicenseManager::PackageLicenseManager(void)
-{
-}
-
-PackageLicenseManager::~PackageLicenseManager(void)
-{
-}
-
-result
-PackageLicenseManager::GenerateDrmLicenseRequest(const Tizen::Base::String& licenseRequestInfo, Tizen::Base::String& licenseRequest, Tizen::Base::String& licenseUrl)
-{
-       result r = E_SUCCESS;
-
-       r = _AccessController::CheckUserPrivilege(_PRV_PACKAGELICENSEMANAGER);
-       SysTryReturnResult(NID_APP, !IsFailed(r), E_PRIVILEGE_DENIED, ("[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method."));
-
-       return r;
-}
-
-result 
-PackageLicenseManager::SaveDrmLicense(const Tizen::Base::String& rightObject)
-{
-       result r = E_SUCCESS;
-       char*   pRo = null;
-       int     ret = 0;
-
-       r = _AccessController::CheckUserPrivilege(_PRV_PACKAGELICENSEMANAGER);
-       SysTryReturnResult(NID_APP, !IsFailed(r), E_PRIVILEGE_DENIED, ("[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method."));
-
-       pRo = _StringConverter::CopyToCharArrayN(rightObject);
-       SysAssertf(pRo != null, "[PackageLicenseManager] pRo is null");
-
-       ret = drm_oem_intel_install_license(pRo, strlen(pRo));
-
-       if(ret == 1)
-       {
-               SysLog(NID_APP, "SaveDrmLicense() called, ro successfully saved.");
-       }
-       else
-       {
-               SysLog(NID_APP, "SaveDrmLicense() called, failed.");
-               r = E_INVALID_DATA;
-       }
-
-CATCH:
-       delete [] pRo;
-       return r;
-}
-
-Tizen::Base::TimeSpan 
-PackageLicenseManager::GetRemainingTimeUntilDrmExpiration(const Tizen::App::PackageId& pkgId)
-{
-       result r = E_SUCCESS;
-
-       r = _AccessController::CheckUserPrivilege(_PRV_PACKAGELICENSEMANAGER);
-       SysTryReturnResult(NID_APP, !IsFailed(r), E_PRIVILEGE_DENIED, ("[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method."));
-
-       TimeSpan temp(9999,9999,9999);
-
-       return temp;
-}
-
-result 
-PackageLicenseManager::SaveLicenseInfoForPackage(const Tizen::Base::String& licenseInfo)
-{
-       result r = E_SUCCESS;
-       char*   pCek = null;
-       int ret = 0;
-
-       r = _AccessController::CheckUserPrivilege(_PRV_PACKAGELICENSEMANAGER);
-       SysTryReturnResult(NID_APP, !IsFailed(r), E_PRIVILEGE_DENIED, ("[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method."));
-
-       pCek = _StringConverter::CopyToCharArrayN(licenseInfo);
-       SysAssertf(pCek !=null, "[PackageLicenseManager] pCek is null");
-
-       ret = drm_oem_intel_install_cek(pCek, strlen(pCek));
-
-       if(ret == 1)
-       {
-               SysLog(NID_APP, "SaveLicenseInfoForApp() called, ro successfully saved.");
-       }
-       else
-       {
-               SysLog(NID_APP, "SaveLicenseInfoForApp() called, failed.");
-               r = E_INVALID_DATA;
-       }
-
-CATCH:
-       delete [] pCek;
-       return r;
-}
-
-}}} // Tizen::App::Package
index f762709..2b41a69 100755 (executable)
@@ -59,7 +59,7 @@ PackageManager::AddPackageInstallationEventListener(IPackageInstallationEventLis
 
        result r = E_SUCCESS;
 
-       r = _AccessController::CheckUserPrivilege(_PRV_PACKAGEINFO);
+       r = _AccessController::CheckUserPrivilege(_PRV_PACKAGEINFO, _PRV_PACKAGE_INFO);
        SysTryReturnResult(NID_APP, r == E_SUCCESS, E_PRIVILEGE_DENIED, "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.");
 
        r = __pPackageManagerImpl->AddEventListener(&listener);
@@ -75,7 +75,7 @@ PackageManager::RemovePackageInstallationEventListener(IPackageInstallationEvent
 
        result r = E_SUCCESS;
 
-       r = _AccessController::CheckUserPrivilege(_PRV_PACKAGEINFO);
+       r = _AccessController::CheckUserPrivilege(_PRV_PACKAGEINFO, _PRV_PACKAGE_INFO);
        SysTryReturnResult(NID_APP, r == E_SUCCESS, E_PRIVILEGE_DENIED, "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.");
 
        __pPackageManagerImpl->RemoveEventListener(&listener);
@@ -92,7 +92,7 @@ PackageManager::GetPackageInfoN(const PackageId& packageId) const
        result r = E_SUCCESS;
        PackageInfo* pPackageInfo = null;
 
-       r = _AccessController::CheckUserPrivilege(_PRV_PACKAGEINFO);
+       r = _AccessController::CheckUserPrivilege(_PRV_PACKAGEINFO, _PRV_PACKAGE_INFO);
        SysTryReturn(NID_APP, r == E_SUCCESS, null, E_PRIVILEGE_DENIED, "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.");
 
        pPackageInfo = __pPackageManagerImpl->GetPackageInfoN(packageId);
@@ -108,7 +108,7 @@ PackageManager::GetPackageAppInfoN(const AppId& appId) const
        result r = E_SUCCESS;
        PackageAppInfo* pPackageAppInfo = null;
 
-       r = _AccessController::CheckUserPrivilege(_PRV_PACKAGEINFO);
+       r = _AccessController::CheckUserPrivilege(_PRV_PACKAGEINFO, _PRV_PACKAGE_INFO);
        SysTryReturn(NID_APP, r == E_SUCCESS, null, E_PRIVILEGE_DENIED, "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.");
 
        pPackageAppInfo = __pPackageManagerImpl->GetPackageAppInfoN(appId);
@@ -123,7 +123,7 @@ PackageManager::GetPackageInfoListN(void) const
 
        result r = E_SUCCESS;
 
-       r = _AccessController::CheckUserPrivilege(_PRV_PACKAGEINFO);
+       r = _AccessController::CheckUserPrivilege(_PRV_PACKAGEINFO, _PRV_PACKAGE_INFO);
        SysTryReturn(NID_APP, r == E_SUCCESS, null, E_PRIVILEGE_DENIED, "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.");
 
        return __pPackageManagerImpl->GetPackageInfoListN();
@@ -136,7 +136,7 @@ PackageManager::IsPackageInstalled(const PackageId& packageId) const
 
        result r = E_SUCCESS;
 
-       r = _AccessController::CheckUserPrivilege(_PRV_PACKAGEINFO);
+       r = _AccessController::CheckUserPrivilege(_PRV_PACKAGEINFO, _PRV_PACKAGE_INFO);
        SysTryReturn(NID_APP, r == E_SUCCESS, false, E_PRIVILEGE_DENIED, "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.");
 
        return __pPackageManagerImpl->IsPackageInstalled(packageId);
@@ -165,7 +165,7 @@ PackageManager::MoveToExternalStorage(const PackageId& packageId)
 
        result r = E_SUCCESS;
 
-       r = _AccessController::CheckUserPrivilege(_PRV_PACKAGESETTING);
+       r = _AccessController::CheckUserPrivilege(_PRV_PACKAGESETTING, _PRV_PACKAGEMANAGER_SETTING);
        SysTryReturnResult(NID_APP, r == E_SUCCESS, E_PRIVILEGE_DENIED, "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.");
 
        return __pPackageManagerImpl->MoveToExternalStorage(packageId);
@@ -178,7 +178,7 @@ PackageManager::MoveToInternalStorage(const PackageId& packageId)
 
        result r = E_SUCCESS;
 
-       r = _AccessController::CheckUserPrivilege(_PRV_PACKAGESETTING);
+       r = _AccessController::CheckUserPrivilege(_PRV_PACKAGESETTING, _PRV_PACKAGEMANAGER_SETTING);
        SysTryReturnResult(NID_APP, r == E_SUCCESS, E_PRIVILEGE_DENIED, "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.");
 
        return __pPackageManagerImpl->MoveToInternalStorage(packageId);
@@ -189,8 +189,8 @@ PackageManager::GetPackageInfoFromFileN(const String& packagePath) const
 {
        SysAssertf(__pPackageManagerImpl != null, "Not yet constructed. GetInstance() should be called before use.");
 
-       //result r = _AccessController::CheckUserPrivilege(_PRV_PACKAGEINFO);
-       //SysTryReturn(NID_APP, r == E_SUCCESS, null, E_PRIVILEGE_DENIED, "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.");
+       result r = _AccessController::CheckUserPrivilege(_PRV_PACKAGEMANAGER_INFO);
+       SysTryReturn(NID_APP, r == E_SUCCESS, null, E_PRIVILEGE_DENIED, "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.");
 
        return __pPackageManagerImpl->GetPackageInfoFromFileN(packagePath);
 }
@@ -200,8 +200,8 @@ PackageManager::GetPackageInfoListN(const IMap& packageFilterMap) const
 {
        SysAssertf(__pPackageManagerImpl != null, "Not yet constructed. GetInstance() should be called before use.");
 
-       //result r = _AccessController::CheckUserPrivilege(_PRV_PACKAGEINFO);
-       //SysTryReturn(NID_APP, r == E_SUCCESS, null, E_PRIVILEGE_DENIED, "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.");
+       result r = _AccessController::CheckUserPrivilege(_PRV_PACKAGE_INFO);
+       SysTryReturn(NID_APP, r == E_SUCCESS, null, E_PRIVILEGE_DENIED, "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.");
 
        return __pPackageManagerImpl->GetPackageInfoListN(packageFilterMap);
 }
@@ -211,8 +211,8 @@ PackageManager::GetPackageAppInfoListN(const IMap& packageAppFilterMap) const
 {
        SysAssertf(__pPackageManagerImpl != null, "Not yet constructed. GetInstance() should be called before use.");
 
-       //result r = _AccessController::CheckUserPrivilege(_PRV_PACKAGEINFO);
-       //SysTryReturn(NID_APP, r == E_SUCCESS, null, E_PRIVILEGE_DENIED, "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.");
+       result r = _AccessController::CheckUserPrivilege(_PRV_PACKAGE_INFO);
+       SysTryReturn(NID_APP, r == E_SUCCESS, null, E_PRIVILEGE_DENIED, "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.");
 
        return __pPackageManagerImpl->GetPackageAppInfoListN(packageAppFilterMap);
 }
@@ -222,8 +222,8 @@ PackageManager::GetPackageAppInfoListN(const IMap& packageFilterMap, const IMap&
 {
        SysAssertf(__pPackageManagerImpl != null, "Not yet constructed. GetInstance() should be called before use.");
 
-       //result r = _AccessController::CheckUserPrivilege(_PRV_PACKAGEINFO);
-       //SysTryReturn(NID_APP, r == E_SUCCESS, null, E_PRIVILEGE_DENIED, "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.");
+       result r = _AccessController::CheckUserPrivilege(_PRV_PACKAGE_INFO);
+       SysTryReturn(NID_APP, r == E_SUCCESS, null, E_PRIVILEGE_DENIED, "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.");
 
        return __pPackageManagerImpl->GetPackageAppInfoListN(packageFilterMap, packageAppFilterMap);
 }
index c631d7f..40320e5 100755 (executable)
@@ -57,21 +57,27 @@ _DataSetEnumeratorImpl::_DataSetEnumeratorImpl(void)
        __pCurrentRow(null),
        __columnCount(0),
        __rowCount(0),
-       __currentRowIndex(-1)
+       __currentRowIndex(-1),
+       __dataSetDeleted(0)
 {
 
 }
 
 _DataSetEnumeratorImpl::~_DataSetEnumeratorImpl(void)
 {
-
+       if (__dataSetDeleted == 0)
+       {
+               __pEnumImplList->Remove(*this);
+       }
 }
 
 result
 _DataSetEnumeratorImpl::MoveNext(void)
 {
        SysTryReturnResult(NID_IO, __pDataSet != null, E_INVALID_STATE,
-                               "The Object is not constructed or the dataset is already been deleted.");
+                               "The Object is not constructed.");
+       SysTryReturnResult(NID_IO, __dataSetDeleted != 1, E_INVALID_STATE,
+                               "The dataset is already been deleted.");
 
        if (__currentRowIndex +1  == __rowCount)
                return E_OUT_OF_RANGE;
@@ -89,7 +95,9 @@ result
 _DataSetEnumeratorImpl::MovePrevious(void)
 {
        SysTryReturnResult(NID_IO, __pDataSet != null, E_INVALID_STATE,
-                               "The Object is not constructed or the dataset is already been deleted.");
+                               "The Object is not constructed.");
+       SysTryReturnResult(NID_IO, __dataSetDeleted != 1, E_INVALID_STATE,
+                               "The dataset is already been deleted.");
 
        if (__currentRowIndex == 0)
                return E_OUT_OF_RANGE;
@@ -107,7 +115,9 @@ result
 _DataSetEnumeratorImpl::MoveFirst(void)
 {
        SysTryReturnResult(NID_IO, __pDataSet != null, E_INVALID_STATE,
-                               "The Object is not constructed or the dataset is already been deleted.");
+                               "The Object is not constructed.");
+       SysTryReturnResult(NID_IO, __dataSetDeleted != 1, E_INVALID_STATE,
+                               "The dataset is already been deleted.");
 
        __currentRowIndex = 0;
        __pCurrentRow = static_cast<ArrayList*>(__pDataSet->GetAt(__currentRowIndex));
@@ -122,7 +132,9 @@ result
 _DataSetEnumeratorImpl::MoveLast(void)
 {
        SysTryReturnResult(NID_IO, __pDataSet != null, E_INVALID_STATE,
-                               "The Object is not constructed or the dataset is already been deleted.");
+                               "The Object is not constructed.");
+       SysTryReturnResult(NID_IO, __dataSetDeleted != 1, E_INVALID_STATE,
+                               "The dataset is already been deleted.");
 
        __currentRowIndex = __rowCount -1;
        __pCurrentRow = static_cast<ArrayList*>(__pDataSet->GetAt(__currentRowIndex));
@@ -137,7 +149,9 @@ result
 _DataSetEnumeratorImpl::Reset(void)
 {
        SysTryReturnResult(NID_IO, __pDataSet != null, E_INVALID_STATE,
-                               "The Object is not constructed or the dataset is already been deleted.");
+                               "The Object is not constructed.");
+       SysTryReturnResult(NID_IO, __dataSetDeleted != 1, E_INVALID_STATE,
+                               "The dataset is already been deleted.");
 
        __currentRowIndex = -1;
        __pCurrentRow = null;
@@ -151,7 +165,9 @@ _DataSetEnumeratorImpl::GetIntAt(int columnIndex, int& value) const
        result r = E_SUCCESS;
 
        SysTryReturnResult(NID_IO, __pDataSet != null, E_INVALID_STATE,
-                               "The Object is not constructed or the dataset is already been deleted.");
+                               "The Object is not constructed.");
+       SysTryReturnResult(NID_IO, __dataSetDeleted != 1, E_INVALID_STATE,
+                               "The dataset is already been deleted.");
        SysTryReturnResult(NID_IO, columnIndex >= 0 && columnIndex < __columnCount, E_INVALID_ARG,
                                "Given column index is out of range.");
        SysTryReturnResult(NID_IO, __pCurrentRow != null, E_INVALID_STATE,
@@ -181,7 +197,9 @@ _DataSetEnumeratorImpl::GetInt64At(int columnIndex, long long& value) const
        result r = E_SUCCESS;
 
        SysTryReturnResult(NID_IO, __pDataSet != null, E_INVALID_STATE,
-                               "The Object is not constructed or the dataset is already been deleted.");
+                               "The Object is not constructed.");
+       SysTryReturnResult(NID_IO, __dataSetDeleted != 1, E_INVALID_STATE,
+                               "The dataset is already been deleted.");
        SysTryReturnResult(NID_IO, columnIndex >= 0 && columnIndex < __columnCount, E_INVALID_ARG,
                                "Given column index is out of range.");
        SysTryReturnResult(NID_IO, __pCurrentRow != null, E_INVALID_STATE,
@@ -211,7 +229,9 @@ _DataSetEnumeratorImpl::GetDoubleAt(int columnIndex, double& value) const
        result r = E_SUCCESS;
 
        SysTryReturnResult(NID_IO, __pDataSet != null, E_INVALID_STATE,
-                               "The Object is not constructed or the dataset is already been deleted.");
+                               "The Object is not constructed.");
+       SysTryReturnResult(NID_IO, __dataSetDeleted != 1, E_INVALID_STATE,
+                               "The dataset is already been deleted.");
        SysTryReturnResult(NID_IO, columnIndex >= 0 && columnIndex < __columnCount, E_INVALID_ARG,
                                "Given column index is out of range.");
        SysTryReturnResult(NID_IO, __pCurrentRow != null, E_INVALID_STATE,
@@ -241,7 +261,9 @@ _DataSetEnumeratorImpl::GetStringAt(int columnIndex, String& value) const
        result r = E_SUCCESS;
 
        SysTryReturnResult(NID_IO, __pDataSet != null, E_INVALID_STATE,
-                               "The Object is not constructed or the dataset is already been deleted.");
+                               "The Object is not constructed.");
+       SysTryReturnResult(NID_IO, __dataSetDeleted != 1, E_INVALID_STATE,
+                               "The dataset is already been deleted.");
        SysTryReturnResult(NID_IO, columnIndex >= 0 && columnIndex < __columnCount, E_INVALID_ARG,
                                "Given column index is out of range.");
        SysTryReturnResult(NID_IO, __pCurrentRow != null, E_INVALID_STATE,
@@ -271,7 +293,9 @@ _DataSetEnumeratorImpl::GetBlobAt(int columnIndex, ByteBuffer& value) const
        ByteBuffer* pBuffer = null;
 
        SysTryReturnResult(NID_IO, __pDataSet != null, E_INVALID_STATE,
-                               "The Object is not constructed or the dataset is already been deleted.");
+                               "The Object is not constructed.");
+       SysTryReturnResult(NID_IO, __dataSetDeleted != 1, E_INVALID_STATE,
+                               "The dataset is already been deleted.");
        SysTryReturnResult(NID_IO, columnIndex >= 0 && columnIndex < __columnCount, E_INVALID_ARG,
                                "Given column index is out of range.");
        SysTryReturnResult(NID_IO, __pCurrentRow != null, E_INVALID_STATE,
@@ -305,7 +329,9 @@ _DataSetEnumeratorImpl::GetBlobAt(int columnIndex, void* buffer, int size) const
        ByteBuffer* pBuffer = null;
 
        SysTryReturnResult(NID_IO, __pDataSet != null, E_INVALID_STATE,
-                               "The Object is not constructed or the dataset is already been deleted.");
+                               "The Object is not constructed.");
+       SysTryReturnResult(NID_IO, __dataSetDeleted != 1, E_INVALID_STATE,
+                               "The dataset is already been deleted.");
        SysTryReturnResult(NID_IO, columnIndex >= 0 && columnIndex < __columnCount, E_INVALID_ARG,
                                "Given column index is out of range.");
        SysTryReturnResult(NID_IO, __pCurrentRow != null, E_INVALID_STATE,
@@ -344,7 +370,9 @@ _DataSetEnumeratorImpl::GetDateTimeAt(int columnIndex, DateTime& value) const
        String* pStr = null;
 
        SysTryReturnResult(NID_IO, __pDataSet != null, E_INVALID_STATE,
-                               "The instance is not constructed or the dataset is already been deleted.");
+                               "The Object is not constructed.");
+       SysTryReturnResult(NID_IO, __dataSetDeleted != 1, E_INVALID_STATE,
+                               "The dataset is already been deleted.");
        SysTryReturnResult(NID_IO, columnIndex >= 0 && columnIndex < __columnCount, E_INVALID_ARG,
                                "Given column index is out of range.");
        SysTryReturnResult(NID_IO, __pCurrentRow != null, E_INVALID_STATE,
@@ -372,8 +400,10 @@ CATCH:
 int
 _DataSetEnumeratorImpl::GetColumnCount(void) const
 {
-       SysTryReturnResult(NID_IO, __pDataSet != null, E_INVALID_STATE,
-                               "The Object is not constructed or the dataset is already been deleted.");
+       SysTryReturn(NID_IO, __pDataSet != null, -1, E_INVALID_STATE,
+                               "[E_INVALID_STATE] The Object is not constructed.");
+       SysTryReturn(NID_IO, __dataSetDeleted != 1, -1, E_INVALID_STATE,
+                               "[E_INVALID_STATE] The dataset is already been deleted.");
 
        return __columnCount;
 }
@@ -384,8 +414,9 @@ _DataSetEnumeratorImpl::GetColumnType(int columnIndex) const
        DbColumnType type = DB_COLUMNTYPE_UNDEFINED;
 
        SysTryReturn(NID_IO, __pDataSet != null, DB_COLUMNTYPE_UNDEFINED, E_INVALID_STATE,
-                               "[E_INVALID_STATE] The instance is not constructed or the dataset is already been deleted.");
-
+                               "[E_INVALID_STATE] The instance is not constructed.");
+       SysTryReturn(NID_IO, __dataSetDeleted != 1, DB_COLUMNTYPE_UNDEFINED, E_INVALID_STATE,
+                               "[E_INVALID_STATE] The dataset is already been deleted.");
        SysTryReturn(NID_IO, columnIndex >= 0 && columnIndex < __columnCount, DB_COLUMNTYPE_UNDEFINED, E_INVALID_ARG,
                                "[E_INVALID_ARG] Given column index is out of range.");
 
@@ -422,8 +453,9 @@ String
 _DataSetEnumeratorImpl::GetColumnName(int columnIndex) const
 {
        SysTryReturn(NID_IO, __pDataSet != null, null, E_INVALID_STATE,
-                               "[E_INVALID_STATE] The instance is not constructed or the dataset is already been deleted.");
-
+                               "[E_INVALID_STATE] The instance is not constructed.");
+       SysTryReturn(NID_IO, __dataSetDeleted != 1, null, E_INVALID_STATE,
+                               "[E_INVALID_STATE] The dataset is already been deleted.");
        SysTryReturn(NID_IO, columnIndex >= 0 && columnIndex < __columnCount, null, E_INVALID_ARG,
                                "[E_INVALID_ARG] Given column index is out of range.");
 
@@ -445,11 +477,11 @@ _DataSetEnumeratorImpl::GetColumnSize(int columnIndex) const
        int bytes = 0;
 
        SysTryReturn(NID_IO, __pDataSet != null, -1, E_INVALID_STATE,
-                               "[E_INVALID_STATE] The instance is not constructed or the dataset is already been deleted.");
-
+               "[E_INVALID_STATE] The instance is not constructed.");
+       SysTryReturn(NID_IO, __dataSetDeleted != 1, -1, E_INVALID_STATE,
+                               "[E_INVALID_STATE] The dataset is already been deleted.");
        SysTryReturn(NID_IO, columnIndex >= 0 && columnIndex < __columnCount, -1, E_INVALID_ARG,
                                "[E_INVALID_ARG] Given column index is out of range.");
-
        SysTryReturn(NID_IO, __pCurrentRow != null, -1, E_INVALID_STATE,
                                "[E_INVALID_STATE] The method has tried to fetch the column data of a result set that is not activated.");
 
index 9670bd3..1e64390 100755 (executable)
@@ -46,6 +46,9 @@ _DataSetImpl::_DataSetImpl(void)
 
 _DataSetImpl::~_DataSetImpl(void)
 {
+       for (int i = 0; i< __enumImplList.GetCount() ; i++)
+               (static_cast<_DataSetEnumeratorImpl*>(__enumImplList.GetAt(i)))->__dataSetDeleted = 1;
+
        delete __pDataSet;
        delete __pColumnList;
        delete __pColumnTypeList;
@@ -109,6 +112,8 @@ _DataSetImpl::CreateDataRowN(void)
 DataSetEnumerator*
 _DataSetImpl::GetDataSetEnumeratorN(void)
 {
+       result r;
+
        unique_ptr<DataSetEnumerator> pDataSetEnum(_DataSetEnumeratorImpl::CreateDataSetEnumeratorInstanceN());
 
        _DataSetEnumeratorImpl::GetInstance(*pDataSetEnum)->__pDataSet = __pDataSet;
@@ -118,6 +123,11 @@ _DataSetImpl::GetDataSetEnumeratorN(void)
 
        //SysLog(NID_IO, "row count is %d, column count is %d", __rowCount, __columnCount);
 
+       r = __enumImplList.Add(_DataSetEnumeratorImpl::GetInstance(*pDataSetEnum));
+       SysTryReturn(NID_IO, r == E_SUCCESS, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Add to LinkedList Falied");
+
+       _DataSetEnumeratorImpl::GetInstance(*pDataSetEnum)->__pEnumImplList = &__enumImplList;
+
        return pDataSetEnum.release();
 }
 
old mode 100644 (file)
new mode 100755 (executable)
index 9586c4a..85f1264
@@ -162,11 +162,11 @@ private:
        Tizen::Base::Collection::ArrayList* __pCurrentRow;
 
        int __columnCount;
-
        int __rowCount;
-
        int __currentRowIndex;
 
+       int __dataSetDeleted;
+       Tizen::Base::Collection::LinkedList* __pEnumImplList;
        friend class _DataSetImpl;
 
 }; // _DataSetEnumeratorImpl
index 2c4fd48..541cafd 100755 (executable)
@@ -73,6 +73,8 @@ private:
 
        int __columnCount;
        int __rowCount;
+
+       Tizen::Base::Collection::LinkedList __enumImplList;
 }; // _DataSetImpl
 
 }} // Tizen::Io
index b445db8..e929e6a 100755 (executable)
@@ -76,7 +76,12 @@ _PrivacyInfoImpl::SetEnabled(bool enable)
 String
 _PrivacyInfoImpl::GetDisplayName(void) const
 {
-       return __privacyId;
+       String privacyURI = L"http://tizen.org/privacy/";
+       String displayName;
+
+       __privacyId.SubString(privacyURI.GetLength(), displayName);
+
+       return displayName;
 }
 
 String
index 7944b4e..1d333a6 100755 (executable)
@@ -54,7 +54,6 @@ _PrivacyManagerImpl::GetInstance(PrivacyManager& privacyManager)
 
 bool GetPrivacyAppPackageListNCallback(const char *package_id, void* user_data)
 {
-       result r = E_SUCCESS;
        ArrayList* pList = static_cast < ArrayList* >(user_data);
 
        pList->Add(new String(package_id));