EXPORT_API int mdg_group_delete(mdg_h handle, mdg_group_h group)
{
int ret = MDG_ERROR_NONE;
+ GError *error = NULL;
CHECK_FEATURE_SUPPORTED(MDG_FEATURE);
- NOTUSED(handle);
- NOTUSED(group);
+ mdg_manager_s *_handle = handle;
+ mdg_check_null_ret_error("handle", handle, MDG_ERROR_INVALID_PARAMETER);
+
+ mdg_group_s *grp = (mdg_group_s *)group;
+ mdg_check_null_ret_error("grp", grp, MDG_ERROR_INVALID_PARAMETER);
+
+ group_call_delete_sync(_handle->group_proxy, grp->group_name, &ret, NULL,
+ &error);
+ if (error) {
+ _ERR("Failed DBus call [%s]", error->message);
+ g_error_free(error);
+ ret = MDG_ERROR_IO_ERROR;
+ }
return ret;
}
<arg type="i" name="result" direction="out" />
</method>
<method name="Delete">
- <arg type="i" name="group_count" direction="out" />
- <arg type="aa{sv}" name="groups" direction="out" />
- <arg type="i" name="result" direction="out" />
+ <arg type="s" name="group_name" direction="in"/>
+ <arg type="i" name="result" direction="out"/>
</method>
<method name="DeviceFind">
<arg type="i" name="timeout" direction="in" />
{ "4", "Show Found Group(s)", NULL, run_group_show_found , NULL },
{ "5", "Join Group (Not yet developed)", menu_group_join, NULL, NULL },
{ "6", "Leave Group (Not yet developed)", menu_group_leave, NULL, NULL },
- { "7", "Delete Group (Not yet developed)", menu_group_delete, NULL, NULL },
+ { "7", "Delete Group", menu_group_delete, NULL, NULL },
{ "8", "Find Device(s)", menu_devices_find, NULL, NULL },
{ "9", "Show Found Device(s)", NULL, run_device_show_found, NULL },
{ "10", "Invite Device", menu_group_invite_device, NULL, NULL },