2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
18 * @file FAppPkg_PackageAppInfoImpl.cpp
19 * @brief This is the implementation for the _PackageAppInfoImpl class.
25 #include <unique_ptr.h>
27 #include <pkgmgr-info.h>
29 #include <FAppPkgPackageManager.h>
30 #include <FAppPkgPackageAppInfo.h>
31 #include <FBaseSysLog.h>
32 #include <FIoDatabase.h>
33 #include <FIoDbEnumerator.h>
34 #include <FIoDbStatement.h>
35 #include <FBase_StringConverter.h>
37 #include "FAppPkg_PackageManagerImpl.h"
38 #include "FApp_TemplateUtil.h"
40 using namespace Tizen::Base;
41 using namespace Tizen::Base::Collection;
42 using namespace Tizen::Graphics;
43 using namespace Tizen::Io;
45 namespace Tizen { namespace App { namespace Package
49 _PackageAppInfoImpl::GetAppId(void) const
55 _PackageAppInfoImpl::SetAppId(const AppId& appId)
62 _PackageAppInfoImpl::GetAppName(void) const
68 _PackageAppInfoImpl::SetAppName(const String& appName)
75 _PackageAppInfoImpl::GetAppDisplayName(void) const
77 return __appDiplayName;
81 _PackageAppInfoImpl::SetAppDisplayName(const String& appDiplayName)
83 __appDiplayName = appDiplayName;
88 _PackageAppInfoImpl::GetAppMenuIconPath(void) const
94 _PackageAppInfoImpl::SetAppMenuIconPath(const String& iconPath)
96 __appIconPath = iconPath;
101 _PackageAppInfoImpl::GetAppSettingIconPath(void) const
103 return __appSettingIconPath;
107 _PackageAppInfoImpl::SetAppSettingIconPath(const Tizen::Base::String& appSettingIcon)
109 __appSettingIconPath = appSettingIcon;
114 _PackageAppInfoImpl::GetAppNotificationIconPath(void) const
116 return __appNotificationIconPath;
120 _PackageAppInfoImpl::SetAppNotificationIconPath(const String& notificationIconPath)
122 __appNotificationIconPath = notificationIconPath;
127 _PackageAppInfoImpl::GetAppMenuIconN(void) const
129 SysTryReturn(NID_APP, __appIconPath.IsEmpty() == false, null, E_FILE_NOT_FOUND, "appIconPath() is empty.");
135 _PackageAppInfoImpl::GetAppMetadataListN(void) const
141 _PackageAppInfoImpl::GetAppCategoryListN(void) const
143 ArrayList* pList = null;
147 SysTryReturn(NID_APP, __pAppInfoHandle, null, E_SYSTEM, "[E_SYSTEM] __pAppInfoHandle is null.");
149 result r = E_SUCCESS;
150 int res = PMINFO_R_OK;
152 pList = new (std::nothrow) ArrayList();
153 SysTryReturn(NID_APP, pList, null, E_OUT_OF_MEMORY, "ArrayList creation failure.");
156 res = pkgmgrinfo_appinfo_foreach_category(__pAppInfoHandle, CategoryHandler, pList);
157 if (res != PMINFO_R_OK)
159 SysLog(NID_APP, "pkgmgrinfo_appinfo_foreach_category() is failed. result = [%d]", res);
162 pList->RemoveAll(true);
171 SysLog(NID_APP, "GetAppCategoryListN() is not available.");
178 _PackageAppInfoImpl::IsMenuIconVisible(void) const
180 return __launchingIconVisible;
184 _PackageAppInfoImpl::SetMenuIconVisible(bool visible)
186 __launchingIconVisible = visible;
191 _PackageAppInfoImpl::IsMainApp(void) const
197 _PackageAppInfoImpl::SetMainApp(bool mainApp)
204 _PackageAppInfoImpl::AddCategory(String* pCategory)
206 result r = E_SUCCESS;
207 r = __pAppCategoryList->Add(*pCategory);
208 SysTryReturnResult(NID_APP, !IsFailed(r), r, "__pAppCategoryList->Add() is failed.");
214 _PackageAppInfoImpl::GetInstance(PackageAppInfo* pPackageAppInfo)
218 return pPackageAppInfo->__pPackageAppInfoImpl;
225 _PackageAppInfoImpl::Construct(const AppId& appId)
227 int res = PMINFO_R_OK;
228 char* pExePath = null;
229 char* pDisplayName = null;
230 char* pMenuIcon = null;
231 char* pSettingIcon = null;
232 char* pNotificationIcon = null;
233 bool mainApp = false;
234 bool menuIconVisible = false;
236 std::unique_ptr<char[]> pAppId(_StringConverter::CopyToCharArrayN(appId));
237 SysTryReturnResult(NID_APP, pAppId, E_OUT_OF_MEMORY, "pAppId is null");
239 res = pkgmgrinfo_appinfo_get_appinfo(pAppId.get(), &__pAppInfoHandle);
240 SysTryReturnResult(NID_APP, res == 0, E_SYSTEM, "pkgmgrinfo_appinfo_get_appinfo failed, res = [%d]", res);
242 __fromDatabase = true;
246 res = pkgmgrinfo_appinfo_get_exec(__pAppInfoHandle, &pExePath);
247 if (res == PMINFO_R_OK)
249 SysLog(NID_APP, "pkgmgrinfo_appinfo_get_exec(): exe = [%s]", pExePath);
251 String exePath(pExePath);
252 int startIndex = exePath.GetLength() - 1;
254 result r = exePath.LastIndexOf(L'/', startIndex, indexOf);
258 exePath.SubString(indexOf + 1, appName);
260 SysLog(NID_APP, "appName = [%ls]", appName.GetPointer());
264 SysLog(NID_APP, "LastIndexOf is failed.");
269 SysLog(NID_APP, "pkgmgrinfo_appinfo_get_exec() is failed. result = [%d]", res);
272 res = pkgmgrinfo_appinfo_get_label(__pAppInfoHandle, &pDisplayName);
273 if (res == PMINFO_R_OK)
275 SysLog(NID_APP, "pkgmgrinfo_appinfo_get_label(): displayName = [%s]", pDisplayName);
276 String displayName(pDisplayName);
277 SetAppDisplayName(displayName);
281 SysLog(NID_APP, "pkgmgrinfo_appinfo_get_label() is failed. result = [%d]", res);
284 res = pkgmgrinfo_appinfo_get_icon(__pAppInfoHandle, &pMenuIcon);
285 if (res == PMINFO_R_OK)
287 SysLog(NID_APP, "pkgmgrinfo_appinfo_get_icon(): MenuIcon = [%s]", pMenuIcon);
288 String menuIcon(pMenuIcon);
289 SetAppMenuIconPath(menuIcon);
293 SysLog(NID_APP, "pkgmgrinfo_appinfo_get_icon() is failed. result = [%d]", res);
296 res = pkgmgrinfo_appinfo_get_setting_icon(__pAppInfoHandle, &pSettingIcon);
297 if (res == PMINFO_R_OK)
299 SysLog(NID_APP, "pkgmgrinfo_appinfo_get_setting_icon(): SettingIcon = [%s]", pSettingIcon);
300 String settingIcon(pSettingIcon);
301 SetAppSettingIconPath(settingIcon);
305 SysLog(NID_APP, "pkgmgrinfo_appinfo_get_setting_icon() is failed. result = [%d]", res);
308 res = pkgmgrinfo_appinfo_get_notification_icon(__pAppInfoHandle, &pNotificationIcon);
309 if (res == PMINFO_R_OK)
311 SysLog(NID_APP, "pkgmgrinfo_appinfo_get_notification_icon(): NotificationIcon = [%s]", pNotificationIcon);
312 String notificationIcon(pNotificationIcon);
313 SetAppNotificationIconPath(notificationIcon);
317 SysLog(NID_APP, "pkgmgrinfo_appinfo_get_notification_icon() is failed. result = [%d]", res);
320 res = pkgmgrinfo_appinfo_is_mainapp(__pAppInfoHandle, &mainApp);
321 if (res == PMINFO_R_OK)
323 SysLog(NID_APP, "pkgmgrinfo_appinfo_is_mainapp(): mainApp = [%d]", mainApp);
328 SysLog(NID_APP, "pkgmgrinfo_appinfo_is_mainapp() is failed. result = [%d]", res);
331 res = pkgmgrinfo_appinfo_is_nodisplay(__pAppInfoHandle, &menuIconVisible);
332 if (res == PMINFO_R_OK)
334 SysLog(NID_APP, "pkgmgrinfo_appinfo_is_nodisplay(): menuIconVisible = [%d]", menuIconVisible);
335 SetMenuIconVisible(!menuIconVisible);
339 SysLog(NID_APP, "pkgmgrinfo_appinfo_is_nodisplay() is failed. result = [%d]", res);
346 _PackageAppInfoImpl::CategoryHandler(const char* pCategoryName, void* pUserData)
348 SysTryReturn(NID_APP, pCategoryName != null, 0, E_SYSTEM, "[E_SYSTEM] pCategoryName must not be null.");
350 SysLog(NID_APP, "Category = [%s]", pCategoryName);
351 ArrayList* pList = (ArrayList*) pUserData;
353 String* pCategory = new (std::nothrow) String (pCategoryName);
354 SysTryReturn(NID_APP, pCategory != null, 0, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] pCategory instance must not be null.");
356 pList->Add(*pCategory);
362 _PackageAppInfoImpl::_PackageAppInfoImpl(void)
363 : __launchingIconVisible(true)
365 , __fromDatabase(false)
366 , __pLaunchConditionImplList(null)
367 , __pNotificationImplList(null)
368 , __pAppFeatureImplList(null)
369 , __pDataControlImplList(null)
370 , __pAppControlImplList(null)
371 , __pAppCategoryList(null)
375 ,__pAppInfoHandle(null)
377 __pLaunchConditionImplList = new (std::nothrow) ArrayList;
378 SysTryReturnVoidResult(NID_APP, __pLaunchConditionImplList != null, E_OUT_OF_MEMORY, "__pLaunchConditionImplList instance must not be null.");
379 __pLaunchConditionImplList->Construct();
381 __pNotificationImplList = new (std::nothrow) ArrayList;
382 SysTryReturnVoidResult(NID_APP, __pNotificationImplList != null, E_OUT_OF_MEMORY, "__pNotificationImplList instance must not be null.");
383 __pNotificationImplList->Construct();
385 __pAppFeatureImplList = new (std::nothrow) ArrayList;
386 SysTryReturnVoidResult(NID_APP, __pAppFeatureImplList != null, E_OUT_OF_MEMORY, "__pAppFeatureImplList instance must not be null.");
387 __pAppFeatureImplList->Construct();
389 __pDataControlImplList = new (std::nothrow) ArrayList;
390 SysTryReturnVoidResult(NID_APP, __pDataControlImplList != null, E_OUT_OF_MEMORY, "__pDataControlImplList instance must not be null.");
391 __pDataControlImplList->Construct();
393 __pAppControlImplList = new (std::nothrow) ArrayList;
394 SysTryReturnVoidResult(NID_APP, __pAppControlImplList != null, E_OUT_OF_MEMORY, "__pAppControlImplList instance must not be null.");
395 __pAppControlImplList->Construct();
397 __pAppCategoryList = new (std::nothrow) ArrayList;
398 SysTryReturnVoidResult(NID_APP, __pAppCategoryList != null, E_OUT_OF_MEMORY, "__pAppCategoryList instance must not be null.");
399 __pAppCategoryList->Construct();
401 __pNameList = new (std::nothrow) HashMap;
402 SysTryReturnVoidResult(NID_APP, __pNameList != null, E_OUT_OF_MEMORY, "__pNameList instance must not be null.");
403 __pNameList->Construct();
407 _PackageAppInfoImpl::~_PackageAppInfoImpl(void)
409 __pLaunchConditionImplList->RemoveAll(true);
410 delete __pLaunchConditionImplList;
412 __pNotificationImplList->RemoveAll(true);
413 delete __pNotificationImplList;
415 __pAppFeatureImplList->RemoveAll(true);
416 delete __pAppFeatureImplList;
418 __pDataControlImplList->RemoveAll(true);
419 delete __pDataControlImplList;
421 __pAppControlImplList->RemoveAll(true);
422 delete __pAppControlImplList;
424 __pAppCategoryList->RemoveAll(true);
425 delete __pAppCategoryList;
427 __pNameList->RemoveAll(true);
430 if (__pAppInfoHandle)
432 pkgmgrinfo_appinfo_destroy_appinfo(__pAppInfoHandle);
437 _PackageAppInfoImpl::GetName(void) const
443 _PackageAppInfoImpl::SetName(const String& name)
450 _PackageAppInfoImpl::GetType(void) const
456 _PackageAppInfoImpl::SetType(const String& type)
463 _PackageAppInfoImpl::GetDefault(void) const
469 _PackageAppInfoImpl::SetDefault(const String& defaultApp)
471 __default = defaultApp;
476 _PackageAppInfoImpl::GetLaunchConditionListN(void) const
478 result r = E_SUCCESS;
480 DbStatement* pStmt = null;
481 DbEnumerator* pEnum = null;
484 ArrayList* pList = null;
486 query.Format(1024, L"SELECT * FROM LaunchCondition WHERE ID = %d", GetUniqueId());
488 r = db.Construct(PACKAGE_DATABASE_FILE_NAME, "r");
489 SysTryCatch(NID_APP, r == E_SUCCESS, , r, "[%s] An error occurs while opening a database.", GetErrorMessage(r));
491 pStmt = db.CreateStatementN(query);
492 SysTryCatch(NID_APP, pStmt != null, GetLastResult(),
493 GetLastResult(), "[%s] An error occurs while creating a database statement.", GetErrorMessage(GetLastResult()));
495 pEnum = db.ExecuteStatementN(*pStmt);
498 pList = new (std::nothrow) ArrayList;
499 SysTryReturn(NID_APP, pList != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory");
502 while (pEnum->MoveNext() == E_SUCCESS)
504 _LaunchConditionInfoImpl* pLaunchConditionImpl = new (std::nothrow) _LaunchConditionInfoImpl;
505 SysTryReturn(NID_APP, pLaunchConditionImpl != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory");
510 pEnum->GetStringAt(1, name);
511 pEnum->GetStringAt(2, value);
513 pLaunchConditionImpl->SetName(name);
514 pLaunchConditionImpl->SetValue(value);
516 pList->Add(*pLaunchConditionImpl);
527 _PackageAppInfoImpl::GetLaunchConditionList(void) const
529 return __pLaunchConditionImplList;
533 _PackageAppInfoImpl::AddLaunchCondition(const _LaunchConditionInfoImpl& launchConditionImpl)
535 result r = E_SUCCESS;
536 r = __pLaunchConditionImplList->Add(launchConditionImpl);
537 SysTryReturnResult(NID_APP, !IsFailed(r), r, "__pLaunchConditionImplList->Add() is failed.");
543 _PackageAppInfoImpl::GetNotificationListN(void) const
545 result r = E_SUCCESS;
547 DbStatement* pStmt = null;
548 DbEnumerator* pEnum = null;
551 ArrayList* pList = null;
553 query.Format(1024, L"SELECT * FROM Notification WHERE ID = %d", GetUniqueId());
555 r = db.Construct(PACKAGE_DATABASE_FILE_NAME, "r");
556 SysTryCatch(NID_APP, r == E_SUCCESS, , r, "[%s] An error occurs while opening a database.", GetErrorMessage(r));
558 pStmt = db.CreateStatementN(query);
559 SysTryCatch(NID_APP, pStmt != null, GetLastResult(),
560 GetLastResult(), "[%s] An error occurs while creating a database statement.", GetErrorMessage(GetLastResult()));
562 pEnum = db.ExecuteStatementN(*pStmt);
565 pList = new (std::nothrow) ArrayList;
566 SysTryReturn(NID_APP, pList != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory");
569 while (pEnum->MoveNext() == E_SUCCESS)
571 _NotificationInfoImpl* pNotificationImpl = new (std::nothrow) _NotificationInfoImpl;
572 SysTryReturn(NID_APP, pNotificationImpl != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory");
577 pEnum->GetStringAt(1, name);
578 pEnum->GetStringAt(2, value);
580 pNotificationImpl->SetName(name);
581 pNotificationImpl->SetValue(value);
583 pList->Add(*pNotificationImpl);
594 _PackageAppInfoImpl::GetNotificationList(void) const
596 return __pNotificationImplList;
600 _PackageAppInfoImpl::AddNotification(const _NotificationInfoImpl& notificationImpl)
602 result r = E_SUCCESS;
603 r = __pNotificationImplList->Add(notificationImpl);
604 SysTryReturnResult(NID_APP, !IsFailed(r), r, "__pNotificationImplList->Add() is failed.");
610 _PackageAppInfoImpl::GetAppFeatureListN(void) const
612 result r = E_SUCCESS;
614 DbStatement* pStmt = null;
615 DbEnumerator* pEnum = null;
618 ArrayList* pList = null;
620 query.Format(1024, L"SELECT * FROM AppFeature WHERE ID = %d", GetUniqueId());
622 r = db.Construct(PACKAGE_DATABASE_FILE_NAME, "r");
623 SysTryCatch(NID_APP, r == E_SUCCESS, , r, "[%s] An error occurs while opening a database.", GetErrorMessage(r));
625 pStmt = db.CreateStatementN(query);
626 SysTryCatch(NID_APP, pStmt != null, GetLastResult(),
627 GetLastResult(), "[%s] An error occurs while creating a database statement.", GetErrorMessage(GetLastResult()));
629 pEnum = db.ExecuteStatementN(*pStmt);
632 pList = new (std::nothrow) ArrayList;
633 SysTryReturn(NID_APP, pList != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory");
636 while (pEnum->MoveNext() == E_SUCCESS)
638 _AppFeatureInfoImpl* pAppFeatureImpl = new (std::nothrow) _AppFeatureInfoImpl;
639 SysTryReturn(NID_APP, pAppFeatureImpl != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory");
644 pEnum->GetStringAt(1, name);
645 pEnum->GetStringAt(2, value);
647 pAppFeatureImpl->SetName(name);
648 pAppFeatureImpl->SetValue(value);
650 pList->Add(*pAppFeatureImpl);
661 _PackageAppInfoImpl::GetAppFeatureList(void) const
663 return __pAppFeatureImplList;
666 HashMapT<String, _AppFeatureInfoImpl*>*
667 _PackageAppInfoImpl::GetAppFeatureMapN(void) const
669 result r = E_SUCCESS;
671 DbEnumerator* pEnum = null;
674 HashMapT<String, _AppFeatureInfoImpl*>* pMap = null;
676 query.Format(1024, L"SELECT * FROM AppFeature WHERE ID = %d", GetUniqueId());
678 r = db.Construct(PACKAGE_DATABASE_FILE_NAME, "r");
679 SysTryReturn(NID_APP, r == E_SUCCESS, null, r, "[%s] An error occurs while opening a database.", GetErrorMessage(r));
681 const DbStatement* pStmt = db.CreateStatementN(query);
682 SysTryCatch(NID_APP, pStmt != null, GetLastResult(),
683 GetLastResult(), "[%s] An error occurs while creating a database statement.", GetErrorMessage(GetLastResult()));
685 pEnum = db.ExecuteStatementN(*pStmt);
688 pMap = new (std::nothrow) HashMapT<String, _AppFeatureInfoImpl*>;
689 SysTryReturn(NID_APP, pMap != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory");
695 while (pEnum->MoveNext() == E_SUCCESS)
697 _AppFeatureInfoImpl* pAppFeatureImpl = new (std::nothrow) _AppFeatureInfoImpl;
698 SysTryReturn(NID_APP, pAppFeatureImpl != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory");
700 pEnum->GetStringAt(1, name);
701 pEnum->GetStringAt(2, value);
703 pAppFeatureImpl->SetName(name);
704 pAppFeatureImpl->SetValue(value);
706 pMap->Add(name, pAppFeatureImpl);
717 _PackageAppInfoImpl::AddAppFeature(const _AppFeatureInfoImpl& appFeatureImpl)
719 result r = E_SUCCESS;
720 r = __pAppFeatureImplList->Add(appFeatureImpl);
721 SysTryReturnResult(NID_APP, !IsFailed(r), r, "__pAppFeatureImplList->Add() is failed.");
727 _PackageAppInfoImpl::GetDataControlListN(void) const
733 _PackageAppInfoImpl::GetDataControlList(void) const
735 return __pDataControlImplList;
739 _PackageAppInfoImpl::AddDataControl(_DataControlInfoImpl* pDataControl)
741 result r = E_SUCCESS;
742 r = __pDataControlImplList->Add(*pDataControl);
743 SysTryReturnResult(NID_APP, !IsFailed(r), r, "__pDataControlImplList->Add() is failed.");
749 _PackageAppInfoImpl::GetAppControlListN(void) const
755 _PackageAppInfoImpl::GetAppControlList(void) const
757 return __pAppControlImplList;
761 _PackageAppInfoImpl::AddAppControl(_AppControlInfoImpl* pAppControl)
763 result r = E_SUCCESS;
764 r = __pAppControlImplList->Add(*pAppControl);
765 SysTryReturnResult(NID_APP, !IsFailed(r), r, "__pAppControlImplList->Add() is failed.");
771 _PackageAppInfoImpl::GetPackageName(void) const
773 return __packageName;
777 _PackageAppInfoImpl::SetPackageName(const String& packageName)
779 __packageName = packageName;
784 _PackageAppInfoImpl::GetMainmenuIcon(void) const
786 return __mainmenuIcon;
790 _PackageAppInfoImpl::SetMainmenuIcon(const String& mainmenuIcon)
792 __mainmenuIcon = mainmenuIcon;
797 _PackageAppInfoImpl::GetSettingIcon(void) const
799 return __settingIcon;
803 _PackageAppInfoImpl::SetSettingIcon(const String& setting)
805 __settingIcon = setting;
810 _PackageAppInfoImpl::GetQuickpanelIcon(void) const
812 return __quickpanelIcon;
816 _PackageAppInfoImpl::SetQuickpanelIcon(const String& quickpanelIcon)
818 __quickpanelIcon = quickpanelIcon;
823 _PackageAppInfoImpl::IsMainmenuVisible(void) const
825 return __launchingIconVisible;
829 _PackageAppInfoImpl::SetMainmenuVisible(bool visible)
831 __launchingIconVisible = visible;
836 _PackageAppInfoImpl::AddName(const String& language, const String& name)
838 result r = E_SUCCESS;
839 r = __pNameList->Add(language, name);
845 _PackageAppInfoImpl::GetNameList(void) const
851 _PackageAppInfoImpl::GetUniqueId(void) const
853 result r = E_SUCCESS;
855 DbStatement* pStmt = null;
856 DbEnumerator* pEnum = null;
860 query.Format(1024, L"SELECT UNIQUE_ID FROM AppInfo WHERE APP_NAME = '%ls' and ID = %d", __name.GetPointer(), __pkgId);
862 r = db.Construct(PACKAGE_DATABASE_FILE_NAME, "r");
863 SysTryCatch(NID_APP, r == E_SUCCESS, , r, "[%s] An error occurs while opening a database.", GetErrorMessage(r));
865 pStmt = db.CreateStatementN(query);
866 SysTryCatch(NID_APP, pStmt != null, GetLastResult(),
867 GetLastResult(), "[%s] An error occurs while creating a database statement.", GetErrorMessage(GetLastResult()));
869 pEnum = db.ExecuteStatementN(*pStmt);
872 if (pEnum->MoveNext() == E_SUCCESS)
874 pEnum->GetIntAt(0, uniqueId);
890 _PackageAppInfoImpl::GetPkgId(void) const
896 _PackageAppInfoImpl::SetUniqueId(int id)
903 _PackageAppInfoImpl::SetPkgId(int id)
910 _PackageAppInfoImpl::GetAppFeature(void) const
916 _PackageAppInfoImpl::SetAppFeature(int feature)
918 __appFeature = feature;
922 _LaunchConditionInfoImpl::_LaunchConditionInfoImpl(void)
927 _LaunchConditionInfoImpl::~_LaunchConditionInfoImpl(void)
933 _LaunchConditionInfoImpl::GetName(void) const
939 _LaunchConditionInfoImpl::SetName(const String& name)
946 _LaunchConditionInfoImpl::GetValue(void) const
952 _LaunchConditionInfoImpl::SetValue(const String& value)
958 _NotificationInfoImpl::_NotificationInfoImpl(void)
963 _NotificationInfoImpl::~_NotificationInfoImpl(void)
969 _NotificationInfoImpl::GetName(void) const
975 _NotificationInfoImpl::SetName(const String& name)
982 _NotificationInfoImpl::GetValue(void) const
988 _NotificationInfoImpl::SetValue(const String& value)
994 _AppFeatureInfoImpl::_AppFeatureInfoImpl(void)
999 _AppFeatureInfoImpl::~_AppFeatureInfoImpl(void)
1005 _AppFeatureInfoImpl::GetName(void) const
1011 _AppFeatureInfoImpl::SetName(const String& name)
1018 _AppFeatureInfoImpl::GetValue(void) const
1024 _AppFeatureInfoImpl::SetValue(const String& value)
1030 _DataControlTypeImpl::_DataControlTypeImpl(void)
1035 _DataControlTypeImpl::~_DataControlTypeImpl(void)
1041 _DataControlTypeImpl::GetType(void) const
1047 _DataControlTypeImpl::SetType(const String& type)
1054 _DataControlTypeImpl::GetAccess(void) const
1060 _DataControlTypeImpl::SetAccess(const String& access)
1066 _DataControlInfoImpl::_DataControlInfoImpl(void)
1067 : __pControlTypeList(null)
1069 __pControlTypeList = new (std::nothrow) ArrayList;
1070 SysTryReturnVoidResult(NID_APP, __pControlTypeList != null, E_OUT_OF_MEMORY, "__pControlTypeList instance must not be null.");
1071 __pControlTypeList->Construct();
1074 _DataControlInfoImpl::~_DataControlInfoImpl(void)
1076 __pControlTypeList->RemoveAll(true);
1077 delete __pControlTypeList;
1081 _DataControlInfoImpl::GetProviderId(void) const
1083 return __providerId;
1087 _DataControlInfoImpl::SetProviderId(const String& providerId)
1089 __providerId = providerId;
1094 _DataControlInfoImpl::GetControlTypeList(void) const
1096 return __pControlTypeList;
1100 _DataControlInfoImpl::AddControlType(_DataControlTypeImpl* pControlType)
1102 __pControlTypeList->Add(*pControlType);
1106 _AppControlResolutionInfoImpl::_AppControlResolutionInfoImpl(void)
1107 : __pUriScheme(null)
1113 _AppControlResolutionInfoImpl::~_AppControlResolutionInfoImpl(void)
1115 delete __pUriScheme;
1120 _AppControlResolutionInfoImpl::GetUriScheme(void) const
1122 return __pUriScheme;
1126 _AppControlResolutionInfoImpl::SetUriScheme(String* pUriScheme)
1128 __pUriScheme = pUriScheme;
1133 _AppControlResolutionInfoImpl::GetMimeType(void) const
1139 _AppControlResolutionInfoImpl::SetMimeType(String* pMimeType)
1141 __pMimeType = pMimeType;
1145 _AppControlCapabilityInfoImpl::_AppControlCapabilityInfoImpl(void)
1148 ,__pResolutionList(null)
1150 __pResolutionList = new (std::nothrow) ArrayList;
1151 SysTryReturnVoidResult(NID_APP, __pResolutionList != null, E_OUT_OF_MEMORY, "__pResolutionList instance must not be null.");
1152 __pResolutionList->Construct();
1155 _AppControlCapabilityInfoImpl::~_AppControlCapabilityInfoImpl(void)
1157 __pResolutionList->RemoveAll(true);
1158 delete __pResolutionList;
1162 _AppControlCapabilityInfoImpl::GetUniqueId(void) const
1168 _AppControlCapabilityInfoImpl::SetUniqueId(int uniqueId)
1170 __uniqueId = uniqueId;
1175 _AppControlCapabilityInfoImpl::GetAppControlId(void) const
1177 return __appControlId;
1181 _AppControlCapabilityInfoImpl::SetAppControlId(int appControlId)
1183 __appControlId = appControlId;
1188 _AppControlCapabilityInfoImpl::GetOperationId(void) const
1190 return __operationId;
1194 _AppControlCapabilityInfoImpl::SetOperationId(const String& operationId)
1196 __operationId = operationId;
1201 _AppControlCapabilityInfoImpl::GetResolutionList(void) const
1203 return __pResolutionList;
1207 _AppControlCapabilityInfoImpl::AddResolution(_AppControlResolutionInfoImpl* pResolutionImpl)
1209 result r = E_SUCCESS;
1210 r = __pResolutionList->Add(*pResolutionImpl);
1211 SysTryReturnResult(NID_APP, !IsFailed(r), r, "__pResolutionList->Add() is failed.");
1216 _AppControlInfoImpl::_AppControlInfoImpl(void)
1218 ,__pCapabilityList(null)
1220 __pCapabilityList = new (std::nothrow) ArrayList;
1221 SysTryReturnVoidResult(NID_APP, __pCapabilityList != null, E_OUT_OF_MEMORY, "__pCapabilityList instance must not be null.");
1222 __pCapabilityList->Construct();
1225 _AppControlInfoImpl::~_AppControlInfoImpl(void)
1227 __pCapabilityList->RemoveAll(true);
1228 delete __pCapabilityList;
1232 _AppControlInfoImpl::GetUniqueId(void) const
1238 _AppControlInfoImpl::SetUniqueId(int uniqueId)
1240 __uniqueId = uniqueId;
1245 _AppControlInfoImpl::GetProviderId(void) const
1247 return __providerId;
1251 _AppControlInfoImpl::SetProviderId(const String& providerId)
1253 __providerId = providerId;
1258 _AppControlInfoImpl::GetCategory(void) const
1264 _AppControlInfoImpl::SetCategory(const String& category)
1266 __category = category;
1271 _AppControlInfoImpl::GetCapabilityList(void) const
1273 return __pCapabilityList;
1277 _AppControlInfoImpl::AddCapability(_AppControlCapabilityInfoImpl* pCapability)
1279 result r = E_SUCCESS;
1280 r = __pCapabilityList->Add(*pCapability);
1281 SysTryReturnResult(NID_APP, !IsFailed(r), r, "__pCapabilityList->Add() is failed.");
1286 } } } // Tizen::App::Package