hi, everyone:<br><br> I have a problem when I try to get group members of contactlist. Now I can create account and have already got the connection interface and can list channels of the connection, also can get channel
interface--org.freedesktop.Telepathy.Channel.Type.ContactList, but when I try to get the members of the contacelist, I don't know how to thansfer the parameter--DBusGProxy *proxy?<br><br> For implementations of the interface
org.freedesktop.Telepathy.channel.type.contacetlist<font><font size="2"> must also implement </font></font>org.freedesktop.Telepathy.channel and org.freedesktop.Telepathy.channel<font><font><font><font size="2">.interface.group.
</font></font></font></font>I try to request channel list by the interface --org.freedesktop.Telepathy.Channel.Type.ContactList, using the TpConn which I already got, it generates "Segmentation fault", I don't know why, please help me, thank you.
<br><br> some source and result as follow:<br><br><br> <a href="http://1.mc">1.mc</a> = mission_control_new ( tp_get_bus() );<br> 2.tp_cm = mission_control_get_connection(mc, account, &new_error); //account I have already create correctly
<br> 3.tp_conn_get_status(DBUS_G_PROXY(tp_cm), &status, &new_error)---//the status is connected
<br> 4.tp_conn_request_handles(DBUS_G_PROXY(tp_cm), TP_HANDLE_TYPE_CONTACT, hdl_names, &hdl_list, &new_error)//hdl_list as follow:<br> guint i = 0;<br> for ( ; i < hdl_list->len; i++ ) {
<br> guint handler = g_array_index(hdl_list, guint, i);<br> g_debug("handler_name: %s handler: %d", hdl_names[i], handler);<br>
mission_control_request_channel (mc, account, TP_IFACE_CHANNEL_TYPE_TEXT, handler,<br> TP_HANDLE_TYPE_CONTACT, NULL, NULL);
<br> }<br><br> ** (process:804): DEBUG: handler_name: <a href="mailto:tester1@ch-zlj.rd.francetelecom.fr" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
tester1@ch-zlj.rd.fr</a> handler: 1
<br><br> 5.tp_conn_list_channels(DBUS_G_PROXY(tp_cm), &channel_list, &new_error)//channel_list as follow:<br> for(i=0; i < channel_list->len; i++) {<br> GValueArray *chan_struct;<br> const gchar *object_path;
<br> const gchar *chan_iface;<br> TelepathyHandleType handle_type;<br> guint handle;<br><br> chan_struct = g_ptr_array_index (channel_list, i);<br> object_path = g_value_get_boxed (g_value_array_get_nth (chan_struct, 0));
<br> chan_iface = g_value_get_string (g_value_array_get_nth (chan_struct, 1));<br> handle_type = g_value_get_uint (g_value_array_get_nth (chan_struct, 2));<br> handle = g_value_get_uint (g_value_array_get_nth (chan_struct, 3));
<br><br> g_debug("object_path: %s", object_path);<br> g_debug("chan_iface : %s", chan_iface);<br> g_debug("handle_type: %d", handle_type);<br> g_debug("handle : %d", handle);
<br><br> g_value_array_free (chan_struct);<br> }<br> <br>** (process:804): DEBUG: object_path: /org/freedesktop/Telepathy/Connection/gabble/jabber/tester1_40ch_2dzlj_2erd_2efrancetelecom_2efr_2fTelepathy/RosterChannel/Group/zzz
<br>** (process:804): DEBUG: chan_iface : org.freedesktop.Telepathy.Channel.Type.ContactList<br>** (process:804): DEBUG: handle_type: 4<br>** (process:804): DEBUG: handle : 1<br>** (process:804): DEBUG: object_path: /org/freedesktop/Telepathy/Connection/gabble/jabber/tester1_40ch_2dzlj_2erd_2efrancetelecom_2efr_2fTelepathy/RosterChannel/Group/co_2dworkers
<br>** (process:804): DEBUG: chan_iface : org.freedesktop.Telepathy.Channel.Type.ContactList<br>** (process:804): DEBUG: handle_type: 4<br>** (process:804): DEBUG: handle : 2<br>** (process:804): DEBUG: object_path: /org/freedesktop/Telepathy/Connection/gabble/jabber/tester1_40ch_2dzlj_2erd_2efrancetelecom_2efr_2fTelepathy/RosterChannel/List/publish
<br>** (process:804): DEBUG: chan_iface : org.freedesktop.Telepathy.Channel.Type.ContactList<br>** (process:804): DEBUG: handle_type: 3<br>** (process:804): DEBUG: handle : 1<br>** (process:804): DEBUG: object_path: /org/freedesktop/Telepathy/Connection/gabble/jabber/tester1_40ch_2dzlj_2erd_2efrancetelecom_2efr_2fTelepathy/RosterChannel/List/subscribe
<br>** (process:804): DEBUG: chan_iface : org.freedesktop.Telepathy.Channel.Type.ContactList<br>** (process:804): DEBUG: handle_type: 3<br>** (process:804): DEBUG: handle : 2<br>** (process:804): DEBUG: object_path: /org/freedesktop/Telepathy/Connection/gabble/jabber/tester1_40ch_2dzlj_2erd_2efrancetelecom_2efr_2fTelepathy/RosterChannel/List/known
<br>** (process:804): DEBUG: chan_iface : org.freedesktop.Telepathy.Channel.Type.ContactList<br>** (process:804): DEBUG: handle_type: 3<br>** (process:804): DEBUG: handle : 3<br>** (process:804): DEBUG: object_path: /org/freedesktop/Telepathy/Connection/gabble/jabber/tester1_40ch_2dzlj_2erd_2efrancetelecom_2efr_2fTelepathy/ImChannel1
<br>** (process:804): DEBUG: chan_iface : org.freedesktop.Telepathy.Channel.Type.Text<br>** (process:804): DEBUG: handle_type: 1<br>** (process:804): DEBUG: handle : 1<br><br><br>6.Then I try to get members<br> gchar *object_path;
<br> const gchar *bus_name;<br> TpChan *new_chan;<br> if (!tp_conn_request_channel (DBUS_G_PROXY (tp_cm),<br> TP_IFACE_CHANNEL_TYPE_CONTACT_LIST,<br> TP_HANDLE_TYPE_GROUP,
<br> handle_test,<br> FALSE,<br> &object_path,<br> &new_error)) {<br> g_debug ("Couldn't request channel: %s",
<br> new_error ? new_error->message : "No error given");<br> g_clear_error (&new_error);<br> g_object_unref (mc);<br> g_object_unref (tp_cm);<br> return;<br> }
<br><br> bus_name = dbus_g_proxy_get_bus_name (DBUS_G_PROXY (tp_cm));<br> new_chan = tp_chan_new (tp_get_bus (),<br> bus_name,<br> object_path,<br> TP_IFACE_CHANNEL_TYPE_CONTACT_LIST,
<br> TP_HANDLE_TYPE_GROUP,<br> handle);//<span style="color: rgb(255, 0, 0);">when I use handle 0, the result is "Segmentation fault"</span><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">
when I use handle 3, the result is "Couldn't request channel: invalid handle 3"</span><br><br><br> GArray *member_list = NULL;<br> tp_chan_iface_group_get_members (DBUS_G_PROXY(new_chan),
<br> &member_list, <br> &new_error);<br><br><br><br><br><br><br><br><br> <br>
<br><br> --tiny