File tree Expand file tree Collapse file tree 3 files changed +26
-0
lines changed
shell/platform/tizen/channels Expand file tree Collapse file tree 3 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -300,6 +300,23 @@ EncodableValue AppControl::SerializeToMap() {
300300 return EncodableValue (map);
301301}
302302
303+ AppControlResult AppControl::GetMatchedAppIds (EncodableList& list) {
304+ EncodableList app_ids;
305+ AppControlResult ret = app_control_foreach_app_matched (
306+ handle_,
307+ [](app_control_h app_control, const char * app_id,
308+ void * user_data) -> bool {
309+ auto app_ids = static_cast <EncodableList*>(user_data);
310+ app_ids->push_back (EncodableValue (app_id));
311+ return true ;
312+ },
313+ &app_ids);
314+ if (ret) {
315+ list = std::move (app_ids);
316+ }
317+ return ret;
318+ }
319+
303320AppControlResult AppControl::SendLaunchRequest () {
304321 return app_control_send_launch_request (handle_, nullptr , nullptr );
305322}
Original file line number Diff line number Diff line change @@ -89,6 +89,7 @@ class AppControl {
8989
9090 EncodableValue SerializeToMap ();
9191
92+ AppControlResult GetMatchedAppIds (EncodableList& list);
9293 AppControlResult SendLaunchRequest ();
9394 AppControlResult SendLaunchRequestWithReply (ReplyCallback on_reply);
9495 AppControlResult SendTerminateRequest ();
Original file line number Diff line number Diff line change @@ -99,6 +99,14 @@ void AppControlChannel::HandleMethodCall(
9999 if (method_name == " dispose" ) {
100100 AppControlManager::GetInstance ().Remove (app_control->id ());
101101 result->Success ();
102+ } else if (method_name == " getMatchedAppIds" ) {
103+ EncodableList app_ids;
104+ AppControlResult ret = app_control->GetMatchedAppIds (app_ids);
105+ if (ret) {
106+ result->Success (EncodableValue (app_ids));
107+ } else {
108+ result->Error (ret.code (), ret.message ());
109+ }
102110 } else if (method_name == " reply" ) {
103111 Reply (app_control, arguments, std::move (result));
104112 } else if (method_name == " sendLaunchRequest" ) {
You can’t perform that action at this time.
0 commit comments