summaryrefslogtreecommitdiff
path: root/src/lib/ecore_avahi/Ecore_Avahi.h
blob: 1ba744348e55380add3339f7fb80251855cd7efc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
/**
   @brief Ecore Avahi integration Library Public API Calls

   These routines are used for integrating Avahi with Ecore main loop
 */

#ifndef _ECORE_AVAHI_H
# define _ECORE_AVAHI_H

#ifdef EAPI
# undef EAPI
#endif

#ifdef _WIN32
# ifdef EFL_ECORE_BUILD
#  ifdef DLL_EXPORT
#   define EAPI __declspec(dllexport)
#  else
#   define EAPI
#  endif /* ! DLL_EXPORT */
# else
#  define EAPI __declspec(dllimport)
# endif /* ! EFL_ECORE_BUILD */
#else
# ifdef __GNUC__
#  if __GNUC__ >= 4
#   define EAPI __attribute__ ((visibility("default")))
#  else
#   define EAPI
#  endif
# else
#  define EAPI
# endif
#endif /* ! _WIN32 */

#ifdef __cplusplus
extern "C" {
#endif

/**
 * @defgroup Ecore_Avahi_Group Ecore_Avahi - Avahi main loop integration function.
 * @ingroup Ecore
 *
 * @{
 */

/**
 * @since 1.9
 */
typedef struct _Ecore_Avahi Ecore_Avahi; /**< A handle for an Avahi instance. */

/**
 * @brief Create an AvahiPoll context and integrate it within Ecore main loop.
 *
 * @return A handler that reference the AvahiPoll context
 * @since 1.9
 */
EAPI Ecore_Avahi *ecore_avahi_add(void);

/**
 * @brief Delete the specified handler of an AvahiPoll.
 *
 * @param handler The actual handler to destroy.
 * @since 1.9
 *
 * Be aware there should not be any reference still using that handler before
 * destroying it.
 */
EAPI void         ecore_avahi_del(Ecore_Avahi *handler);

/**
 * @brief Get the AvahiPoll structure to integrate with Ecore main loop.
 *
 * @param handler The handler to get the AvahiPoll structure from.
 * @return return the actual AvahiPoll structure to use with Avahi.
 * @since 1.9
 */
EAPI const void  *ecore_avahi_poll_get(Ecore_Avahi *handler); // return AvahiPoll

/**
 * @}
 */

#ifdef __cplusplus
}
#endif

#undef EAPI
#define EAPI

#endif