From cc51a4f532e7a20d3ceaffeaf092b5895abf5f14 Mon Sep 17 00:00:00 2001 From: Sangyoon Jang Date: Thu, 25 Oct 2018 10:16:09 +0900 Subject: [PATCH] Add a missing API Add capmgr_app_control_get_device(). Change-Id: Ie3a86199d2f61aa1027bdb9d10226e68b1f83495 Signed-off-by: Sangyoon Jang --- src/client.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/client.cc b/src/client.cc index 5356173..a2f05c3 100644 --- a/src/client.cc +++ b/src/client.cc @@ -252,6 +252,18 @@ API int capmgr_app_control_destroy(capmgr_app_control_h app_control) { return CAPMGR_ERROR_NONE; } +API int capmgr_app_control_get_device(capmgr_app_control_h app_control, + capmgr_device_h* device) { + if (!app_control || !device) + return CAPMGR_ERROR_INVALID_PARAMETER; + + int ret = capmgr_device_clone(app_control->device, device); + if (ret != CAPMGR_ERROR_NONE) + return ret; + + return CAPMGR_ERROR_NONE; +} + API int capmgr_app_control_get_operation(capmgr_app_control_h app_control, char** operation) { if (!app_control || !operation) -- 2.7.4