X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=examples%2Fglib-integration.c;h=d2a2457999b006e2d9936f89125d352a3bf11b84;hb=5622f49f788abafea96420b553eb0138eb605c55;hp=f1830d86134d77f10a911680a0588c82c753ebd0;hpb=4e2113a7d5b702ff070e8220b32662bb00ae02dd;p=catta diff --git a/examples/glib-integration.c b/examples/glib-integration.c index f1830d8..d2a2457 100644 --- a/examples/glib-integration.c +++ b/examples/glib-integration.c @@ -1,18 +1,16 @@ -/* $Id$ */ - /*** This file is part of avahi. - + avahi is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. - + avahi is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with avahi; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 @@ -45,7 +43,7 @@ avahi_timeout_event_glib (void *userdata) GMainLoop *loop = userdata; g_message ("GLIB API Timeout reached, quitting main loop!"); - + /* Quit the application */ g_main_loop_quit (loop); @@ -108,6 +106,7 @@ main (AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) /* Create a new AvahiClient instance */ client = avahi_client_new (poll_api, /* AvahiPoll object from above */ + 0, avahi_client_callback, /* Callback function for Client state changes */ loop, /* User data */ &error); /* Error return */ @@ -120,7 +119,7 @@ main (AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) goto fail; } - + /* Make a call to get the version string from the daemon */ version = avahi_client_get_version_string (client); @@ -131,7 +130,7 @@ main (AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) goto fail; } - + g_message ("Avahi Server Version: %s", version); /* Start the GLIB Main Loop */