X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=flx.h;h=8f8b0bac4c1ddcde36d486ea30862215d07dc90a;hb=fc174c871b4f85e558766c1ca55661fa7b1b4c9a;hp=331dd2623062e597d5aac6aa0bf4bbbd130452e5;hpb=0781d5363fb6fd723a2316fc7558aef6439b2f71;p=catta diff --git a/flx.h b/flx.h index 331dd26..8f8b0ba 100644 --- a/flx.h +++ b/flx.h @@ -4,7 +4,6 @@ #include #include -struct _flxServer; typedef struct _flxServer flxServer; #include "address.h" @@ -23,18 +22,14 @@ void flx_server_add( gboolean unique, flxRecord *r); -void flx_server_add_full( +void flx_server_add_ptr( flxServer *s, gint id, gint interface, guchar protocol, gboolean unique, const gchar *name, - guint16 class, - guint16 type, - gconstpointer data, - guint size, - guint32 ttl); + const gchar *dest); void flx_server_add_address( flxServer *s, @@ -52,11 +47,46 @@ void flx_server_add_text( guchar protocol, gboolean unique, const gchar *name, - const gchar *text); + ... /* text records, terminated by NULL */); + +void flx_server_add_text_va( + flxServer *s, + gint id, + gint interface, + guchar protocol, + gboolean unique, + const gchar *name, + va_list va); + +void flx_server_add_service( + flxServer *s, + gint id, + gint interface, + guchar protocol, + const gchar *type, + const gchar *name, + const gchar *domain, + const gchar *host, + guint16 port, + ... /* text records, terminated by NULL */); + +void flx_server_add_service_va( + flxServer *s, + gint id, + gint interface, + guchar protocol, + const gchar *type, + const gchar *name, + const gchar *domain, + const gchar *host, + guint16 port, + va_list va); + void flx_server_remove(flxServer *s, gint id); -void flx_server_send_query(flxServer *s, gint interface, guchar protocol, flxKey *k); +void flx_server_post_query(flxServer *s, gint interface, guchar protocol, flxKey *key); +void flx_server_post_response(flxServer *s, gint interface, guchar protocol, flxRecord *record); const flxRecord *flx_server_iterate(flxServer *s, gint id, void **state);