return ret;
}
+EXPORT_API int mdg_set_preconfigured_pin(mdg_h handle, char *password)
+{
+ int ret = MDG_ERROR_NONE;
+ GError *error = NULL;
+
+ CHECK_FEATURE_SUPPORTED(MDG_FEATURE);
+
+ mdg_manager_s *_handle = handle;
+ mdg_check_null_ret_error("handle", handle, MDG_ERROR_INVALID_PARAMETER);
+ CHECK_HANDLE_IS_VALID(handle);
+
+ group_call_set_preconfigured_pin_sync(_handle->group_proxy, password, &ret, NULL, &error);
+
+ return ret;
+}
+
EXPORT_API int mdg_device_get_local_device(mdg_h handle,
mdg_device_h *device)
{
<arg type="s" name="uuid" direction="in" />
<arg type="i" name="result" direction="out" />
</method>
+ <method name="SetPreconfiguredPin">
+ <arg type="s" name="preconfigured_pin" direction="in" />
+ <arg type="i" name="result" direction="out" />
+ </method>
<!-- Signal (D-Bus) definitions -->
<signal name="Event">
<arg type="i" name="type" direction="out" />
return RET_SUCCESS;
}
+static int run_set_preconfigured_pin(MManager *mm, struct menu_data *menu)
+{
+ int ret = 0;
+
+ ret = mdg_set_preconfigured_pin(handle, pin);
+
+ msg(" - mdg_set_preconfigured_pin() ret: [0x%X] [%s]", ret, mdg_error_to_string(ret));
+
+ return RET_SUCCESS;
+}
+
static struct menu_data menu_group_create[] = {
{ "0", "Group Name", NULL, NULL, groupid },
{ "1", "Run", NULL, run_group_create, NULL },
{ NULL, NULL, },
};
+static struct menu_data menu_set_preconfigured_pin[] = {
+ { "0", "PIN", NULL, NULL, pin },
+ { "1", "Run", NULL, run_set_preconfigured_pin, NULL },
+ { NULL, NULL, },
+};
+
struct menu_data menu_mdg_manager[] = {
{ "1", "Show Local Device", NULL, run_device_show_local_device, NULL }, // O
{ "2", "Create Group", menu_group_create, NULL, NULL }, // 0
{ "18", "Unregist Channel", menu_unregist_channel, NULL, NULL },
{ "19", "Send Message", menu_send_data, NULL, NULL }, // 0
{ "20", "Send File", menu_send_file, NULL, NULL }, // 0
+ { "21", "Set Preconfigured PIN", menu_set_preconfigured_pin, NULL, NULL }, // 0
};