Permalink
Browse files

piano: Move to JSON API (v5)

In random order: Thanks to Chris Eby for his work on pithos, to an
anonymous coward for sending me his Android client, to Alex Howard for
sending me the webOS client, to ZigZagJoe for providing a temporary fix
and thanks to everyone who sent Pandora a message.

Although there are a few rough edges here and there this fixes #236.
  • Loading branch information...
1 parent bd9291b commit 63c86dce1e248aa03a99792f56077dc176bcd295 @PromyLOPh committed Apr 27, 2012
Showing with 778 additions and 2,573 deletions.
  1. +23 −24 Makefile
  2. +0 −20 src/libezxml/COPYING
  3. +0 −718 src/libezxml/ezxml.c
  4. +0 −93 src/libezxml/ezxml.h
  5. +51 −154 src/libpiano/crypt.c
  6. +642 −504 src/libpiano/piano.c
  7. +56 −23 src/libpiano/piano.h
  8. +0 −980 src/libpiano/xml.c
  9. +0 −49 src/libpiano/xml.h
  10. +2 −2 src/settings.c
  11. +2 −2 src/ui.c
  12. +2 −4 src/ui_act.c
View
@@ -39,12 +39,10 @@ PIANOBAR_OBJ=${PIANOBAR_SRC:.c=.o}
LIBPIANO_DIR=src/libpiano
LIBPIANO_SRC=\
${LIBPIANO_DIR}/crypt.c \
- ${LIBPIANO_DIR}/piano.c \
- ${LIBPIANO_DIR}/xml.c
+ ${LIBPIANO_DIR}/piano.c
LIBPIANO_HDR=\
${LIBPIANO_DIR}/config.h \
${LIBPIANO_DIR}/crypt_key_output.h \
- ${LIBPIANO_DIR}/xml.h \
${LIBPIANO_DIR}/crypt.h \
${LIBPIANO_DIR}/piano.h \
${LIBPIANO_DIR}/crypt_key_input.h \
@@ -62,13 +60,6 @@ LIBWAITRESS_OBJ=${LIBWAITRESS_SRC:.c=.o}
LIBWAITRESS_RELOBJ=${LIBWAITRESS_SRC:.c=.lo}
LIBWAITRESS_INCLUDE=${LIBWAITRESS_DIR}
-LIBEZXML_DIR=src/libezxml
-LIBEZXML_SRC=${LIBEZXML_DIR}/ezxml.c
-LIBEZXML_HDR=${LIBEZXML_DIR}/ezxml.h
-LIBEZXML_OBJ=${LIBEZXML_SRC:.c=.o}
-LIBEZXML_RELOBJ=${LIBEZXML_SRC:.c=.lo}
-LIBEZXML_INCLUDE=${LIBEZXML_DIR}
-
ifeq (${DISABLE_FAAD}, 1)
LIBFAAD_CFLAGS=
LIBFAAD_LDFLAGS=
@@ -88,51 +79,59 @@ endif
LIBGNUTLS_CFLAGS=
LIBGNUTLS_LDFLAGS=-lgnutls
+LIBGCRYPT_CFLAGS=
+LIBGCRYPT_LDFLAGS=-lgcrypt
+
+LIBJSONC_CFLAGS=$(shell pkg-config --cflags json)
+LIBJSONC_LDFLAGS=$(shell pkg-config --libs json)
+
# build pianobar
ifeq (${DYNLINK},1)
pianobar: ${PIANOBAR_OBJ} ${PIANOBAR_HDR} libpiano.so.0
@echo " LINK $@"
@${CC} -o $@ ${PIANOBAR_OBJ} ${LDFLAGS} -lao -lpthread -lm -L. -lpiano \
- ${LIBFAAD_LDFLAGS} ${LIBMAD_LDFLAGS} ${LIBGNUTLS_LDFLAGS}
+ ${LIBFAAD_LDFLAGS} ${LIBMAD_LDFLAGS} ${LIBGNUTLS_LDFLAGS} \
+ ${LIBGCRYPT_LDFLAGS} ${LIBJSONC_LDFLAGS}
else
pianobar: ${PIANOBAR_OBJ} ${PIANOBAR_HDR} ${LIBPIANO_OBJ} ${LIBWAITRESS_OBJ} \
- ${LIBWAITRESS_HDR} ${LIBEZXML_OBJ} ${LIBEZXML_HDR}
+ ${LIBWAITRESS_HDR}
@echo " LINK $@"
@${CC} ${CFLAGS} ${LDFLAGS} ${PIANOBAR_OBJ} ${LIBPIANO_OBJ} \
- ${LIBWAITRESS_OBJ} ${LIBEZXML_OBJ} -lao -lpthread -lm \
- ${LIBFAAD_LDFLAGS} ${LIBMAD_LDFLAGS} ${LIBGNUTLS_LDFLAGS} -o $@
+ ${LIBWAITRESS_OBJ} -lao -lpthread -lm \
+ ${LIBFAAD_LDFLAGS} ${LIBMAD_LDFLAGS} ${LIBGNUTLS_LDFLAGS} \
+ ${LIBGCRYPT_LDFLAGS} ${LIBJSONC_LDFLAGS} -o $@
endif
# build shared and static libpiano
libpiano.so.0: ${LIBPIANO_RELOBJ} ${LIBPIANO_HDR} ${LIBWAITRESS_RELOBJ} \
- ${LIBWAITRESS_HDR} ${LIBEZXML_RELOBJ} ${LIBEZXML_HDR} \
- ${LIBPIANO_OBJ} ${LIBWAITRESS_OBJ} ${LIBEZXML_OBJ}
+ ${LIBWAITRESS_HDR} ${LIBPIANO_OBJ} ${LIBWAITRESS_OBJ}
@echo " LINK $@"
- @${CC} -shared -Wl,-soname,libpiano.so.0 ${CFLAGS} ${LDFLAGS} ${LIBGNUTLS_LDFLAGS} \
+ @${CC} -shared -Wl,-soname,libpiano.so.0 ${CFLAGS} ${LDFLAGS} \
+ ${LIBGNUTLS_LDFLAGS} ${LIBGCRYPT_LDFLAGS} \
-o libpiano.so.0.0.0 ${LIBPIANO_RELOBJ} \
- ${LIBWAITRESS_RELOBJ} ${LIBEZXML_RELOBJ}
+ ${LIBWAITRESS_RELOBJ}
@ln -s libpiano.so.0.0.0 libpiano.so.0
@ln -s libpiano.so.0 libpiano.so
@echo " AR libpiano.a"
- @${AR} rcs libpiano.a ${LIBPIANO_OBJ} ${LIBWAITRESS_OBJ} ${LIBEZXML_OBJ}
+ @${AR} rcs libpiano.a ${LIBPIANO_OBJ} ${LIBWAITRESS_OBJ}
%.o: %.c
@echo " CC $<"
@${CC} ${CFLAGS} -I ${LIBPIANO_INCLUDE} -I ${LIBWAITRESS_INCLUDE} \
- -I ${LIBEZXML_INCLUDE} ${LIBFAAD_CFLAGS} \
- ${LIBMAD_CFLAGS} ${LIBGNUTLS_CFLAGS} -c -o $@ $<
+ ${LIBFAAD_CFLAGS} ${LIBMAD_CFLAGS} ${LIBGNUTLS_CFLAGS} \
+ ${LIBJSONC_CFLAGS} -c -o $@ $<
# create position independent code (for shared libraries)
%.lo: %.c
@echo " CC $< (PIC)"
@${CC} ${CFLAGS} -I ${LIBPIANO_INCLUDE} -I ${LIBWAITRESS_INCLUDE} \
- -I ${LIBEZXML_INCLUDE} -c -fPIC -o $@ $<
+ -c -fPIC -o $@ $<
clean:
@echo " CLEAN"
@${RM} ${PIANOBAR_OBJ} ${LIBPIANO_OBJ} ${LIBWAITRESS_OBJ} ${LIBWAITRESS_OBJ}/test.o \
- ${LIBEZXML_OBJ} ${LIBPIANO_RELOBJ} ${LIBWAITRESS_RELOBJ} \
- ${LIBEZXML_RELOBJ} pianobar libpiano.so* libpiano.a waitress-test
+ ${LIBPIANO_RELOBJ} ${LIBWAITRESS_RELOBJ} pianobar libpiano.so* \
+ libpiano.a waitress-test
all: pianobar
View
@@ -1,20 +0,0 @@
-Copyright 2004-2006 Aaron Voisine <aaron@voisine.org>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Oops, something went wrong.

0 comments on commit 63c86dc

Please sign in to comment.