Commit 8d8b45d3 authored by hjk's avatar hjk

Remove src/libs/zeroconf

The code has been unused for a while and shows up in the static
analyzer.

Change-Id: I7b59be985d7e6e140eaee217978660b767e7b11c
Reviewed-by: default avatarLeena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
Reviewed-by: default avatarEike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: default avatarFawzi Mohamed <fawzi.mohamed@digia.com>
parent 12201a63
......@@ -71,4 +71,7 @@ QNX
BareMetal
Tools:
* Removed unused zeroconf wrapper
Credits for these changes go to:
......@@ -12,8 +12,7 @@ SUBDIRS = \
qmldebug \
qmleditorwidgets \
glsl \
ssh \
zeroconf
ssh
for(l, SUBDIRS) {
QTC_LIB_DEPENDS =
......
......@@ -16,6 +16,5 @@ Project {
"utils/process_stub.qbs",
"utils/process_ctrlc_stub.qbs",
"utils/utils.qbs",
"zeroconf/zeroconf.qbs",
].concat(project.additionalLibs)
}
#ifndef fooclienthfoo
#define fooclienthfoo
/***
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
USA.
***/
#include <inttypes.h>
#include <avahi-common/cdecl.h>
#include <avahi-common/address.h>
#include <avahi-common/strlst.h>
#include <avahi-common/defs.h>
#include <avahi-common/watch.h>
#include <avahi-common/gccmacro.h>
/** \file client.h Definitions and functions for the client API over D-Bus */
AVAHI_C_DECL_BEGIN
/** A connection context */
typedef struct AvahiClient AvahiClient;
/** States of a client object, a superset of AvahiServerState */
typedef enum {
AVAHI_CLIENT_S_REGISTERING = AVAHI_SERVER_REGISTERING, /**< Server state: REGISTERING */
AVAHI_CLIENT_S_RUNNING = AVAHI_SERVER_RUNNING, /**< Server state: RUNNING */
AVAHI_CLIENT_S_COLLISION = AVAHI_SERVER_COLLISION, /**< Server state: COLLISION */
AVAHI_CLIENT_FAILURE = 100, /**< Some kind of error happened on the client side */
AVAHI_CLIENT_CONNECTING = 101 /**< We're still connecting. This state is only entered when AVAHI_CLIENT_NO_FAIL has been passed to avahi_client_new() and the daemon is not yet available. */
} AvahiClientState;
typedef enum {
AVAHI_CLIENT_IGNORE_USER_CONFIG = 1, /**< Don't read user configuration */
AVAHI_CLIENT_NO_FAIL = 2 /**< Don't fail if the daemon is not available when avahi_client_new() is called, instead enter AVAHI_CLIENT_CONNECTING state and wait for the daemon to appear */
} AvahiClientFlags;
/** The function prototype for the callback of an AvahiClient */
typedef void (*AvahiClientCallback) (
AvahiClient *s,
AvahiClientState state /**< The new state of the client */,
void* userdata /**< The user data that was passed to avahi_client_new() */);
/** @{ \name Construction and destruction */
/** Creates a new client instance */
AvahiClient* avahi_client_new (
const AvahiPoll *poll_api /**< The abstract event loop API to use */,
AvahiClientFlags flags /**< Some flags to modify the behaviour of the client library */,
AvahiClientCallback callback /**< A callback that is called whenever the state of the client changes. This may be NULL. Please note that this function is called for the first time from within the avahi_client_new() context! Thus, in the callback you should not make use of global variables that are initialized only after your call to avahi_client_new(). A common mistake is to store the AvahiClient pointer returned by avahi_client_new() in a global variable and assume that this global variable already contains the valid pointer when the callback is called for the first time. A work-around for this is to always use the AvahiClient pointer passed to the callback function instead of the global pointer. */,
void *userdata /**< Some arbitrary user data pointer that will be passed to the callback function */,
int *error /**< If creation of the client fails, this integer will contain the error cause. May be NULL if you aren't interested in the reason why avahi_client_new() failed. */);
/** Free a client instance. This will automatically free all
* associated browser, resolve and entry group objects. All pointers
* to such objects become invalid! */
void avahi_client_free(AvahiClient *client);
/** @} */
/** @{ \name Properties */
/** Get the version of the server */
const char* avahi_client_get_version_string (AvahiClient*);
/** Get host name */
const char* avahi_client_get_host_name (AvahiClient*);
/** Set host name. \since 0.6.13 */
int avahi_client_set_host_name(AvahiClient*, const char *name);
/** Get domain name */
const char* avahi_client_get_domain_name (AvahiClient*);
/** Get FQDN domain name */
const char* avahi_client_get_host_name_fqdn (AvahiClient*);
/** Get state */
AvahiClientState avahi_client_get_state(AvahiClient *client);
/** @{ \name Error Handling */
/** Get the last error number. See avahi_strerror() for converting this error code into a human readable string. */
int avahi_client_errno (AvahiClient*);
/** @} */
/** \cond fulldocs */
/** Return the local service cookie. returns AVAHI_SERVICE_COOKIE_INVALID on failure. */
uint32_t avahi_client_get_local_service_cookie(AvahiClient *client);
/** \endcond */
/** @{ \name Libc NSS Support */
/** Return 1 if gethostbyname() supports mDNS lookups, 0 otherwise. \since 0.6.5 */
int avahi_nss_support(void);
/** @} */
AVAHI_C_DECL_END
#endif
This diff is collapsed.
#ifndef fooaddresshfoo
#define fooaddresshfoo
/***
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
USA.
***/
/** \file address.h Definitions and functions to manipulate IP addresses. */
#include <inttypes.h>
#include <sys/types.h>
#include <avahi-common/cdecl.h>
AVAHI_C_DECL_BEGIN
/** Protocol family specification, takes the values AVAHI_PROTO_INET, AVAHI_PROTO_INET6, AVAHI_PROTO_UNSPEC */
typedef int AvahiProtocol;
/** Numeric network interface index. Takes OS dependent values and the special constant AVAHI_IF_UNSPEC */
typedef int AvahiIfIndex;
/** Values for AvahiProtocol */
enum {
AVAHI_PROTO_INET = 0, /**< IPv4 */
AVAHI_PROTO_INET6 = 1, /**< IPv6 */
AVAHI_PROTO_UNSPEC = -1 /**< Unspecified/all protocol(s) */
};
/** Special values for AvahiIfIndex */
enum {
AVAHI_IF_UNSPEC = -1 /**< Unspecified/all interface(s) */
};
/** Maximum size of an address in string form */
#define AVAHI_ADDRESS_STR_MAX 40 /* IPv6 Max = 4*8 + 7 + 1 for NUL */
/** Return TRUE if the specified interface index is valid */
#define AVAHI_IF_VALID(ifindex) (((ifindex) >= 0) || ((ifindex) == AVAHI_IF_UNSPEC))
/** Return TRUE if the specified protocol is valid */
#define AVAHI_PROTO_VALID(protocol) (((protocol) == AVAHI_PROTO_INET) || ((protocol) == AVAHI_PROTO_INET6) || ((protocol) == AVAHI_PROTO_UNSPEC))
/** An IPv4 address */
typedef struct AvahiIPv4Address {
uint32_t address; /**< Address data in network byte order. */
} AvahiIPv4Address;
/** An IPv6 address */
typedef struct AvahiIPv6Address {
uint8_t address[16]; /**< Address data */
} AvahiIPv6Address;
/** Protocol (address family) independent address structure */
typedef struct AvahiAddress {
AvahiProtocol proto; /**< Address family */
union {
AvahiIPv6Address ipv6; /**< Address when IPv6 */
AvahiIPv4Address ipv4; /**< Address when IPv4 */
uint8_t data[1]; /**< Type-independent data field */
} data;
} AvahiAddress;
/** @{ \name Comparison */
/** Compare two addresses. Returns 0 when equal, a negative value when a < b, a positive value when a > b. */
int avahi_address_cmp(const AvahiAddress *a, const AvahiAddress *b);
/** @} */
/** @{ \name String conversion */
/** Convert the specified address *a to a human readable character string, use AVAHI_ADDRESS_STR_MAX to allocate an array of the right size */
char *avahi_address_snprint(char *ret_s, size_t length, const AvahiAddress *a);
/** Convert the specified human readable character string to an
* address structure. Set af to AVAHI_UNSPEC for automatic address
* family detection. */
AvahiAddress *avahi_address_parse(const char *s, AvahiProtocol af, AvahiAddress *ret_addr);
/** @} */
/** \cond fulldocs */
/** Generate the DNS reverse lookup name for an IPv4 or IPv6 address. */
char* avahi_reverse_lookup_name(const AvahiAddress *a, char *ret_s, size_t length);
/** \endcond */
/** @{ \name Protocol/address family handling */
/** Map AVAHI_PROTO_xxx constants to Unix AF_xxx constants */
int avahi_proto_to_af(AvahiProtocol proto);
/** Map Unix AF_xxx constants to AVAHI_PROTO_xxx constants */
AvahiProtocol avahi_af_to_proto(int af);
/** Return a textual representation of the specified protocol number. i.e. "IPv4", "IPv6" or "UNSPEC" */
const char* avahi_proto_to_string(AvahiProtocol proto);
/** @} */
AVAHI_C_DECL_END
#endif
#ifndef foocdeclhfoo
#define foocdeclhfoo
/***
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
USA.
***/
/** \file cdecl.h C++ compatibility */
#ifdef __cplusplus
/** If using C++ this macro enables C mode, otherwise does nothing */
#define AVAHI_C_DECL_BEGIN extern "C" {
/** If using C++ this macro switches back to C++ mode, otherwise does nothing */
#define AVAHI_C_DECL_END }
#else
/** If using C++ this macro enables C mode, otherwise does nothing */
#define AVAHI_C_DECL_BEGIN
/** If using C++ this macro switches back to C++ mode, otherwise does nothing */
#define AVAHI_C_DECL_END
#endif
#endif
This diff is collapsed.
#ifndef fooerrorhfoo
#define fooerrorhfoo
/***
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
USA.
***/
/** \file error.h Error codes and auxiliary functions */
#include <avahi-common/cdecl.h>
AVAHI_C_DECL_BEGIN
/** Error codes used by avahi */
enum {
AVAHI_OK = 0, /**< OK */
AVAHI_ERR_FAILURE = -1, /**< Generic error code */
AVAHI_ERR_BAD_STATE = -2, /**< Object was in a bad state */
AVAHI_ERR_INVALID_HOST_NAME = -3, /**< Invalid host name */
AVAHI_ERR_INVALID_DOMAIN_NAME = -4, /**< Invalid domain name */
AVAHI_ERR_NO_NETWORK = -5, /**< No suitable network protocol available */
AVAHI_ERR_INVALID_TTL = -6, /**< Invalid DNS TTL */
AVAHI_ERR_IS_PATTERN = -7, /**< RR key is pattern */
AVAHI_ERR_COLLISION = -8, /**< Name collision */
AVAHI_ERR_INVALID_RECORD = -9, /**< Invalid RR */
AVAHI_ERR_INVALID_SERVICE_NAME = -10, /**< Invalid service name */
AVAHI_ERR_INVALID_SERVICE_TYPE = -11, /**< Invalid service type */
AVAHI_ERR_INVALID_PORT = -12, /**< Invalid port number */
AVAHI_ERR_INVALID_KEY = -13, /**< Invalid key */
AVAHI_ERR_INVALID_ADDRESS = -14, /**< Invalid address */
AVAHI_ERR_TIMEOUT = -15, /**< Timeout reached */
AVAHI_ERR_TOO_MANY_CLIENTS = -16, /**< Too many clients */
AVAHI_ERR_TOO_MANY_OBJECTS = -17, /**< Too many objects */
AVAHI_ERR_TOO_MANY_ENTRIES = -18, /**< Too many entries */
AVAHI_ERR_OS = -19, /**< OS error */
AVAHI_ERR_ACCESS_DENIED = -20, /**< Access denied */
AVAHI_ERR_INVALID_OPERATION = -21, /**< Invalid operation */
AVAHI_ERR_DBUS_ERROR = -22, /**< An unexpected D-Bus error occured */
AVAHI_ERR_DISCONNECTED = -23, /**< Daemon connection failed */
AVAHI_ERR_NO_MEMORY = -24, /**< Memory exhausted */
AVAHI_ERR_INVALID_OBJECT = -25, /**< The object passed to this function was invalid */
AVAHI_ERR_NO_DAEMON = -26, /**< Daemon not running */
AVAHI_ERR_INVALID_INTERFACE = -27, /**< Invalid interface */
AVAHI_ERR_INVALID_PROTOCOL = -28, /**< Invalid protocol */
AVAHI_ERR_INVALID_FLAGS = -29, /**< Invalid flags */
AVAHI_ERR_NOT_FOUND = -30, /**< Not found */
AVAHI_ERR_INVALID_CONFIG = -31, /**< Configuration error */
AVAHI_ERR_VERSION_MISMATCH = -32, /**< Verson mismatch */
AVAHI_ERR_INVALID_SERVICE_SUBTYPE = -33, /**< Invalid service subtype */
AVAHI_ERR_INVALID_PACKET = -34, /**< Invalid packet */
AVAHI_ERR_INVALID_DNS_ERROR = -35, /**< Invlaid DNS return code */
AVAHI_ERR_DNS_FORMERR = -36, /**< DNS Error: Form error */
AVAHI_ERR_DNS_SERVFAIL = -37, /**< DNS Error: Server Failure */
AVAHI_ERR_DNS_NXDOMAIN = -38, /**< DNS Error: No such domain */
AVAHI_ERR_DNS_NOTIMP = -39, /**< DNS Error: Not implemented */
AVAHI_ERR_DNS_REFUSED = -40, /**< DNS Error: Operation refused */
AVAHI_ERR_DNS_YXDOMAIN = -41,
AVAHI_ERR_DNS_YXRRSET = -42,
AVAHI_ERR_DNS_NXRRSET = -43,
AVAHI_ERR_DNS_NOTAUTH = -44, /**< DNS Error: Not authorized */
AVAHI_ERR_DNS_NOTZONE = -45,
AVAHI_ERR_INVALID_RDATA = -46, /**< Invalid RDATA */
AVAHI_ERR_INVALID_DNS_CLASS = -47, /**< Invalid DNS class */
AVAHI_ERR_INVALID_DNS_TYPE = -48, /**< Invalid DNS type */
AVAHI_ERR_NOT_SUPPORTED = -49, /**< Not supported */
AVAHI_ERR_NOT_PERMITTED = -50, /**< Operation not permitted */
AVAHI_ERR_INVALID_ARGUMENT = -51, /**< Invalid argument */
AVAHI_ERR_IS_EMPTY = -52, /**< Is empty */
AVAHI_ERR_NO_CHANGE = -53, /**< The requested operation is invalid because it is redundant */
/****
**** IF YOU ADD A NEW ERROR CODE HERE, PLEASE DON'T FORGET TO ADD
**** IT TO THE STRING ARRAY IN avahi_strerror() IN error.c AND
**** TO THE ARRAY IN dbus.c AND FINALLY TO dbus.h!
****
**** Also remember to update the MAX value below.
****/
AVAHI_ERR_MAX = -54
};
/** Return a human readable error string for the specified error code */
const char *avahi_strerror(int error);
AVAHI_C_DECL_END
#endif
#ifndef foogccmacrohfoo
#define foogccmacrohfoo
/***
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
USA.
***/
/** \file gccmacro.h Defines some macros for GCC extensions */
#include <avahi-common/cdecl.h>
AVAHI_C_DECL_BEGIN
#if defined(__GNUC__) && (__GNUC__ >= 4) && (__GNUC_MINOR__ >= 3)
#define AVAHI_GCC_ALLOC_SIZE(x) __attribute__ ((__alloc_size__(x)))
#define AVAHI_GCC_ALLOC_SIZE2(x,y) __attribute__ ((__alloc_size__(x,y)))
#else
/** Macro for usage of GCC's alloc_size attribute */
#define AVAHI_GCC_ALLOC_SIZE(x)
#define AVAHI_GCC_ALLOC_SIZE2(x,y)
#endif
#if defined(__GNUC__) && (__GNUC__ >= 4)
#define AVAHI_GCC_SENTINEL __attribute__ ((sentinel))
#else
/** Macro for usage of GCC's sentinel compilation warnings */
#define AVAHI_GCC_SENTINEL
#endif
#ifdef __GNUC__
#define AVAHI_GCC_PRINTF_ATTR(a,b) __attribute__ ((format (printf, a, b)))
#else
/** Macro for usage of GCC's printf compilation warnings */
#define AVAHI_GCC_PRINTF_ATTR(a,b)
#endif
/** Same as AVAHI_GCC_PRINTF_ATTR but hard coded to arguments 1 and 2 */
#define AVAHI_GCC_PRINTF_ATTR12 AVAHI_GCC_PRINTF_ATTR(1,2)
/** Same as AVAHI_GCC_PRINTF_ATTR but hard coded to arguments 2 and 3 */
#define AVAHI_GCC_PRINTF_ATTR23 AVAHI_GCC_PRINTF_ATTR(2,3)
#ifdef __GNUC__
#define AVAHI_GCC_NORETURN __attribute__((noreturn))
#else
/** Macro for no-return functions */
#define AVAHI_GCC_NORETURN
#endif
#ifdef __GNUC__
#define AVAHI_GCC_UNUSED __attribute__ ((unused))
#else
/** Macro for not used parameter */
#define AVAHI_GCC_UNUSED
#endif
AVAHI_C_DECL_END
#endif
#ifndef foomallochfoo
#define foomallochfoo
/***
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
USA.
***/
/** \file malloc.h Memory allocation */
#include <sys/types.h>
#include <stdarg.h>
#include <limits.h>
#include <assert.h>
#include <avahi-common/cdecl.h>
#include <avahi-common/gccmacro.h>
AVAHI_C_DECL_BEGIN
/** Allocate some memory, just like the libc malloc() */
void *avahi_malloc(size_t size) AVAHI_GCC_ALLOC_SIZE(1);
/** Similar to avahi_malloc() but set the memory to zero */
void *avahi_malloc0(size_t size) AVAHI_GCC_ALLOC_SIZE(1);
/** Free some memory */
void avahi_free(void *p);
/** Similar to libc's realloc() */
void *avahi_realloc(void *p, size_t size) AVAHI_GCC_ALLOC_SIZE(2);
/** Internal helper for avahi_new() */
static inline void* AVAHI_GCC_ALLOC_SIZE2(1,2) avahi_new_internal(unsigned n, size_t k) {
assert(n < INT_MAX/k);
return avahi_malloc(n*k);
}
/** Allocate n new structures of the specified type. */
#define avahi_new(type, n) ((type*) avahi_new_internal((n), sizeof(type)))
/** Internal helper for avahi_new0() */
static inline void* AVAHI_GCC_ALLOC_SIZE2(1,2) avahi_new0_internal(unsigned n, size_t k) {
assert(n < INT_MAX/k);
return avahi_malloc0(n*k);
}
/** Same as avahi_new() but set the memory to zero */
#define avahi_new0(type, n) ((type*) avahi_new0_internal((n), sizeof(type)))
/** Just like libc's strdup() */
char *avahi_strdup(const char *s);
/** Just like libc's strndup() */
char *avahi_strndup(const char *s, size_t l);
/** Duplicate the given memory block into a new one allocated with avahi_malloc() */
void *avahi_memdup(const void *s, size_t l) AVAHI_GCC_ALLOC_SIZE(2);
/** Wraps allocator functions */
typedef struct AvahiAllocator {
void* (*malloc)(size_t size) AVAHI_GCC_ALLOC_SIZE(1);
void (*free)(void *p);
void* (*realloc)(void *p, size_t size) AVAHI_GCC_ALLOC_SIZE(2);
void* (*calloc)(size_t nmemb, size_t size) AVAHI_GCC_ALLOC_SIZE2(1,2); /**< May be NULL */
} AvahiAllocator;
/** Change the allocator. May be NULL to return to default (libc)
* allocators. The structure is not copied! */
void avahi_set_allocator(const AvahiAllocator *a);
/** Like sprintf() but store the result in a freshly allocated buffer. Free this with avahi_free() */
char *avahi_strdup_printf(const char *fmt, ... ) AVAHI_GCC_PRINTF_ATTR12;
/** \cond fulldocs */
/** Same as avahi_strdup_printf() but take a va_list instead of varargs */
char *avahi_strdup_vprintf(const char *fmt, va_list ap);
/** \endcond */
AVAHI_C_DECL_END
#endif
<
#ifndef foosimplewatchhfoo
#define foosimplewatchhfoo
/***
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
USA.
***/
/** \file simple-watch.h Simple poll() based main loop implementation */
#include <sys/poll.h>
#include <avahi-common/cdecl.h>
#include <avahi-common/watch.h>
AVAHI_C_DECL_BEGIN
/** A main loop object. Main loops of this type aren't very flexible
* since they only support a single wakeup type. Nevertheless it
* should suffice for small test and example applications. */
typedef struct AvahiSimplePoll AvahiSimplePoll;
/** Create a new main loop object */
AvahiSimplePoll *avahi_simple_poll_new(void);
/** Free a main loop object */
void avahi_simple_poll_free(AvahiSimplePoll *s);
/** Return the abstracted poll API object for this main loop
* object. The is will return the same pointer each time it is
* called. */
const AvahiPoll* avahi_simple_poll_get(AvahiSimplePoll *s);
/** Run a single main loop iteration of this main loop. If sleep_time
is < 0 this will block until any of the registered events happens,