Logo Search packages:      
Sourcecode: avahi version File versions  Download package

const AvahiRecord* avahi_server_iterate ( AvahiServer s,
AvahiSEntryGroup g,
void **  state 

Iterate through all local entries of the server. (when g is NULL) or of a specified entry group. At the first call state should point to a NULL initialized void pointer, That pointer is used to track the current iteration. It is not safe to call any other avahi_server_xxx() function during the iteration. If the last entry has been read, NULL is returned.

Definition at line 330 of file entry.c.

    AvahiEntry **e = (AvahiEntry**) state;

    if (!*e)
        *e = g ? g->entries : s->entries;

    while (*e && (*e)->dead)
        *e = g ? (*e)->by_group_next : (*e)->entries_next;

    if (!*e)
        return NULL;

    return avahi_record_ref((*e)->record);

Generated by  Doxygen 1.6.0   Back to index