+++ /dev/null
-//
-// 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_
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
dbus-glib-1
devman
dlog
- drm-service-core-intel
dukgenerator
ecore
glib-2.0
package/FAppPkg_PackageAppInfoImpl.cpp
package/FAppPkg_PackageInfoImpl.cpp
package/FAppPkg_PackageManagerImpl.cpp
- package/FAppPkgPackageLicenseManager.cpp
package/FAppPkg_PackageParser.cpp
FAppApp.cpp
FApp_AppImpl.cpp
{
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();
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();
}
+++ /dev/null
-//
-// 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
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);
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);
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);
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);
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();
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);
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);
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);
{
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);
}
{
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);
}
{
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);
}
{
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);
}
__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;
_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;
_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));
_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));
_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;
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,
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,
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,
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,
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,
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,
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,
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;
}
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.");
_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.");
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.");
_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;
DataSetEnumerator*
_DataSetImpl::GetDataSetEnumeratorN(void)
{
+ result r;
+
unique_ptr<DataSetEnumerator> pDataSetEnum(_DataSetEnumeratorImpl::CreateDataSetEnumeratorInstanceN());
_DataSetEnumeratorImpl::GetInstance(*pDataSetEnum)->__pDataSet = __pDataSet;
//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();
}
Tizen::Base::Collection::ArrayList* __pCurrentRow;
int __columnCount;
-
int __rowCount;
-
int __currentRowIndex;
+ int __dataSetDeleted;
+ Tizen::Base::Collection::LinkedList* __pEnumImplList;
friend class _DataSetImpl;
}; // _DataSetEnumeratorImpl
int __columnCount;
int __rowCount;
+
+ Tizen::Base::Collection::LinkedList __enumImplList;
}; // _DataSetImpl
}} // Tizen::Io
String
_PrivacyInfoImpl::GetDisplayName(void) const
{
- return __privacyId;
+ String privacyURI = L"http://tizen.org/privacy/";
+ String displayName;
+
+ __privacyId.SubString(privacyURI.GetLength(), displayName);
+
+ return displayName;
}
String
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));