gboolean group_device_eject(Group *group, GDBusMethodInvocation *invocation,
gchar *uuid, gpointer user_data);
+gboolean group_get_remote_device(Group *group, GDBusMethodInvocation *invocation,
+ gpointer user_data);
+
void notify_group_found(GVariant *group_data);
void notify_group_finish(int ret);
void notify_device_found(int device_count, GVariant *device_data);
int comp_group_dismiss(gchar *uuid);
void comp_group_notify_group_dismiss(int result);
+GVariant *comp_group_get_remote_mot_enabled_devices();
+int comp_group_get_mot_device_count();
+
/* Join to remote device group */
-int comp_group_get_remote_groups(/* callback */); //Get all of group in network (Async)
int comp_group_join_to(/* callback */); //Join this device to in certain remote group (Async)
int comp_group_leave_from(/* callback */); //leave from certain remote group (Async)
G_CALLBACK(group_device_eject),
NULL);
+ g_signal_connect(group_skeleton,
+ "handle-get-remote-device",
+ G_CALLBACK(group_get_remote_device),
+ NULL);
+
group = g_dbus_object_manager_server_new(COMP_DBUS_GROUP_PATH);
// Set connection to 'manager'
return TRUE;
}
+gboolean group_get_remote_device(Group *group, GDBusMethodInvocation *invocation,
+ gpointer user_data)
+{
+ int dev_count = 0;
+ GVariant *device_data;
+
+ LOG_DEBUG("get remote device called using dbus successful");
+
+ dev_count = comp_group_get_mot_device_count();
+ device_data = comp_group_get_remote_mot_enabled_devices();
+
+ group_complete_get_remote_device(group, invocation, dev_count, device_data);
+
+ return TRUE;
+}
+
void notify_group_found(GVariant *group_data)
{
group_emit_group_found(group_dbus_get_object(), group_data);
return group_data;
}
+int comp_group_get_mot_device_count()
+{
+ if (mot_enb_dev_list)
+ return g_list_length(mot_enb_dev_list);
+
+ return 0;
+}
+
void comp_group_notify_mot_enable_device_done(int device_count)
{
GVariant *device_data;
}
/* Join to remote device group */
-int comp_group_get_remote_groups(/* callback */){} //Get all of group in network (Async)
+
int comp_group_join_to(/* callback */){} //Join this device to in certain remote group (Async)
int comp_group_leave_from(/* callback */){} //leave from certain remote group (Async)
<arg type="s" name="uuid" direction="in" />
<arg type="i" name="result" direction="out" />
</method>
+ <method name="GetRemoteDevice">
+ <arg type="i" name="device_count" direction="out" />
+ <arg type="aa{sv}" name="device_info" direction="out" />
+ </method>
<!-- Signal (D-Bus) definitions -->
<signal name="GroupFound">