summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Makefile6
-rw-r--r--lib/test.c12
2 files changed, 16 insertions, 2 deletions
diff --git a/lib/Makefile b/lib/Makefile
index 789bf93..5e4f4b3 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -12,7 +12,7 @@ HLIB = -L. -lhorchi
DEMO = demo
TEST = tst
-LIBOBJS = common.o config.o db.o epgservice.o dbdict.o json.o
+LIBOBJS = common.o config.o db.o epgservice.o dbdict.o json.o xml.o
ifdef USEJPEG
LIBOBJS += imgtools.o
@@ -29,6 +29,7 @@ BASELIBS = -lrt
BASELIBS += $(shell mysql_config --libs_r)
BASELIBS += $(shell pkg-config --libs uuid)
BASELIBS += $(shell pkg-config --libs zlib)
+BASELIBS += $(shell pkg-config --libs tinyxml2)
ifdef USECURL
BASELIBS += -lcurl
@@ -105,7 +106,8 @@ db.o : db.c $(HEADER) db.h
epgservice.o : epgservice.c $(HEADER) epgservice.h
dbdict.o : dbdict.c $(HEADER) dbdict.h
json.o : json.c $(HEADER) json.h
-python.o : python.c $(HEADER) python.h
+xml.o : xml.c $(HEADER) xml.h
+python.o : python.c $(HEADER) python.h
searchtimer.o : searchtimer.c $(HEADER) searchtimer.h
demo.o : demo.c $(HEADER)
diff --git a/lib/test.c b/lib/test.c
index 11e305a..6de7fdb 100644
--- a/lib/test.c
+++ b/lib/test.c
@@ -17,6 +17,7 @@
#include "db.h"
#include "epgservice.h"
#include "dbdict.h"
+#include "xml.h"
//#include "wol.h"
cDbConnection* connection = 0;
@@ -643,6 +644,17 @@ int main(int argc, char** argv)
cEpgConfig::logstdout = yes;
cEpgConfig::loglevel = 2;
+
+ cXml xml;
+
+ xml.set("<epg2vdr><imagecount>3</imagecount><scrseriesid>255974</scrseriesid><year>2017</year><category>Serie</category><country>D</country><genre>Thiller</genre><director>Franzi Hörisch</director><actor>Cheryl Shepard (Sydney), Mickey Hardt (Mathis), David C. Bunners (Holger), Constantin Lücke (Patrick), Gerry Hungbauer (Thomas), Brigitte Antonius (Johanna), Hermann Toelcke (Gunter), Anja Franke (Merle), Claus Dieter Clausnitzer (Hannes), Maria Fuchs (Carla), Joachim Kretzer (Torben), Madeleine Lierck-Wien (Erika), Jelena Mitschke (Britta), Hakim-Michael Meziani (Ben)</actor><source>DVB/TVSP</source><longdescription>Killer ...Verbundenheit mit der Familie seines Vaters.</longdescription></epg2vdr>");
+
+ for (XMLElement* e = xml.getFirst(); e; e = xml.getNext(e))
+ printf("%s [%s]\n", e->Name(), e->GetText());
+
+ printf("[%s]\n", xml.toText());
+ return 0;
+
tell(0, "'%s' - '%s'", getIpOf("enp3s0"), getMacOf("enp3s0"));
return 0;