Add a missing API
authorSangyoon Jang <jeremy.jang@samsung.com>
Thu, 25 Oct 2018 01:16:09 +0000 (10:16 +0900)
committer장상윤/Tizen Platform Lab(SR)/Engineer/삼성전자 <jeremy.jang@samsung.com>
Thu, 25 Oct 2018 01:44:58 +0000 (10:44 +0900)
Add capmgr_app_control_get_device().

Change-Id: Ie3a86199d2f61aa1027bdb9d10226e68b1f83495
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
src/client.cc

index 5356173..a2f05c3 100644 (file)
@@ -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)