AvahiRecordBrowserCallback callback;
gpointer userdata;
- AVAHI_LLIST_FIELDS(AvahiRecordBrowser, resolver);
+ AVAHI_LLIST_FIELDS(AvahiRecordBrowser, browser);
AVAHI_LLIST_FIELDS(AvahiRecordBrowser, by_key);
};
avahi_elapse_time(&tv, b->sec_delay*1000, 0);
b->time_event = avahi_time_event_queue_add(server->time_event_queue, &tv, elapse, b);
- AVAHI_LLIST_PREPEND(AvahiRecordBrowser, resolver, server->record_browsers, b);
+ AVAHI_LLIST_PREPEND(AvahiRecordBrowser, browser, server->record_browsers, b);
/* Add the new entry to the record_browser hash table */
t = g_hash_table_lookup(server->record_browser_hashtable, key);
g_assert(b);
- AVAHI_LLIST_REMOVE(AvahiRecordBrowser, resolver, b->server->record_browsers, b);
+ AVAHI_LLIST_REMOVE(AvahiRecordBrowser, browser, b->server->record_browsers, b);
t = g_hash_table_lookup(b->server->record_browser_hashtable, b->key);
AVAHI_LLIST_REMOVE(AvahiRecordBrowser, by_key, t, b);
g_assert(server);
for (b = server->record_browsers; b; b = n) {
- n = b->resolver_next;
+ n = b->browser_next;
if (b->dead)
avahi_record_browser_destroy(b);
return FALSE;
}
+
+void avahi_browser_new_interface(AvahiServer*s, AvahiInterface *i) {
+ AvahiRecordBrowser *b;
+
+ g_assert(s);
+ g_assert(i);
+
+ for (b = s->record_browsers; b; b = b->browser_next)
+ if (avahi_interface_match(i, b->interface, b->protocol))
+ avahi_interface_post_query(i, b->key, FALSE);
+}
int main(int argc, char *argv[]) {
GladeXML *xml;
AvahiServerConfig config;
+ GtkTreeViewColumn *c;
gtk_init(&argc, &argv);
glade_init();
gtk_tree_view_set_model(tree_view, GTK_TREE_MODEL(tree_store));
gtk_tree_view_insert_column_with_attributes(tree_view, -1, "Name", gtk_cell_renderer_text_new(), "text", 0, NULL);
gtk_tree_view_insert_column_with_attributes(tree_view, -1, "Interface", gtk_cell_renderer_text_new(), "text", 1, NULL);
+
+ gtk_tree_view_column_set_resizable(c = gtk_tree_view_get_column(tree_view, 0), TRUE);
+ gtk_tree_view_column_set_sizing(c, GTK_TREE_VIEW_COLUMN_GROW_ONLY);
+ gtk_tree_view_column_set_expand(c, TRUE);
service_type_hash_table = g_hash_table_new((GHashFunc) avahi_domain_hash, (GEqualFunc) avahi_domain_equal);