diff --git a/src/libopensubsonic/endpoint_getAlbum.h b/src/libopensubsonic/endpoint_getAlbum.h index d3ad60e..8131fb9 100644 --- a/src/libopensubsonic/endpoint_getAlbum.h +++ b/src/libopensubsonic/endpoint_getAlbum.h @@ -1,6 +1,10 @@ #ifndef _ENDPOINT_GETALBUM_H #define _ENDPOINT_GETALBUM_H +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + typedef struct { char* id; char* parent; @@ -49,4 +53,8 @@ typedef struct { int opensubsonic_getAlbum_parse(char* data, opensubsonic_getAlbum_struct** getAlbumStruct); void opensubsonic_getAlbum_struct_free(opensubsonic_getAlbum_struct** getAlbumStruct); -#endif +#ifdef __cplusplus +} +#endif // __cplusplus + +#endif // _ENDPOINT_GETALBUM_H diff --git a/src/libopensubsonic/endpoint_getAlbumList.h b/src/libopensubsonic/endpoint_getAlbumList.h index 6cb0922..0e6df3d 100644 --- a/src/libopensubsonic/endpoint_getAlbumList.h +++ b/src/libopensubsonic/endpoint_getAlbumList.h @@ -1,6 +1,10 @@ #ifndef _ENDPOINT_GETALBUMLIST_H #define _ENDPOINT_GETALBUMLIST_H +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + typedef struct { char* id; char* parent; @@ -30,4 +34,8 @@ typedef struct { int opensubsonic_getAlbumList_parse(char* data, opensubsonic_getAlbumList_struct** getAlbumListStruct); void opensubsonic_getAlbumList_struct_free(opensubsonic_getAlbumList_struct** getAlbumListStruct); -#endif +#ifdef __cplusplus +} +#endif // __cplusplus + +#endif // _ENDPOINT_GETALBUMLIST_H diff --git a/src/libopensubsonic/endpoint_getArtist.h b/src/libopensubsonic/endpoint_getArtist.h index ce8afbb..7f19e92 100644 --- a/src/libopensubsonic/endpoint_getArtist.h +++ b/src/libopensubsonic/endpoint_getArtist.h @@ -1,6 +1,10 @@ #ifndef _ENDPOINT_GETARTIST_H #define _ENDPOINT_GETARTIST_H +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + typedef struct { char* id; // Album ID char* parent; // Parent ID @@ -38,4 +42,8 @@ typedef struct { int opensubsonic_getArtist_parse(char* data, opensubsonic_getArtist_struct** getArtistStruct); void opensubsonic_getArtist_struct_free(opensubsonic_getArtist_struct** getArtistStruct); -#endif +#ifdef __cplusplus +} +#endif // __cplusplus + +#endif // _ENDPOINT_GETARTIST_H diff --git a/src/libopensubsonic/endpoint_getArtists.h b/src/libopensubsonic/endpoint_getArtists.h index b29706c..e6f341c 100644 --- a/src/libopensubsonic/endpoint_getArtists.h +++ b/src/libopensubsonic/endpoint_getArtists.h @@ -1,6 +1,10 @@ #ifndef _ENDPOINT_GETARTISTS_H #define _ENDPOINT_GETARTISTS_H +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + typedef struct { char* id; char* name; @@ -19,4 +23,8 @@ typedef struct { int opensubsonic_getArtists_parse(char* data, opensubsonic_getArtists_struct** getArtistsStruct); void opensubsonic_getArtists_struct_free(opensubsonic_getArtists_struct** getArtistsStruct); -#endif +#ifdef __cplusplus +} +#endif // __cplusplus + +#endif // _ENDPOINT_GETARTISTS_H diff --git a/src/libopensubsonic/endpoint_getLyricsBySongId.h b/src/libopensubsonic/endpoint_getLyricsBySongId.h index 4fd2403..b4b9a74 100644 --- a/src/libopensubsonic/endpoint_getLyricsBySongId.h +++ b/src/libopensubsonic/endpoint_getLyricsBySongId.h @@ -1,6 +1,10 @@ #ifndef _ENDPOINT_GETLYRICSBYSONGID_H #define _ENDPOINT_GETLYRICSBYSONGID_H +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + typedef struct { char* data; long offset; @@ -19,4 +23,8 @@ typedef struct { int opensubsonic_getLyricsBySongId_parse(char* data, opensubsonic_getLyricsBySongId_struct** getLyricsBySongIdStruct); void opensubsonic_getLyricsBySongId_struct_free(opensubsonic_getLyricsBySongId_struct** getLyricsBySongIdStruct); -#endif +#ifdef __cplusplus +} +#endif // __cplusplus + +#endif // _ENDPOINT_GETLYRICSBYSONGID_H diff --git a/src/libopensubsonic/endpoint_getPlaylist.h b/src/libopensubsonic/endpoint_getPlaylist.h index 3461586..094ca7d 100644 --- a/src/libopensubsonic/endpoint_getPlaylist.h +++ b/src/libopensubsonic/endpoint_getPlaylist.h @@ -2,6 +2,10 @@ #define _ENDPOINT_GETPLAYLIST_H #include +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + typedef struct { char* id; char* parent; @@ -46,4 +50,8 @@ typedef struct { int opensubsonic_getPlaylist_parse(char* data, opensubsonic_getPlaylist_struct** getPlaylistStruct); void opensubsonic_getPlaylist_struct_free(opensubsonic_getPlaylist_struct** getPlaylistStruct); -#endif +#ifdef __cplusplus +} +#endif // __cplusplus + +#endif // _ENDPOINT_GETPLAYLIST_H diff --git a/src/libopensubsonic/endpoint_getPlaylists.h b/src/libopensubsonic/endpoint_getPlaylists.h index da1a47a..622995c 100644 --- a/src/libopensubsonic/endpoint_getPlaylists.h +++ b/src/libopensubsonic/endpoint_getPlaylists.h @@ -1,6 +1,10 @@ #ifndef _ENDPOINT_GETPLAYLISTS_H #define _ENDPOINT_GETPLAYLISTS_H +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + typedef struct { char* id; // Album ID char* name; // Album name @@ -23,4 +27,8 @@ typedef struct { int opensubsonic_getPlaylists_parse(char* data, opensubsonic_getPlaylists_struct** getPlaylistsStruct); void opensubsonic_getPlaylists_struct_free(opensubsonic_getPlaylists_struct** getPlaylistsStruct); -#endif +#ifdef __cplusplus +} +#endif // __cplusplus + +#endif // _ENDPOINT_GETPLAYLISTS_H diff --git a/src/libopensubsonic/endpoint_getSong.h b/src/libopensubsonic/endpoint_getSong.h index 6659268..b839d03 100644 --- a/src/libopensubsonic/endpoint_getSong.h +++ b/src/libopensubsonic/endpoint_getSong.h @@ -1,6 +1,10 @@ #ifndef _ENDPOINT_GETSONG_H #define _ENDPOINT_GETSONG_H +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + typedef struct { char* status; // Request status int errorCode; // Request error code (0 if none) @@ -36,4 +40,8 @@ typedef struct { int opensubsonic_getSong_parse(char* data, opensubsonic_getSong_struct** getSongStruct); void opensubsonic_getSong_struct_free(opensubsonic_getSong_struct** getSongStruct); -#endif +#ifdef __cplusplus +} +#endif // __cplusplus + +#endif // _ENDPOINT_GETSONG_H diff --git a/src/libopensubsonic/endpoint_getStarred.h b/src/libopensubsonic/endpoint_getStarred.h index 39d1912..d1499d1 100644 --- a/src/libopensubsonic/endpoint_getStarred.h +++ b/src/libopensubsonic/endpoint_getStarred.h @@ -1,6 +1,10 @@ #ifndef _ENDPOINT_GETSTARRED_H #define _ENDPOINT_GETSTARRED_H +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + typedef struct { char* id; char* name; @@ -56,7 +60,7 @@ typedef struct { typedef struct { char* status; int errorCode; - char* errorMessage; +char* errorMessage; int artistCount; int albumCount; int songCount; @@ -68,4 +72,8 @@ typedef struct { int opensubsonic_getStarred_parse(char* data, opensubsonic_getStarred_struct** getStarredStruct); void opensubsonic_getStarred_struct_free(opensubsonic_getStarred_struct** getStarredStruct); -#endif +#ifdef __cplusplus +} +#endif // __cplusplus + +#endif // _ENDPOINT_GETSTARRED_H diff --git a/src/libopensubsonic/endpoint_ping.h b/src/libopensubsonic/endpoint_ping.h index 9c166bd..48b781f 100644 --- a/src/libopensubsonic/endpoint_ping.h +++ b/src/libopensubsonic/endpoint_ping.h @@ -3,6 +3,10 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + typedef struct { char* status; char* version; @@ -17,4 +21,8 @@ typedef struct { int opensubsonic_ping_parse(char* data, opensubsonic_ping_struct** pingStruct); void opensubsonic_ping_struct_free(opensubsonic_ping_struct** pingStruct); -#endif +#ifdef __cplusplus +} +#endif // __cplusplus + +#endif // _ENDPOINT_PING_H diff --git a/src/libopensubsonic/httpclient.h b/src/libopensubsonic/httpclient.h index ffb40de..72296ae 100644 --- a/src/libopensubsonic/httpclient.h +++ b/src/libopensubsonic/httpclient.h @@ -3,6 +3,10 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + #define SCROBBLER_LISTENBRAINZ 101 #define SCROBBLER_LASTFM 102 #define HTTP_METHOD_GET 201 @@ -72,4 +76,8 @@ typedef struct { int opensubsonic_getAlbum(const char* protocol_ptr, const char* server_ptr, const char* user_ptr, char* login_token_ptr, char* login_salt_ptr, const char* opensubsonic_version_ptr, const char* client_name_ptr, char* id, char** response); -#endif +#ifdef __cplusplus +} +#endif // __cplusplus + +#endif // _HTTPCLIENT_H diff --git a/src/libopensubsonic/scrobble_lastFm.c b/src/libopensubsonic/scrobble_lastFm.c index c838a23..d432ce8 100644 --- a/src/libopensubsonic/scrobble_lastFm.c +++ b/src/libopensubsonic/scrobble_lastFm.c @@ -8,7 +8,6 @@ #include "../external/md5.h" #include "../external/libcurl_uriescape.h" #include "../configHandler.h" -#include "../DarwinHttpClient.h" #include "../configHandler.h" const char* lastFmScrobbleURL = "https://ws.audioscrobbler.com/2.0/"; diff --git a/src/libopensubsonic/scrobble_listenBrainz.c b/src/libopensubsonic/scrobble_listenBrainz.c index b4e7525..2fca328 100644 --- a/src/libopensubsonic/scrobble_listenBrainz.c +++ b/src/libopensubsonic/scrobble_listenBrainz.c @@ -7,7 +7,6 @@ #include "endpoint_getSong.h" #include "httpclient.h" #include "scrobble_listenBrainz.h" -#include "../DarwinHttpClient.h" const char* listenBrainzScrobbleURL = "https://api.listenbrainz.org/1/submit-listens";