#ifndef DNSSD_H
#define DNSSD_H
+
+#if defined(WIN32) && defined(DLL_EXPORT)
+# define DNSSD_API __declspec(dllexport)
+#else
+# define DNSSD_API
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
#define DNSSD_ERROR_PROCNOTFOUND 4
typedef struct dnssd_s dnssd_t;
-dnssd_t *dnssd_init(const char *hwaddr, int hwaddrlen, int *error);
-int dnssd_register_raop(dnssd_t *dnssd, const char *name, unsigned short port);
-int dnssd_register_airplay(dnssd_t *dnssd, const char *name, unsigned short port);
+DNSSD_API dnssd_t *dnssd_init(const char *hwaddr, int hwaddrlen, int *error);
+
+DNSSD_API int dnssd_register_raop(dnssd_t *dnssd, const char *name, unsigned short port);
+DNSSD_API int dnssd_register_airplay(dnssd_t *dnssd, const char *name, unsigned short port);
-void dnssd_unregister_raop(dnssd_t *dnssd);
-void dnssd_unregister_airplay(dnssd_t *dnssd);
+DNSSD_API void dnssd_unregister_raop(dnssd_t *dnssd);
+DNSSD_API void dnssd_unregister_airplay(dnssd_t *dnssd);
-void dnssd_destroy(dnssd_t *dnssd);
+DNSSD_API void dnssd_destroy(dnssd_t *dnssd);
#ifdef __cplusplus
}
#ifndef RAOP_H
#define RAOP_H
+
+#if defined (WIN32) && defined(DLL_EXPORT)
+# define RAOP_API __declspec(dllexport)
+#else
+# define RAOP_API
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
};
typedef struct raop_callbacks_s raop_callbacks_t;
-raop_t *raop_init(raop_callbacks_t *callbacks, const char *pemkey);
-raop_t *raop_init_from_keyfile(raop_callbacks_t *callbacks, const char *keyfile);
+RAOP_API raop_t *raop_init(raop_callbacks_t *callbacks, const char *pemkey);
+RAOP_API raop_t *raop_init_from_keyfile(raop_callbacks_t *callbacks, const char *keyfile);
-int raop_start(raop_t *raop, unsigned short *port, const char *hwaddr, int hwaddrlen);
-void raop_stop(raop_t *raop);
+RAOP_API int raop_start(raop_t *raop, unsigned short *port, const char *hwaddr, int hwaddrlen);
+RAOP_API void raop_stop(raop_t *raop);
-void raop_destroy(raop_t *raop);
+RAOP_API void raop_destroy(raop_t *raop);
#ifdef __cplusplus
}