openATV enigma2
openATV is an open source SetTopBox Graphical user interface.
e2avahi.h
Go to the documentation of this file.
1 #pragma once
2 
3 #ifndef SWIG
4 class eMainloop;
5 
6 /* Initialization and shutdown */
7 void e2avahi_init(eMainloop* reactor);
8 void e2avahi_close();
9 #endif
10 
11 /* Offer a service. There's currently no way to withdraw it. Leave
12  * service_name NULL or blank to use avahi's local hostname as service
13  * name (recommended, since it must be unique on the network) */
14 void e2avahi_announce(const char* service_name, const char* service_type, unsigned short port_num);
15 
16 #define E2AVAHI_EVENT_ADD 1
17 #define E2AVAHI_EVENT_REMOVE 2
18 
19 typedef void (*E2AvahiResolveCallback) (
20  void* userdata,
21  int event, /* One of E2AVAHI_EVENT_... */
22  const char *name, /* name+type combination is unique on the network */
23  const char *type,
24  const char *host_name, /* hostname and port are only valid in ADD */
25  uint16_t port);
26 
27 /* Starts searching for services on other machines. Basically, one expects
28  * to activate this once, and then keep updating a static list of matches. */
29 void e2avahi_resolve(const char* service_type, E2AvahiResolveCallback callback, void *userdata);
30 /* Stop looking for services. Callback will no longer be triggered after this. Pass the same
31  * data as to the call to e2avahi_resolve. */
32 void e2avahi_resolve_cancel(const char* service_type, E2AvahiResolveCallback callback, void *userdata);
Definition: ebase.h:187
void e2avahi_init(eMainloop *reactor)
Definition: e2avahi.cpp:395
void e2avahi_close()
Definition: e2avahi.cpp:410
void e2avahi_resolve_cancel(const char *service_type, E2AvahiResolveCallback callback, void *userdata)
Definition: e2avahi.cpp:438
void(* E2AvahiResolveCallback)(void *userdata, int event, const char *name, const char *type, const char *host_name, uint16_t port)
Definition: e2avahi.h:19
void e2avahi_resolve(const char *service_type, E2AvahiResolveCallback callback, void *userdata)
Definition: e2avahi.cpp:432
void e2avahi_announce(const char *service_name, const char *service_type, unsigned short port_num)
Definition: e2avahi.cpp:426
name
Definition: newplugin.py:9
port
Definition: CCcamInfo.py:253
static const char * service_type
Definition: servicepeer.cpp:9