X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=avahi-qt%2Fqt-watch.cpp;h=dac9dcc7ea116d0328f219ca3be1b1bd619224b1;hb=00c9c31292aad4bb1b523278fe75b4740a5fa229;hp=2426798a3c0d9ec47b0f362b3454bb23746165a3;hpb=08368892fe7793f1f6380699410fa755e2216d37;p=catta diff --git a/avahi-qt/qt-watch.cpp b/avahi-qt/qt-watch.cpp index 2426798..dac9dcc 100644 --- a/avahi-qt/qt-watch.cpp +++ b/avahi-qt/qt-watch.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /*** This file is part of avahi. @@ -29,6 +27,7 @@ #include #include #endif +#include #include "qt-watch.h" class AvahiWatch : public QObject @@ -176,19 +175,19 @@ static void q_timeout_free(AvahiTimeout *t) delete t; } -static AvahiPoll qt_poll; - const AvahiPoll* avahi_qt_poll_get(void) { - qt_poll.userdata=0; - qt_poll.watch_new = q_watch_new; - qt_poll.watch_free = q_watch_free; - qt_poll.watch_update = q_watch_update; - qt_poll.watch_get_events = q_watch_get_events; - - qt_poll.timeout_new = q_timeout_new; - qt_poll.timeout_free = q_timeout_free; - qt_poll.timeout_update = q_timeout_update; + static const AvahiPoll qt_poll = { + NULL, + q_watch_new, + q_watch_update, + q_watch_get_events, + q_watch_free, + q_timeout_new, + q_timeout_update, + q_timeout_free + }; + return &qt_poll; }