7 typedef struct _AvahiServer AvahiServer;
8 typedef struct _AvahiEntry AvahiEntry;
9 typedef struct _AvahiEntryGroup AvahiEntryGroup;
16 AVAHI_ENTRY_UNIQUE = 1,
17 AVAHI_ENTRY_NOPROBE = 2,
18 AVAHI_ENTRY_NOANNOUNCE = 4
22 AVAHI_ENTRY_GROUP_UNCOMMITED,
23 AVAHI_ENTRY_GROUP_REGISTERING,
24 AVAHI_ENTRY_GROUP_ESTABLISHED,
25 AVAHI_ENTRY_GROUP_COLLISION
26 } AvahiEntryGroupState;
28 typedef void (*AvahiEntryGroupCallback) (AvahiServer *s, AvahiEntryGroup *g, AvahiEntryGroupState state, gpointer userdata);
30 AvahiServer *avahi_server_new(GMainContext *c);
31 void avahi_server_free(AvahiServer* s);
33 const AvahiRecord *avahi_server_iterate(AvahiServer *s, AvahiEntryGroup *g, void **state);
34 void avahi_server_dump(AvahiServer *s, FILE *f);
36 AvahiEntryGroup *avahi_entry_group_new(AvahiServer *s, AvahiEntryGroupCallback callback, gpointer userdata);
37 void avahi_entry_group_free(AvahiEntryGroup *g);
38 void avahi_entry_group_commit(AvahiEntryGroup *g);
39 AvahiEntryGroupState avahi_entry_group_get_state(AvahiEntryGroup *g);
41 void avahi_server_add(
46 AvahiEntryFlags flags,
49 void avahi_server_add_ptr(
54 AvahiEntryFlags flags,
58 void avahi_server_add_address(
63 AvahiEntryFlags flags,
67 void avahi_server_add_text(
72 AvahiEntryFlags flags,
74 ... /* text records, terminated by NULL */);
76 void avahi_server_add_text_va(
81 AvahiEntryFlags flags,
85 void avahi_server_add_text_strlst(
90 AvahiEntryFlags flags,
92 AvahiStringList *strlst);
94 void avahi_server_add_service(
104 ... /* text records, terminated by NULL */);
106 void avahi_server_add_service_va(
118 void avahi_server_add_service_strlst(
128 AvahiStringList *strlst);
131 AVAHI_SUBSCRIPTION_NEW,
132 AVAHI_SUBSCRIPTION_REMOVE,
133 AVAHI_SUBSCRIPTION_CHANGE
134 } AvahiSubscriptionEvent;
136 typedef struct _AvahiSubscription AvahiSubscription;
138 typedef void (*AvahiSubscriptionCallback)(AvahiSubscription *s, AvahiRecord *record, gint interface, guchar protocol, AvahiSubscriptionEvent event, gpointer userdata);
140 AvahiSubscription *avahi_subscription_new(AvahiServer *s, AvahiKey *key, gint interface, guchar protocol, AvahiSubscriptionCallback callback, gpointer userdata);
141 void avahi_subscription_free(AvahiSubscription *s);