- I changed the method name from GetAppHandle to DetachAppHandle because it
moves container 'handle_list_'
Change-Id: I67868253c8b3527ef81a88380c28cee0559c65d3
Signed-off-by: jh9216.park <jh9216.park@samsung.com>
AppInfoDBHandler::~AppInfoDBHandler() {}
-std::vector<std::shared_ptr<application_x>> AppInfoDBHandler::GetAppHandle() {
+std::vector<std::shared_ptr<application_x>> AppInfoDBHandler::DetachAppHandle() {
return std::move(handle_list_);
}
public:
AppInfoDBHandler(uid_t uid, int pid);
virtual ~AppInfoDBHandler();
- std::vector<std::shared_ptr<application_x>> GetAppHandle();
+ std::vector<std::shared_ptr<application_x>> DetachAppHandle();
void SetFilter(pkgmgrinfo_filter_x* filter);
virtual int Execute();
db.SetFilter(const_cast<pkgmgrinfo_filter_x*>(parcel->GetFilter()));
int ret = db.Execute();
- result_ = std::make_shared<pcp::AppInfoParcelable>(ret, db.GetAppHandle());
+ result_ = std::make_shared<pcp::AppInfoParcelable>(ret, db.DetachAppHandle());
return true;
}
appinfo_db_handler.SetLocale("test_lang");
ASSERT_EQ(appinfo_db_handler.Execute(), 0);
- auto lappinfo_list = appinfo_db_handler.GetAppHandle();
+ auto lappinfo_list = appinfo_db_handler.DetachAppHandle();
ASSERT_EQ(lappinfo_list.size(), 1);
auto test_appinfo = GetTestApplication(appid);