Export symbols when compiling windows DLL.
[deb_shairplay.git] / src / include / raop.h
index 4eb045c4a7ac9ff3d59798da265cdb37557236b2..13f60bb3e6c9d15c3f9a36a70604883d4eebe6df 100644 (file)
@@ -1,5 +1,12 @@
 #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
@@ -16,13 +23,13 @@ struct raop_callbacks_s {
 };
 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
 }