Changeset View
Changeset View
Standalone View
Standalone View
src/avahi_listener_p.h
Show All 17 Lines | |||||
18 | * Boston, MA 02110-1301, USA. | 18 | * Boston, MA 02110-1301, USA. | ||
19 | */ | 19 | */ | ||
20 | 20 | | |||
21 | #ifndef AVAHILISTENER_H | 21 | #ifndef AVAHILISTENER_H | ||
22 | #define AVAHILISTENER_H | 22 | #define AVAHILISTENER_H | ||
23 | 23 | | |||
24 | #include <QDBusMessage> | 24 | #include <QDBusMessage> | ||
25 | #include <QString> | 25 | #include <QString> | ||
26 | #include <QMetaObject> | ||||
sitter: sort alphabetically | |||||
26 | 27 | | |||
27 | namespace KDNSSD { | 28 | namespace KDNSSD { | ||
28 | 29 | | |||
29 | // Assists with listening to Avahi for all signals and then checking if the | 30 | // Assists with listening to Avahi for all signals and then checking if the | ||
30 | // a given dbus message is meant for us or not. | 31 | // a given dbus message is meant for us or not. | ||
31 | // Subclass and set the object path to object path you should be listening to. | 32 | // Subclass and set the object path to object path you should be listening to. | ||
32 | // Messages may then be run through isOurMsg to determine if they target the | 33 | // Messages may then be run through isOurMsg to determine if they target the | ||
33 | // object at hand. | 34 | // object at hand. | ||
34 | class AvahiListener | 35 | class AvahiListener | ||
35 | { | 36 | { | ||
37 | QMetaObject::Connection m_connection; | ||||
not very descriptive name privates at the bottom of the class in a private section please sitter: not very descriptive name
privates at the bottom of the class in a private section please | |||||
36 | public: | 38 | public: | ||
37 | explicit AvahiListener(); | 39 | explicit AvahiListener(); | ||
38 | virtual ~AvahiListener(); | 40 | virtual ~AvahiListener(); | ||
39 | 41 | | |||
40 | // This method gets called a lot but doesn't do much. Suggest inlining. | 42 | // This method gets called a lot but doesn't do much. Suggest inlining. | ||
41 | inline bool isOurMsg(const QDBusMessage &msg) const | 43 | inline bool isOurMsg(const QDBusMessage &msg) const | ||
42 | { | 44 | { | ||
43 | if (m_dbusObjectPath.isEmpty() || m_dbusObjectPath != msg.path()) { | 45 | if (m_dbusObjectPath.isEmpty() || m_dbusObjectPath != msg.path()) { | ||
Show All 11 Lines |
sort alphabetically