/* The object that handles DNS resolution. Use g_resolver_get_default() to get  */
G_DEFINE_TYPE_WITH_CODE(GResolver, g_resolver, G_TYPE_OBJECT, g_networking_init();)
/* The object that handles DNS resolution. Use g_resolver_get_default() to get  */
G_DEFINE_TYPE_WITH_CODE(GResolver, g_resolver, G_TYPE_OBJECT, g_networking_init();)
{
  const gchar *hostname;
  guint16 port, priority, weight;
  GSrvTarget *target;
  GList *l;
  for (l = records; l != NULL; l = g_list_next (l))
    {
      g_variant_get (l->data, "(qqq&s)", &priority, &weight, &port, &hostname);
      target = g_srv_target_new (hostname, port, priority, weight);
      g_variant_unref (l->data);
      l->data = target;
    }
  return g_srv_target_list_sort (records);
}