[Telepathy] tp_cli_connection_manager_run_request_connection(): What parameter types.

Murray Cumming murrayc at murrayc.com
Fri Oct 24 09:17:45 PDT 2008


The GHashTable* in_parameters argument for
tp_cli_connection_manager_run_request_connection()
http://library.gnome.org/devel/telepathy-glib/unstable/telepathy-glib-connection-manager.html#tp-cli-connection-manager-run-request-connection
is documented as "A dictionary mapping parameter name to the variant
boxed value"

That looks like D-Bus language. So what types should I use with
telepathy-glib? Just using a string leads to a crash in
marshal_variant() in D-Bus:

  gchar* service_name = NULL;
  gchar* dbus_path = NULL;
  GHashTable *parameters = g_hash_table_new (NULL, NULL);
  g_hash_table_insert (parameters, "s:account", "murrayc at murrayc.com");
  g_hash_table_insert (parameters, "s:server", "murrayc.com");
  g_hash_table_insert (parameters, "s:password", "TODO");
  gboolean success = 
    tp_cli_connection_manager_run_request_connection
(connection_manager, 
      -1, /* timeout */
     "jabber", /* in_Protocol */
     parameters, /* in_Parameters */
     &service_name, /* out0 */
     &dbus_path, /* out1 */
     &error, 
     NULL /* mainloop */);


-- 
murrayc at murrayc.com
www.murrayc.com
www.openismus.com



More information about the Telepathy mailing list