/*
 * call-seq:
 *      server_caps
 *
 * Queries the server for its capabilities and returns them in an Array
 */
static VALUE
_wrap_notify_get_server_caps(VALUE self)
{
  GList *caps = NULL;
  VALUE rb_caps;

  caps = notify_get_server_caps();
  rb_caps = rb_ary_new();

  do
  {
      rb_ary_push(rb_caps, rb_str_new2(caps->data));
      caps = caps->next;
  } while(caps != NULL);

  g_list_foreach(caps, (GFunc)g_free, NULL);
  g_list_free(caps);

  return rb_caps;
}