Permalink
Browse files

Add spotify client.

  • Loading branch information...
1 parent c6ea19c commit c52d371a60b5f37ad84cf7e6b7d189d1e93952f6 @andoma committed Apr 9, 2009
Showing with 3,476 additions and 2 deletions.
  1. +5 −0 Makefile
  2. +4 −1 configure
  3. +4 −0 src/navigator.c
  4. +6 −0 src/spotify/Makefile
  5. +1,997 −0 src/spotify/api.h
  6. +254 −0 src/spotify/apifunctions.h
  7. +1,194 −0 src/spotify/spotify.c
  8. +12 −1 support/configure.inc
View
@@ -163,6 +163,11 @@ ${BUILDDIR}/src/dvd/dvdnav/%.o : CFLAGS = \
SRCS += src/tv/htsp.c \
#
+# Spotify
+#
+SRCS-${CONFIG_SPOTIFY} += src/spotify/spotify.c
+
+#
# GLW user interface
#
SRCS-$(CONFIG_GLW) += src/ui/glw/glw.c \
View
@@ -32,6 +32,7 @@ show_help(){
echo " --cc=CC Build using the given compiler"
echo " --release Stage for release"
echo " --embedded-theme Embed theme in showtime [none]"
+ echo " --enable-spotify=keyfile Compile support for Spotify (R) Core"
exit 1
}
@@ -55,6 +56,8 @@ for opt do
;;
--cc=*) CC="$optval"
;;
+ --enable-spotify=*) SPOTIFY_KEYFILE="$optval"
+ ;;
--enable-?*|--disable-?*)
eval $(echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g')
$action $option
@@ -210,7 +213,7 @@ fi
#
cat >> ${CONFIG_MAK} << EOF
INSTALLPREFIX=$PREFIX
-LDFLAGS_cfg += -lpthread
+LDFLAGS_cfg += -lrt -lpthread
EOF
finalize
View
@@ -16,6 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "config.h"
#include <inttypes.h>
#include <stdlib.h>
#include <string.h>
@@ -85,6 +86,9 @@ nav_init(void)
NAV_INIT_BE(settings);
NAV_INIT_BE(playqueue);
NAV_INIT_BE(htsp);
+#ifdef CONFIG_SPOTIFY
+ NAV_INIT_BE(spotify);
+#endif
hts_thread_create_detached(navigator_thread, NULL);
}
View
@@ -0,0 +1,6 @@
+apifunctions.h: api.h Makefile
+ grep <$< SP_LIBEXPORT|grep -v "#" | sed "s/^SP_LIBEXPORT(\(.*\))\ \(.*\)(\(.*\));/static \1(*f_\2)(\3);/" >$@
+
+ echo >>$@ "static const char *resolvesym(void *handle) {"
+ grep <$< SP_LIBEXPORT|grep -v "#" | sed "s/^SP_LIBEXPORT(\(.*\))\ \(.*\)(\(.*\));/if((f_\2=dlsym(handle,\"\2\"))==NULL) return \"\2\";/" >>$@
+ echo >>$@ "return NULL;}"
Oops, something went wrong.

0 comments on commit c52d371

Please sign in to comment.