|
service_discovery
|
#include <ServiceBrowser.hpp>
Public Member Functions | |
| ServiceBrowser (Client *client, std::string type) | |
| ServiceBrowser (Client *client, AvahiIfIndex interface, AvahiProtocol protocol, std::string type, std::string domain, AvahiLookupFlags flags, void *data) | |
| virtual | ~ServiceBrowser () |
| void | cleanup () |
| void | serviceAddedConnect (const sigc::slot< void, RemoteService > &slot_) |
| void | serviceAddedEmit (RemoteService rms) |
| void | serviceRemovedConnect (const sigc::slot< void, RemoteService > &slot_) |
| void | serviceRemovedEmit (RemoteService rms) |
| void | serviceUpdatedConnect (const sigc::slot< void, RemoteService > &slot_) |
| void | serviceUpdatedEmit (RemoteService rms) |
| List< RemoteService > | getServices () |
| List< RemoteService > * | getInternalServices () |
| boost::mutex & | getServicesMutex () |
| AvahiServiceBrowser * | getAvahiBrowser () |
| Client * | getClient () |
Static Public Member Functions | |
| static void | browseCallback (AvahiServiceBrowser *sb, AvahiIfIndex interface, AvahiProtocol protocol, AvahiBrowserEvent event, const char *name, const char *type, const char *domain, AvahiLookupResultFlags flags, void *userdata) |
| static void | resolveCallback (AvahiServiceResolver *sr, AvahiIfIndex interface, AvahiProtocol protocol, AvahiResolverEvent event, const char *name, const char *type, const char *domain, const char *host, const AvahiAddress *address, uint16_t port, AvahiStringList *list, AvahiLookupResultFlags flags, void *userdata) |
Static Public Attributes | |
| const static int | MAX_RESOLVER_TRIES = 5 |
a class encapsulating the service browser object of avahi it also keeps track of all currently active services TODO service browser can browse only services of specific type. Implement a service type browser
| servicediscovery::avahi::ServiceBrowser::ServiceBrowser | ( | Client * | client, |
| std::string | type | ||
| ) |
Class to browse existing services given a avahi client and a type to browse
| client | |
| type |
| servicediscovery::avahi::ServiceBrowser::ServiceBrowser | ( | Client * | client, |
| AvahiIfIndex | interface, | ||
| AvahiProtocol | protocol, | ||
| std::string | type, | ||
| std::string | domain, | ||
| AvahiLookupFlags | flags, | ||
| void * | data | ||
| ) |
Browser for existing services, given specific avahi definitions
| client | Reference to avahi client |
| interface | AvahiIfIndex interface, // In most cases pass AVAHI_IF_UNSPEC here |
| protocol | AvahiProtocol protocol, // In most cases pass AVAHI_PROTO_UNSPEC here |
| type | A service type such as "_http._tcp" |
| domain | A domain to browse in. In most cases you want to pass NULL here for the default domain (usually ".local") |
| flags | |
| data |
|
virtual |
|
static |
| void servicediscovery::avahi::ServiceBrowser::cleanup | ( | ) |
Cleanup internal instances of avahi_browers and resolvers (do not call if you are using avahi_client_free)
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
static |
|
inline |
generic signal for a browser event
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
static |
the browser will keep the service resolver object upon this amount of failed attempts
1.8.11