diff options
author | geronimo <geronimo013@gmx.de> | 2012-07-22 11:38:43 +0200 |
---|---|---|
committer | geronimo <geronimo013@gmx.de> | 2012-07-22 11:38:43 +0200 |
commit | ab7186c6c116629983dc506c4b53794026518455 (patch) | |
tree | f5508dd32f35509fb45f7cf046a0a8e0bc1c4605 | |
parent | 04a867b018a8c6761047ef8878a4434692673084 (diff) | |
download | cmp-ab7186c6c116629983dc506c4b53794026518455.tar.gz cmp-ab7186c6c116629983dc506c4b53794026518455.tar.bz2 |
worked out new file class
134 files changed, 1160 insertions, 291 deletions
diff --git a/cmps/main.cc b/cmps/main.cc index c918ada..86e14b7 100644 --- a/cmps/main.cc +++ b/cmps/main.cc @@ -1,25 +1,25 @@ /** * ======================== legal notice ====================== - * + * * File: main.cc - * Created: 2. Juli 2012, 16:51 + * Created: 2. Juli 2012, 16 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: cmps - the backend (server) part of compound media player - * + * * CMP - compound media player - * + * * is a client/server mediaplayer intended to play any media from any workstation * without the need to export or mount shares. cmps is an easy to use backend * with a (ready to use) HTML-interface. Additionally the backend supports * authentication via HTTP-digest authorization. * cmpc is a client with vdr-like osd-menues. - * + * * Copyright (c) 2012 Reinhard Mantey, some rights reserved! * published under Creative Commons by-sa * For details see http://creativecommons.org/licenses/by-sa/3.0/ - * + * * The cmp project's homepage is at http://projects.vdr-developer.org/projects/cmp - * + * * -------------------------------------------------------------- */ #include <HTTPServer.h> diff --git a/cmps/nbproject/Makefile-Debug.mk b/cmps/nbproject/Makefile-Debug.mk index a3a76de..183ac43 100644 --- a/cmps/nbproject/Makefile-Debug.mk +++ b/cmps/nbproject/Makefile-Debug.mk @@ -44,6 +44,7 @@ TESTDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}/tests TESTFILES= \ ${TESTDIR}/TestFiles/f1 \ ${TESTDIR}/TestFiles/f3 \ + ${TESTDIR}/TestFiles/f5 \ ${TESTDIR}/TestFiles/f2 \ ${TESTDIR}/TestFiles/f4 @@ -104,6 +105,10 @@ ${TESTDIR}/TestFiles/f3: ${TESTDIR}/tests/ConnectionHandlerTest.o ${OBJECTFILES: ${MKDIR} -p ${TESTDIR}/TestFiles ${LINK.cc} -o ${TESTDIR}/TestFiles/f3 $^ ${LDLIBSOPTIONS} +${TESTDIR}/TestFiles/f5: ${TESTDIR}/tests/FileSystemTest.o ${OBJECTFILES:%.o=%_nomain.o} + ${MKDIR} -p ${TESTDIR}/TestFiles + ${LINK.cc} -o ${TESTDIR}/TestFiles/f5 $^ ${LDLIBSOPTIONS} + ${TESTDIR}/TestFiles/f2: ${TESTDIR}/tests/FScanTest.o ${OBJECTFILES:%.o=%_nomain.o} ${MKDIR} -p ${TESTDIR}/TestFiles ${LINK.cc} -o ${TESTDIR}/TestFiles/f2 $^ ${LDLIBSOPTIONS} @@ -125,6 +130,12 @@ ${TESTDIR}/tests/ConnectionHandlerTest.o: tests/ConnectionHandlerTest.cc $(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -Iserverlib/include -I../libs/fsScan/include -I../libs/networking/include -I../libs/util/include -I../libs/vdr/include -I. -MMD -MP -MF $@.d -o ${TESTDIR}/tests/ConnectionHandlerTest.o tests/ConnectionHandlerTest.cc +${TESTDIR}/tests/FileSystemTest.o: tests/FileSystemTest.cc + ${MKDIR} -p ${TESTDIR}/tests + ${RM} $@.d + $(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -Iserverlib/include -I../libs/fsScan/include -I../libs/networking/include -I../libs/util/include -I../libs/vdr/include -I. -MMD -MP -MF $@.d -o ${TESTDIR}/tests/FileSystemTest.o tests/FileSystemTest.cc + + ${TESTDIR}/tests/FScanTest.o: tests/FScanTest.cc ${MKDIR} -p ${TESTDIR}/tests ${RM} $@.d @@ -156,6 +167,7 @@ ${OBJECTDIR}/main_nomain.o: ${OBJECTDIR}/main.o main.cc then \ ${TESTDIR}/TestFiles/f1 || true; \ ${TESTDIR}/TestFiles/f3 || true; \ + ${TESTDIR}/TestFiles/f5 || true; \ ${TESTDIR}/TestFiles/f2 || true; \ ${TESTDIR}/TestFiles/f4 || true; \ else \ diff --git a/cmps/nbproject/Makefile-Release.mk b/cmps/nbproject/Makefile-Release.mk index 65f3816..29abff0 100644 --- a/cmps/nbproject/Makefile-Release.mk +++ b/cmps/nbproject/Makefile-Release.mk @@ -45,6 +45,7 @@ TESTFILES= \ ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cmps \ ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cmps \ ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cmps \ + ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cmps \ ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cmps # C Compiler Flags @@ -89,6 +90,10 @@ ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cmps: ${TESTDIR}/tests/ConnectionHand ${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM} ${LINK.cc} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cmps $^ ${LDLIBSOPTIONS} +${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cmps: ${TESTDIR}/tests/FileSystemTest.o ${OBJECTFILES:%.o=%_nomain.o} + ${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM} + ${LINK.cc} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cmps $^ ${LDLIBSOPTIONS} + ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cmps: ${TESTDIR}/tests/FScanTest.o ${OBJECTFILES:%.o=%_nomain.o} ${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM} ${LINK.cc} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cmps $^ ${LDLIBSOPTIONS} @@ -110,6 +115,12 @@ ${TESTDIR}/tests/ConnectionHandlerTest.o: tests/ConnectionHandlerTest.cc $(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${TESTDIR}/tests/ConnectionHandlerTest.o tests/ConnectionHandlerTest.cc +${TESTDIR}/tests/FileSystemTest.o: tests/FileSystemTest.cc + ${MKDIR} -p ${TESTDIR}/tests + ${RM} $@.d + $(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${TESTDIR}/tests/FileSystemTest.o tests/FileSystemTest.cc + + ${TESTDIR}/tests/FScanTest.o: tests/FScanTest.cc ${MKDIR} -p ${TESTDIR}/tests ${RM} $@.d @@ -143,6 +154,7 @@ ${OBJECTDIR}/main_nomain.o: ${OBJECTDIR}/main.o main.cc ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cmps || true; \ ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cmps || true; \ ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cmps || true; \ + ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cmps || true; \ else \ ./${TEST} || true; \ fi diff --git a/cmps/nbproject/configurations.xml b/cmps/nbproject/configurations.xml index 2138f97..e30f086 100644 --- a/cmps/nbproject/configurations.xml +++ b/cmps/nbproject/configurations.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<configurationDescriptor version="80"> +<configurationDescriptor version="84"> <logicalFolder name="root" displayName="root" projectFiles="true" kind="ROOT"> <logicalFolder name="HeaderFiles" displayName="Header Files" @@ -30,6 +30,12 @@ kind="TEST"> <itemPath>tests/ConnectionHandlerTest.cc</itemPath> </logicalFolder> + <logicalFolder name="f5" + displayName="FileSystemTest" + projectFiles="true" + kind="TEST"> + <itemPath>tests/FileSystemTest.cc</itemPath> + </logicalFolder> <logicalFolder name="f2" displayName="FScanTest" projectFiles="true" @@ -202,6 +208,21 @@ <output>${TESTDIR}/TestFiles/f4</output> </linkerTool> </folder> + <folder path="TestFiles/f5"> + <cTool> + <incDir> + <pElem>.</pElem> + </incDir> + </cTool> + <ccTool> + <incDir> + <pElem>.</pElem> + </incDir> + </ccTool> + <linkerTool> + <output>${TESTDIR}/TestFiles/f5</output> + </linkerTool> + </folder> </conf> <conf name="Release" type="1"> <toolsSet> diff --git a/cmps/nbproject/private/configurations.xml b/cmps/nbproject/private/configurations.xml index 10e0756..8cc427d 100644 --- a/cmps/nbproject/private/configurations.xml +++ b/cmps/nbproject/private/configurations.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<configurationDescriptor version="80"> +<configurationDescriptor version="84"> <projectmakefile>Makefile</projectmakefile> <confs> <conf name="Debug" type="1"> diff --git a/cmps/nbproject/private/private.xml b/cmps/nbproject/private/private.xml index a38cae6..6b4ef19 100644 --- a/cmps/nbproject/private/private.xml +++ b/cmps/nbproject/private/private.xml @@ -5,4 +5,5 @@ <activeConfIndexElem>0</activeConfIndexElem> </data> <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1"/> + <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/> </project-private> diff --git a/cmps/serverlib/include/AbstractMediaRequestHandler.h b/cmps/serverlib/include/AbstractMediaRequestHandler.h index ff57e33..f92e87c 100644 --- a/cmps/serverlib/include/AbstractMediaRequestHandler.h +++ b/cmps/serverlib/include/AbstractMediaRequestHandler.h @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: AbstractMediaRequestHandler.h - * Created: 5. Juli 2012, 07:58 + * Created: 5. Juli 2012, 07 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: cmps - the backend (server) part of compound media player * diff --git a/cmps/serverlib/include/CommandHandler.h b/cmps/serverlib/include/CommandHandler.h index 42436da..ee4ddbb 100644 --- a/cmps/serverlib/include/CommandHandler.h +++ b/cmps/serverlib/include/CommandHandler.h @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: CommandHandler.h - * Created: 5. Juli 2012, 16:06 + * Created: 5. Juli 2012, 16 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: cmps - the backend (server) part of compound media player * diff --git a/cmps/serverlib/include/HTMLListAssembler.h b/cmps/serverlib/include/HTMLListAssembler.h index d53d861..8450130 100644 --- a/cmps/serverlib/include/HTMLListAssembler.h +++ b/cmps/serverlib/include/HTMLListAssembler.h @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: HTMLListAssembler.h - * Created: 6. Juli 2012, 09:55 + * Created: 6. Juli 2012, 09 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: cmps - the backend (server) part of compound media player * diff --git a/cmps/serverlib/include/HTTPMediaResponse.h b/cmps/serverlib/include/HTTPMediaResponse.h index 1c7827e..b1ac4ca 100644 --- a/cmps/serverlib/include/HTTPMediaResponse.h +++ b/cmps/serverlib/include/HTTPMediaResponse.h @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: HTTPMediaResponse.h - * Created: 6. Juli 2012, 07:44 + * Created: 6. Juli 2012, 07 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: cmps - the backend (server) part of compound media player * diff --git a/cmps/serverlib/include/JSonListAssembler.h b/cmps/serverlib/include/JSonListAssembler.h index 6185508..463c391 100644 --- a/cmps/serverlib/include/JSonListAssembler.h +++ b/cmps/serverlib/include/JSonListAssembler.h @@ -1,25 +1,25 @@ /** * ======================== legal notice ====================== - * + * * File: JSonListAssembler.h - * Created: 6. Juli 2012, 09:53 + * Created: 6. Juli 2012, 09 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: cmps - the backend (server) part of compound media player - * + * * CMP - compound media player - * + * * is a client/server mediaplayer intended to play any media from any workstation * without the need to export or mount shares. cmps is an easy to use backend * with a (ready to use) HTML-interface. Additionally the backend supports * authentication via HTTP-digest authorization. * cmpc is a client with vdr-like osd-menues. - * + * * Copyright (c) 2012 Reinhard Mantey, some rights reserved! * published under Creative Commons by-sa * For details see http://creativecommons.org/licenses/by-sa/3.0/ - * + * * The cmp project's homepage is at http://projects.vdr-developer.org/projects/cmp - * + * * -------------------------------------------------------------- */ #ifndef JSONLISTASSEMBLER_H diff --git a/cmps/serverlib/include/MediaFileHandler.h b/cmps/serverlib/include/MediaFileHandler.h index 01c7b83..81836d0 100644 --- a/cmps/serverlib/include/MediaFileHandler.h +++ b/cmps/serverlib/include/MediaFileHandler.h @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: MediaFileHandler.h - * Created: 5. Juli 2012, 08:06 + * Created: 5. Juli 2012, 08 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: cmps - the backend (server) part of compound media player * diff --git a/cmps/serverlib/include/MediaListHandler.h b/cmps/serverlib/include/MediaListHandler.h index cc3127c..1662cc8 100644 --- a/cmps/serverlib/include/MediaListHandler.h +++ b/cmps/serverlib/include/MediaListHandler.h @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: MediaListHandler.h - * Created: 5. Juli 2012, 08:06 + * Created: 5. Juli 2012, 08 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: cmps - the backend (server) part of compound media player * diff --git a/cmps/serverlib/serverlib.layout b/cmps/serverlib/serverlib.layout index d8fea17..cff8ff9 100644 --- a/cmps/serverlib/serverlib.layout +++ b/cmps/serverlib/serverlib.layout @@ -1,24 +1,24 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <CodeBlocks_layout_file> <ActiveTarget name="Debug" /> - <File name="src/HTMLListAssembler.cc" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/JSonListAssembler.cc" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="0" topLine="0" /> + <Cursor1 position="1183" topLine="0" /> </Cursor> </File> - <File name="src/MediaListHandler.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/AbstractMediaRequestHandler.cc" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> <Cursor1 position="0" topLine="0" /> </Cursor> </File> - <File name="src/AbstractMediaRequestHandler.cc" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/MediaListHandler.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> <Cursor1 position="0" topLine="0" /> </Cursor> </File> - <File name="src/JSonListAssembler.cc" open="1" top="1" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/HTMLListAssembler.cc" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="1183" topLine="0" /> + <Cursor1 position="0" topLine="0" /> </Cursor> </File> </CodeBlocks_layout_file> diff --git a/cmps/serverlib/serverlib.layout.save b/cmps/serverlib/serverlib.layout.save index 6d13f5b..cff8ff9 100644 --- a/cmps/serverlib/serverlib.layout.save +++ b/cmps/serverlib/serverlib.layout.save @@ -1,22 +1,22 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <CodeBlocks_layout_file> <ActiveTarget name="Debug" /> - <File name="src/JSonListAssembler.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/JSonListAssembler.cc" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="1138" topLine="0" /> + <Cursor1 position="1183" topLine="0" /> </Cursor> </File> - <File name="src/MediaListHandler.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/AbstractMediaRequestHandler.cc" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> <Cursor1 position="0" topLine="0" /> </Cursor> </File> - <File name="src/HTMLListAssembler.cc" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/MediaListHandler.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> <Cursor1 position="0" topLine="0" /> </Cursor> </File> - <File name="src/AbstractMediaRequestHandler.cc" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/HTMLListAssembler.cc" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> <Cursor1 position="0" topLine="0" /> </Cursor> diff --git a/cmps/serverlib/src/AbstractMediaRequestHandler.cc b/cmps/serverlib/src/AbstractMediaRequestHandler.cc index b65ad13..ad845b6 100644 --- a/cmps/serverlib/src/AbstractMediaRequestHandler.cc +++ b/cmps/serverlib/src/AbstractMediaRequestHandler.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: AbstractMediaRequestHandler.cc - * Created: 5. Juli 2012, 07:58 + * Created: 5. Juli 2012, 07 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: cmps - the backend (server) part of compound media player * diff --git a/cmps/serverlib/src/CommandHandler.cc b/cmps/serverlib/src/CommandHandler.cc index b1a17b8..5449d25 100644 --- a/cmps/serverlib/src/CommandHandler.cc +++ b/cmps/serverlib/src/CommandHandler.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: CommandHandler.cc - * Created: 5. Juli 2012, 16:06 + * Created: 5. Juli 2012, 16 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: cmps - the backend (server) part of compound media player * diff --git a/cmps/serverlib/src/HTMLListAssembler.cc b/cmps/serverlib/src/HTMLListAssembler.cc index 8ef3261..c455fc1 100644 --- a/cmps/serverlib/src/HTMLListAssembler.cc +++ b/cmps/serverlib/src/HTMLListAssembler.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: HTMLListAssembler.cc - * Created: 6. Juli 2012, 09:55 + * Created: 6. Juli 2012, 09 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: cmps - the backend (server) part of compound media player * @@ -25,6 +25,7 @@ #include <HTMLListAssembler.h> #include <AbstractMedia.h> #include <StringBuilder.h> +#include <Url.h> #include <tools.h> cHTMLListAssembler::cHTMLListAssembler() @@ -97,11 +98,14 @@ cStringBuilder &cHTMLListAssembler::genDelim(cStringBuilder &sb) cStringBuilder &cHTMLListAssembler::genMediaLink(cStringBuilder &sb, void *Element, bool odd) { cAbstractMedia *m = (cAbstractMedia *)Element; + cUrl *uri = new cUrl(m->LogicalPath()); + char *lp = uri->ToString(); sb.Append("<a class=\""); sb.Append(odd ? "odd" : "even"); sb.Append("\" href=\""); - sb.Append(m->LogicalPath()); + sb.Append(lp); + free(lp); sb.Append("\">"); switch (m->MediaType()) { case cAbstractMedia::Audio: sb.Append("[A] "); break; diff --git a/cmps/serverlib/src/HTTPMediaResponse.cc b/cmps/serverlib/src/HTTPMediaResponse.cc index 667d114..ca08576 100644 --- a/cmps/serverlib/src/HTTPMediaResponse.cc +++ b/cmps/serverlib/src/HTTPMediaResponse.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: HTTPMediaResponse.cc - * Created: 6. Juli 2012, 07:44 + * Created: 6. Juli 2012, 07 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: cmps - the backend (server) part of compound media player * diff --git a/cmps/serverlib/src/JSonListAssembler.cc b/cmps/serverlib/src/JSonListAssembler.cc index 8660953..f49b8ec 100644 --- a/cmps/serverlib/src/JSonListAssembler.cc +++ b/cmps/serverlib/src/JSonListAssembler.cc @@ -1,30 +1,31 @@ /** * ======================== legal notice ====================== - * + * * File: JSonListAssembler.cc - * Created: 6. Juli 2012, 09:53 + * Created: 6. Juli 2012, 09 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: cmps - the backend (server) part of compound media player - * + * * CMP - compound media player - * + * * is a client/server mediaplayer intended to play any media from any workstation * without the need to export or mount shares. cmps is an easy to use backend * with a (ready to use) HTML-interface. Additionally the backend supports * authentication via HTTP-digest authorization. * cmpc is a client with vdr-like osd-menues. - * + * * Copyright (c) 2012 Reinhard Mantey, some rights reserved! * published under Creative Commons by-sa * For details see http://creativecommons.org/licenses/by-sa/3.0/ - * + * * The cmp project's homepage is at http://projects.vdr-developer.org/projects/cmp - * + * * -------------------------------------------------------------- */ #include <JSonListAssembler.h> #include <AbstractMedia.h> #include <JSonWriter.h> +#include <Url.h> cJSonListAssembler::cJSonListAssembler() { @@ -57,11 +58,14 @@ bool cJSonListAssembler::OpenList(cStringBuilder &sb, std::map<int, size_t> &Cat bool cJSonListAssembler::AddElement(cStringBuilder &sb, void *ListElement, bool odd) { cAbstractMedia *m = (cAbstractMedia *)ListElement; + cUrl *uri = new cUrl(m->LogicalPath()); + char *lp = uri->ToString(); writer->Object(); writer->Key("name").Value(m->Name()); writer->Key("type").Value(m->MediaType()); - writer->Key("path").Value(m->LogicalPath()); + writer->Key("path").Value(lp); + free(lp); writer->EndObject(); return true; diff --git a/cmps/serverlib/src/MediaFileHandler.cc b/cmps/serverlib/src/MediaFileHandler.cc index d16a033..b2e97a3 100644 --- a/cmps/serverlib/src/MediaFileHandler.cc +++ b/cmps/serverlib/src/MediaFileHandler.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: MediaFileHandler.cc - * Created: 5. Juli 2012, 08:06 + * Created: 5. Juli 2012, 08 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: cmps - the backend (server) part of compound media player * diff --git a/cmps/serverlib/src/MediaListHandler.cc b/cmps/serverlib/src/MediaListHandler.cc index 029c137..cdb2b21 100644 --- a/cmps/serverlib/src/MediaListHandler.cc +++ b/cmps/serverlib/src/MediaListHandler.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: MediaListHandler.cc - * Created: 5. Juli 2012, 08:06 + * Created: 5. Juli 2012, 08 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: cmps - the backend (server) part of compound media player * diff --git a/cmps/tests/CodecTest.cc b/cmps/tests/CodecTest.cc index 071ff7b..3403810 100644 --- a/cmps/tests/CodecTest.cc +++ b/cmps/tests/CodecTest.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: CodecTest.cc - * Created: 09.07.2012, 05:44:50 + * Created: 09.07.2012, 05 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: cmps - the backend (server) part of compound media player * @@ -35,6 +35,10 @@ static const char *TT[] = { , "http://localhost:12345/test/Mukke/36%20%20%20130%20-%20R.I.O.%20ft%20Jerry%20Ropero%20vs.%20Mendonca%20-%20Do%20Rio-De%20Janeiro%20Berinbau%20(Bootleg%20Edit).mp3" , "http://localhost:12345/import/Das_Verm%C3%A4chtnis_der_Tempelritter/2012-07-02.22.10.36-0.rec" , NULL +, "file:///media/audio/Collection/Rock/XIII. Století/Vampire Songs: Tajemství gothických archivů/(1 - 05) Smutné časy.mp3" +, "file:///media/audio/Collection/Rock/XIII. Století/Vampire Songs: Tajemství gothických archivů/(1 - 06) Starý hrabě.mp3" +, "file:///media/audio/Collection/Rock/XIII. Století/Nosferatu/(1 - 03) Nevěsta temnot.mp3" +, NULL }; void test1() @@ -54,6 +58,20 @@ void test1() void test2() { std::cout << "CodecTest test 2" << std::endl; + cURLEncoder *ue = new cURLEncoder(); + const char **p; + char *newText; + + for (p = TT + 8; p && *p; ++p) { + newText = ue->Encode(*p); + std::cout << "original: " << *p << std::endl; + std::cout << "encoded.: " << newText << std::endl << std::endl; + } +} + +void test3() +{ + std::cout << "CodecTest test 3" << std::endl; std::cout << "%TEST_FAILED% time=0 testname=test2 (CodecTest) message=error message sample" << std::endl; } @@ -66,9 +84,9 @@ int main(int argc, char** argv) test1(); std::cout << "%TEST_FINISHED% time=0 test1 (CodecTest)" << std::endl; -// std::cout << "%TEST_STARTED% test2 (CodecTest)\n" << std::endl; -// test2(); -// std::cout << "%TEST_FINISHED% time=0 test2 (CodecTest)" << std::endl; + std::cout << "%TEST_STARTED% test2 (CodecTest)\n" << std::endl; + test2(); + std::cout << "%TEST_FINISHED% time=0 test2 (CodecTest)" << std::endl; std::cout << "%SUITE_FINISHED% time=0" << std::endl; diff --git a/cmps/tests/ConnectionHandlerTest.cc b/cmps/tests/ConnectionHandlerTest.cc index e32fbb3..6e0257b 100644 --- a/cmps/tests/ConnectionHandlerTest.cc +++ b/cmps/tests/ConnectionHandlerTest.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: ConnectionHandlerTest.cc - * Created: 10.07.2012, 05:48:23 + * Created: 10.07.2012, 05 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: cmps - the backend (server) part of compound media player * diff --git a/cmps/tests/DirTest.cc b/cmps/tests/DirTest.cc index 4a1f1a7..b6270a9 100644 --- a/cmps/tests/DirTest.cc +++ b/cmps/tests/DirTest.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: DirTest.cc - * Created: 02.07.2012, 18:07:18 + * Created: 02.07.2012, 18 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: cmps - the backend (server) part of compound media player * diff --git a/cmps/tests/FScanTest.cc b/cmps/tests/FScanTest.cc index 86f0895..2684557 100644 --- a/cmps/tests/FScanTest.cc +++ b/cmps/tests/FScanTest.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: FScanTest.cc - * Created: 02.07.2012, 16:57:48 + * Created: 02.07.2012, 16 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: cmps - the backend (server) part of compound media player * @@ -77,7 +77,7 @@ void FScanTest::test4() cAbstractMedia *media; std::cout << "FScanTest test 4" << std::endl; - scanner.SetMediaFactory(new cMediaFactory("/media")); + scanner.SetMediaFactory(new cMediaFactory("/media/video")); uint64_t start = cTimeMs::Now(); scanner.Refresh(); diff --git a/cmps/tests/FileSystemTest.cc b/cmps/tests/FileSystemTest.cc new file mode 100644 index 0000000..99a76d0 --- /dev/null +++ b/cmps/tests/FileSystemTest.cc @@ -0,0 +1,77 @@ +/** + * ======================== legal notice ====================== + * + * File: FileSystemTest.cc + * Created: 21.07.2012, 12:40:48 + * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> + * Project: cmps - the backend (server) part of compound media player + * + * CMP - compound media player + * + * is a client/server mediaplayer intended to play any media from any workstation + * without the need to export or mount shares. cmps is an easy to use backend + * with a (ready to use) HTML-interface. Additionally the backend supports + * authentication via HTTP-digest authorization. + * cmpc is a client with vdr-like osd-menues. + * + * Copyright (c) 2012 Reinhard Mantey, some rights reserved! + * published under Creative Commons by-sa + * For details see http://creativecommons.org/licenses/by-sa/3.0/ + * + * The cmp project's homepage is at http://projects.vdr-developer.org/projects/cmp + * + * -------------------------------------------------------------- + */ +#include <stdlib.h> +#include <iostream> +#include <FileSystem.h> +#include <File.h> + +/* + * Simple C++ Test Suite + */ + +void test1() +{ + std::cout << "FileSystemTest test 1" << std::endl; + cFile *f = new cFile("/media/xchange/"); + + std::cout << "got file: " << f->AbsolutePath() << std::endl; + + cFile *other = f->Parent(); + + std::cout << "parent is file: " << other->AbsolutePath() << std::endl; + + cFile *newOne = new cFile(*other, "/video/test/blah"); + + std::cout << "assembled file: " << newOne->AbsolutePath() << std::endl; + + delete newOne; + delete other; + delete f; +} + +void test2() +{ + std::cout << "FileSystemTest test 2" << std::endl; + std::cout << "%TEST_FAILED% time=0 testname=test2 (FileSystemTest) message=error message sample" << std::endl; +} + +int main(int argc, char** argv) +{ + std::cout << "%SUITE_STARTING% FileSystemTest" << std::endl; + std::cout << "%SUITE_STARTED%" << std::endl; + + std::cout << "%TEST_STARTED% test1 (FileSystemTest)" << std::endl; + test1(); + std::cout << "%TEST_FINISHED% time=0 test1 (FileSystemTest)" << std::endl; + + std::cout << "%TEST_STARTED% test2 (FileSystemTest)\n" << std::endl; + test2(); + std::cout << "%TEST_FINISHED% time=0 test2 (FileSystemTest)" << std::endl; + + std::cout << "%SUITE_FINISHED% time=0" << std::endl; + + return (EXIT_SUCCESS); +} + diff --git a/cmps/tests/JSonTest.cc b/cmps/tests/JSonTest.cc index 21fc394..422a845 100644 --- a/cmps/tests/JSonTest.cc +++ b/cmps/tests/JSonTest.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: JSonTest.cc - * Created: 12.07.2012, 07:31:46 + * Created: 12.07.2012, 07 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: cmps - the backend (server) part of compound media player * diff --git a/cmps/tests/StringBuilderTest.cc b/cmps/tests/StringBuilderTest.cc index 4a0443b..bb07d2e 100644 --- a/cmps/tests/StringBuilderTest.cc +++ b/cmps/tests/StringBuilderTest.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: StringBuilderTest.cc - * Created: 06.07.2012, 18:28:08 + * Created: 06.07.2012, 18 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: cmps - the backend (server) part of compound media player * diff --git a/cmps/tests/URLTest.cc b/cmps/tests/URLTest.cc index 9dc69c3..5f13ca0 100644 --- a/cmps/tests/URLTest.cc +++ b/cmps/tests/URLTest.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: URLTest.cc - * Created: 04.07.2012, 09:25:57 + * Created: 04.07.2012, 09 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: cmps - the backend (server) part of compound media player * diff --git a/cmps/tests/UTF8Test.cc b/cmps/tests/UTF8Test.cc index 70c7cc1..fa417b8 100644 --- a/cmps/tests/UTF8Test.cc +++ b/cmps/tests/UTF8Test.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: UTF8Test.cc - * Created: 05.07.2012, 15:19:07 + * Created: 05.07.2012, 15 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: cmps - the backend (server) part of compound media player * diff --git a/libs/fsScan/fsScan.cbp b/libs/fsScan/fsScan.cbp index bef32fe..8f51f56 100644 --- a/libs/fsScan/fsScan.cbp +++ b/libs/fsScan/fsScan.cbp @@ -7,7 +7,7 @@ <Option compiler="gcc" /> <Build> <Target title="Debug"> - <Option output="libfsScan" prefix_auto="1" extension_auto="1" /> + <Option output="fsScan" prefix_auto="1" extension_auto="1" /> <Option working_dir="" /> <Option object_output="obj/Debug/" /> <Option type="2" /> @@ -19,7 +19,7 @@ </Compiler> </Target> <Target title="Release"> - <Option output="libfsScan" prefix_auto="1" extension_auto="1" /> + <Option output="fsScan" prefix_auto="1" extension_auto="1" /> <Option working_dir="" /> <Option object_output="obj/Release/" /> <Option type="2" /> @@ -47,6 +47,9 @@ <Unit filename="include/AbstractMultiFileMovie.h" /> <Unit filename="include/Audio.h" /> <Unit filename="include/DVDImage.h" /> + <Unit filename="include/File.h" /> + <Unit filename="include/FileRepresentation.h" /> + <Unit filename="include/FileSystem.h" /> <Unit filename="include/FilesystemScanner.h" /> <Unit filename="include/LegacyVdrRecording.h" /> <Unit filename="include/MediaFactory.h" /> @@ -57,6 +60,9 @@ <Unit filename="src/AbstractMultiFileMovie.cc" /> <Unit filename="src/Audio.cc" /> <Unit filename="src/DVDImage.cc" /> + <Unit filename="src/File.cc" /> + <Unit filename="src/FileRepresentation.cc" /> + <Unit filename="src/FileSystem.cc" /> <Unit filename="src/FilesystemScanner.cc" /> <Unit filename="src/LegacyVdrRecording.cc" /> <Unit filename="src/MediaFactory.cc" /> diff --git a/libs/fsScan/fsScan.layout b/libs/fsScan/fsScan.layout index f1a8eb2..f2bee52 100644 --- a/libs/fsScan/fsScan.layout +++ b/libs/fsScan/fsScan.layout @@ -1,6 +1,41 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <CodeBlocks_layout_file> <ActiveTarget name="Debug" /> + <File name="src/FilesystemScanner.cc" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <Cursor> + <Cursor1 position="0" topLine="0" /> + </Cursor> + </File> + <File name="include/FileSystem.h" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <Cursor> + <Cursor1 position="627" topLine="0" /> + </Cursor> + </File> + <File name="src/FileRepresentation.cc" open="1" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <Cursor> + <Cursor1 position="127" topLine="0" /> + </Cursor> + </File> + <File name="include/FileRepresentation.h" open="1" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <Cursor> + <Cursor1 position="607" topLine="0" /> + </Cursor> + </File> + <File name="src/FileSystem.cc" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <Cursor> + <Cursor1 position="3048" topLine="0" /> + </Cursor> + </File> + <File name="src/File.cc" open="1" top="1" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <Cursor> + <Cursor1 position="2198" topLine="0" /> + </Cursor> + </File> + <File name="include/File.h" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <Cursor> + <Cursor1 position="621" topLine="0" /> + </Cursor> + </File> <File name="src/MediaFactory.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> <Cursor1 position="0" topLine="0" /> diff --git a/libs/fsScan/fsScan.layout.save b/libs/fsScan/fsScan.layout.save index f1a8eb2..22810d1 100644 --- a/libs/fsScan/fsScan.layout.save +++ b/libs/fsScan/fsScan.layout.save @@ -1,6 +1,41 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <CodeBlocks_layout_file> <ActiveTarget name="Debug" /> + <File name="src/FilesystemScanner.cc" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <Cursor> + <Cursor1 position="0" topLine="0" /> + </Cursor> + </File> + <File name="include/FileSystem.h" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <Cursor> + <Cursor1 position="439" topLine="0" /> + </Cursor> + </File> + <File name="src/FileRepresentation.cc" open="1" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <Cursor> + <Cursor1 position="127" topLine="0" /> + </Cursor> + </File> + <File name="include/FileRepresentation.h" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <Cursor> + <Cursor1 position="607" topLine="0" /> + </Cursor> + </File> + <File name="src/FileSystem.cc" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <Cursor> + <Cursor1 position="492" topLine="0" /> + </Cursor> + </File> + <File name="src/File.cc" open="1" top="1" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <Cursor> + <Cursor1 position="1130" topLine="0" /> + </Cursor> + </File> + <File name="include/File.h" open="1" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <Cursor> + <Cursor1 position="677" topLine="0" /> + </Cursor> + </File> <File name="src/MediaFactory.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> <Cursor1 position="0" topLine="0" /> diff --git a/libs/fsScan/include/AbstractMedia.h b/libs/fsScan/include/AbstractMedia.h index 4b8fedd..6ca9677 100644 --- a/libs/fsScan/include/AbstractMedia.h +++ b/libs/fsScan/include/AbstractMedia.h @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: AbstractMedia.h - * Created: 2. Juli 2012, 14:33 + * Created: 2. Juli 2012, 14 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libfsScan: mediatypes and filesystem scanning * diff --git a/libs/fsScan/include/AbstractMultiFileMovie.h b/libs/fsScan/include/AbstractMultiFileMovie.h index e3bd520..e7bad44 100644 --- a/libs/fsScan/include/AbstractMultiFileMovie.h +++ b/libs/fsScan/include/AbstractMultiFileMovie.h @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: AbstractMultiFileMovie.h - * Created: 3. Juli 2012, 07:39 + * Created: 3. Juli 2012, 07 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libfsScan: mediatypes and filesystem scanning * diff --git a/libs/fsScan/include/Audio.h b/libs/fsScan/include/Audio.h index d1a784a..2b2046d 100644 --- a/libs/fsScan/include/Audio.h +++ b/libs/fsScan/include/Audio.h @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: Audio.h - * Created: 2. Juli 2012, 15:00 + * Created: 2. Juli 2012, 15 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libfsScan: mediatypes and filesystem scanning * diff --git a/libs/fsScan/include/DVDImage.h b/libs/fsScan/include/DVDImage.h index e773e72..4f3af2e 100644 --- a/libs/fsScan/include/DVDImage.h +++ b/libs/fsScan/include/DVDImage.h @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: DVDImage.h - * Created: 3. Juli 2012, 08:34 + * Created: 3. Juli 2012, 08 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libfsScan: mediatypes and filesystem scanning * diff --git a/libs/fsScan/include/File.h b/libs/fsScan/include/File.h new file mode 100644 index 0000000..4883cdd --- /dev/null +++ b/libs/fsScan/include/File.h @@ -0,0 +1,65 @@ +/** + * ======================== legal notice ====================== + * + * File: File.h + * Created: 21. Juli 2012, 12:41 + * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> + * Project: libfsScan: mediatypes and filesystem scanning + * + * CMP - compound media player + * + * is a client/server mediaplayer intended to play any media from any workstation + * without the need to export or mount shares. cmps is an easy to use backend + * with a (ready to use) HTML-interface. Additionally the backend supports + * authentication via HTTP-digest authorization. + * cmpc is a client with vdr-like osd-menues. + * + * Copyright (c) 2012 Reinhard Mantey, some rights reserved! + * published under Creative Commons by-sa + * For details see http://creativecommons.org/licenses/by-sa/3.0/ + * + * The cmp project's homepage is at http://projects.vdr-developer.org/projects/cmp + * + * -------------------------------------------------------------- + */ +#ifndef FILE_H +#define FILE_H + +#include <sys/types.h> + +class cFileSystem; +class cFileRepresentation; +class cStringBuilder; +class cFile +{ +public: + cFile(const char *Path); + cFile(const cFile &Parent, const char *RelativePath); + virtual ~cFile(); + + bool CanRead(void) const; + bool CanWrite(void) const; + bool CanExecute(void) const; + bool Exists(void) const; + bool IsDirectory(void) const; + bool IsFile(void) const; + bool IsSymbolic(void) const; + off64_t Size(void) const; + ulong LastModified(void) const; + const char *Name(void) const; + + char *AbsolutePath(void) const; + cFile *Parent(void) const; + void VisitFiles(int (*cb)(cFile *, const char *)); + + static void Cleanup(void); + +private: + cFile(const cFileRepresentation *); + const cFileRepresentation *rep; + static cFileSystem *fs; + friend class cFileSystem; +}; + +#endif /* FILE_H */ + diff --git a/libs/fsScan/include/FileRepresentation.h b/libs/fsScan/include/FileRepresentation.h new file mode 100644 index 0000000..2193929 --- /dev/null +++ b/libs/fsScan/include/FileRepresentation.h @@ -0,0 +1,53 @@ +/** + * ======================== legal notice ====================== + * + * File: FileRepresentation.h + * Created: 21. Juli 2012, 12:41 + * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> + * Project: libfsScan: mediatypes and filesystem scanning + * + * CMP - compound media player + * + * is a client/server mediaplayer intended to play any media from any workstation + * without the need to export or mount shares. cmps is an easy to use backend + * with a (ready to use) HTML-interface. Additionally the backend supports + * authentication via HTTP-digest authorization. + * cmpc is a client with vdr-like osd-menues. + * + * Copyright (c) 2012 Reinhard Mantey, some rights reserved! + * published under Creative Commons by-sa + * For details see http://creativecommons.org/licenses/by-sa/3.0/ + * + * The cmp project's homepage is at http://projects.vdr-developer.org/projects/cmp + * + * -------------------------------------------------------------- + */ +#ifndef FILEREPRESENTATION_H +#define FILEREPRESENTATION_H + +#include <sys/types.h> + +class cStringBuilder; +class cFileRepresentation +{ +public: + virtual ~cFileRepresentation(); + + cStringBuilder *internalPath(void) const; + const cFileRepresentation *getParent(void) const { return parent; }; + +private: + cFileRepresentation(const char *Path); + cFileRepresentation(const cFileRepresentation *Parent, const char *Path); + bool exists; + bool isRoot; + mode_t mode; + off64_t size; + ulong lastModified; + char *name; + const cFileRepresentation *parent; + friend class cFileSystem; + friend class cFile; +}; + +#endif // FILEREPRESENTATION_H diff --git a/libs/fsScan/include/FileSystem.h b/libs/fsScan/include/FileSystem.h new file mode 100644 index 0000000..eb0264e --- /dev/null +++ b/libs/fsScan/include/FileSystem.h @@ -0,0 +1,51 @@ +/** + * ======================== legal notice ====================== + * + * File: FileSystem.h + * Created: 21. Juli 2012, 12:44 + * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> + * Project: libfsScan: mediatypes and filesystem scanning + * + * CMP - compound media player + * + * is a client/server mediaplayer intended to play any media from any workstation + * without the need to export or mount shares. cmps is an easy to use backend + * with a (ready to use) HTML-interface. Additionally the backend supports + * authentication via HTTP-digest authorization. + * cmpc is a client with vdr-like osd-menues. + * + * Copyright (c) 2012 Reinhard Mantey, some rights reserved! + * published under Creative Commons by-sa + * For details see http://creativecommons.org/licenses/by-sa/3.0/ + * + * The cmp project's homepage is at http://projects.vdr-developer.org/projects/cmp + * + * -------------------------------------------------------------- + */ +#ifndef FILESYSTEM_H +#define FILESYSTEM_H + +#include <tr1/unordered_map> +#include <string> + +class cFile; +class cFileRepresentation; +class cFileSystem +{ +public: + cFileSystem(); + virtual ~cFileSystem(); + + cFileRepresentation *representationOfFile(const char *Path); + cFileRepresentation *representationOfFile(const cFile &Parent, const char *Path); + +private: + cFileRepresentation *cacheEntry(const char *Path); + std::tr1::unordered_map<std::string, cFileRepresentation *> fileCache; + static char PathSeparator; + static char RootPath[4]; + friend class cFileRepresentation; +}; + +#endif /* FILESYSTEM_H */ + diff --git a/libs/fsScan/include/FilesystemScanner.h b/libs/fsScan/include/FilesystemScanner.h index 7a188ce..b90b50d 100644 --- a/libs/fsScan/include/FilesystemScanner.h +++ b/libs/fsScan/include/FilesystemScanner.h @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: FilesystemScanner.h - * Created: 2. Juli 2012, 13:58 + * Created: 2. Juli 2012, 13 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libfsScan: mediatypes and filesystem scanning * diff --git a/libs/fsScan/include/LegacyVdrRecording.h b/libs/fsScan/include/LegacyVdrRecording.h index 147e6fc..9c191be 100644 --- a/libs/fsScan/include/LegacyVdrRecording.h +++ b/libs/fsScan/include/LegacyVdrRecording.h @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: LegacyVdrRecording.h - * Created: 3. Juli 2012, 08:16 + * Created: 3. Juli 2012, 08 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libfsScan: mediatypes and filesystem scanning * diff --git a/libs/fsScan/include/MediaFactory.h b/libs/fsScan/include/MediaFactory.h index b9b5391..a3b1987 100644 --- a/libs/fsScan/include/MediaFactory.h +++ b/libs/fsScan/include/MediaFactory.h @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: MediaFactory.h - * Created: 2. Juli 2012, 15:43 + * Created: 2. Juli 2012, 15 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libfsScan: mediatypes and filesystem scanning * diff --git a/libs/fsScan/include/Movie.h b/libs/fsScan/include/Movie.h index af8b437..63cccc7 100644 --- a/libs/fsScan/include/Movie.h +++ b/libs/fsScan/include/Movie.h @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: Movie.h - * Created: 2. Juli 2012, 15:12 + * Created: 2. Juli 2012, 15 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libfsScan: mediatypes and filesystem scanning * diff --git a/libs/fsScan/include/Picture.h b/libs/fsScan/include/Picture.h index a911a71..a1998e7 100644 --- a/libs/fsScan/include/Picture.h +++ b/libs/fsScan/include/Picture.h @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: Picture.h - * Created: 2. Juli 2012, 15:18 + * Created: 2. Juli 2012, 15 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libfsScan: mediatypes and filesystem scanning * diff --git a/libs/fsScan/include/VdrRecording.h b/libs/fsScan/include/VdrRecording.h index 2e3904b..25e5996 100644 --- a/libs/fsScan/include/VdrRecording.h +++ b/libs/fsScan/include/VdrRecording.h @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: VdrRecording.h - * Created: 3. Juli 2012, 08:30 + * Created: 3. Juli 2012, 08 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libfsScan: mediatypes and filesystem scanning * diff --git a/libs/fsScan/nbproject/Makefile-Debug.mk b/libs/fsScan/nbproject/Makefile-Debug.mk index a13c068..316d5a4 100644 --- a/libs/fsScan/nbproject/Makefile-Debug.mk +++ b/libs/fsScan/nbproject/Makefile-Debug.mk @@ -41,7 +41,10 @@ OBJECTFILES= \ ${OBJECTDIR}/src/VdrRecording.o \ ${OBJECTDIR}/src/MediaFactory.o \ ${OBJECTDIR}/src/LegacyVdrRecording.o \ + ${OBJECTDIR}/src/FileRepresentation.o \ + ${OBJECTDIR}/src/File.o \ ${OBJECTDIR}/src/FilesystemScanner.o \ + ${OBJECTDIR}/src/FileSystem.o \ ${OBJECTDIR}/src/AbstractMultiFileMovie.o \ ${OBJECTDIR}/src/AbstractMedia.o \ ${OBJECTDIR}/src/Movie.o @@ -76,52 +79,67 @@ ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libfsscan.a: ${OBJECTFILES} ${OBJECTDIR}/src/Picture.o: src/Picture.cc ${MKDIR} -p ${OBJECTDIR}/src ${RM} $@.d - $(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I../networking/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/Picture.o src/Picture.cc + $(COMPILE.cc) -g -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE=1 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_REENTRANT -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iinclude -I../networking/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/Picture.o src/Picture.cc ${OBJECTDIR}/src/Audio.o: src/Audio.cc ${MKDIR} -p ${OBJECTDIR}/src ${RM} $@.d - $(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I../networking/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/Audio.o src/Audio.cc + $(COMPILE.cc) -g -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE=1 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_REENTRANT -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iinclude -I../networking/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/Audio.o src/Audio.cc ${OBJECTDIR}/src/DVDImage.o: src/DVDImage.cc ${MKDIR} -p ${OBJECTDIR}/src ${RM} $@.d - $(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I../networking/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/DVDImage.o src/DVDImage.cc + $(COMPILE.cc) -g -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE=1 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_REENTRANT -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iinclude -I../networking/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/DVDImage.o src/DVDImage.cc ${OBJECTDIR}/src/VdrRecording.o: src/VdrRecording.cc ${MKDIR} -p ${OBJECTDIR}/src ${RM} $@.d - $(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I../networking/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/VdrRecording.o src/VdrRecording.cc + $(COMPILE.cc) -g -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE=1 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_REENTRANT -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iinclude -I../networking/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/VdrRecording.o src/VdrRecording.cc ${OBJECTDIR}/src/MediaFactory.o: src/MediaFactory.cc ${MKDIR} -p ${OBJECTDIR}/src ${RM} $@.d - $(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I../networking/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/MediaFactory.o src/MediaFactory.cc + $(COMPILE.cc) -g -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE=1 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_REENTRANT -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iinclude -I../networking/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/MediaFactory.o src/MediaFactory.cc ${OBJECTDIR}/src/LegacyVdrRecording.o: src/LegacyVdrRecording.cc ${MKDIR} -p ${OBJECTDIR}/src ${RM} $@.d - $(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I../networking/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/LegacyVdrRecording.o src/LegacyVdrRecording.cc + $(COMPILE.cc) -g -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE=1 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_REENTRANT -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iinclude -I../networking/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/LegacyVdrRecording.o src/LegacyVdrRecording.cc + +${OBJECTDIR}/src/FileRepresentation.o: src/FileRepresentation.cc + ${MKDIR} -p ${OBJECTDIR}/src + ${RM} $@.d + $(COMPILE.cc) -g -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE=1 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_REENTRANT -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iinclude -I../networking/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/FileRepresentation.o src/FileRepresentation.cc + +${OBJECTDIR}/src/File.o: src/File.cc + ${MKDIR} -p ${OBJECTDIR}/src + ${RM} $@.d + $(COMPILE.cc) -g -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE=1 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_REENTRANT -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iinclude -I../networking/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/File.o src/File.cc ${OBJECTDIR}/src/FilesystemScanner.o: src/FilesystemScanner.cc ${MKDIR} -p ${OBJECTDIR}/src ${RM} $@.d - $(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I../networking/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/FilesystemScanner.o src/FilesystemScanner.cc + $(COMPILE.cc) -g -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE=1 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_REENTRANT -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iinclude -I../networking/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/FilesystemScanner.o src/FilesystemScanner.cc + +${OBJECTDIR}/src/FileSystem.o: src/FileSystem.cc + ${MKDIR} -p ${OBJECTDIR}/src + ${RM} $@.d + $(COMPILE.cc) -g -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE=1 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_REENTRANT -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iinclude -I../networking/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/FileSystem.o src/FileSystem.cc ${OBJECTDIR}/src/AbstractMultiFileMovie.o: src/AbstractMultiFileMovie.cc ${MKDIR} -p ${OBJECTDIR}/src ${RM} $@.d - $(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I../networking/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/AbstractMultiFileMovie.o src/AbstractMultiFileMovie.cc + $(COMPILE.cc) -g -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE=1 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_REENTRANT -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iinclude -I../networking/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/AbstractMultiFileMovie.o src/AbstractMultiFileMovie.cc ${OBJECTDIR}/src/AbstractMedia.o: src/AbstractMedia.cc ${MKDIR} -p ${OBJECTDIR}/src ${RM} $@.d - $(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I../networking/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/AbstractMedia.o src/AbstractMedia.cc + $(COMPILE.cc) -g -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE=1 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_REENTRANT -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iinclude -I../networking/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/AbstractMedia.o src/AbstractMedia.cc ${OBJECTDIR}/src/Movie.o: src/Movie.cc ${MKDIR} -p ${OBJECTDIR}/src ${RM} $@.d - $(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I../networking/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/Movie.o src/Movie.cc + $(COMPILE.cc) -g -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE=1 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_REENTRANT -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iinclude -I../networking/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/Movie.o src/Movie.cc # Subprojects .build-subprojects: diff --git a/libs/fsScan/nbproject/Makefile-Release.mk b/libs/fsScan/nbproject/Makefile-Release.mk index b1821f6..072cdf0 100644 --- a/libs/fsScan/nbproject/Makefile-Release.mk +++ b/libs/fsScan/nbproject/Makefile-Release.mk @@ -41,7 +41,10 @@ OBJECTFILES= \ ${OBJECTDIR}/src/VdrRecording.o \ ${OBJECTDIR}/src/MediaFactory.o \ ${OBJECTDIR}/src/LegacyVdrRecording.o \ + ${OBJECTDIR}/src/FileRepresentation.o \ + ${OBJECTDIR}/src/File.o \ ${OBJECTDIR}/src/FilesystemScanner.o \ + ${OBJECTDIR}/src/FileSystem.o \ ${OBJECTDIR}/src/AbstractMultiFileMovie.o \ ${OBJECTDIR}/src/AbstractMedia.o \ ${OBJECTDIR}/src/Movie.o @@ -103,11 +106,26 @@ ${OBJECTDIR}/src/LegacyVdrRecording.o: src/LegacyVdrRecording.cc ${RM} $@.d $(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/LegacyVdrRecording.o src/LegacyVdrRecording.cc +${OBJECTDIR}/src/FileRepresentation.o: src/FileRepresentation.cc + ${MKDIR} -p ${OBJECTDIR}/src + ${RM} $@.d + $(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/FileRepresentation.o src/FileRepresentation.cc + +${OBJECTDIR}/src/File.o: src/File.cc + ${MKDIR} -p ${OBJECTDIR}/src + ${RM} $@.d + $(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/File.o src/File.cc + ${OBJECTDIR}/src/FilesystemScanner.o: src/FilesystemScanner.cc ${MKDIR} -p ${OBJECTDIR}/src ${RM} $@.d $(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/FilesystemScanner.o src/FilesystemScanner.cc +${OBJECTDIR}/src/FileSystem.o: src/FileSystem.cc + ${MKDIR} -p ${OBJECTDIR}/src + ${RM} $@.d + $(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/FileSystem.o src/FileSystem.cc + ${OBJECTDIR}/src/AbstractMultiFileMovie.o: src/AbstractMultiFileMovie.cc ${MKDIR} -p ${OBJECTDIR}/src ${RM} $@.d diff --git a/libs/fsScan/nbproject/configurations.xml b/libs/fsScan/nbproject/configurations.xml index 8e6973a..ca6b34a 100644 --- a/libs/fsScan/nbproject/configurations.xml +++ b/libs/fsScan/nbproject/configurations.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<configurationDescriptor version="80"> +<configurationDescriptor version="84"> <logicalFolder name="root" displayName="root" projectFiles="true" kind="ROOT"> <logicalFolder name="HeaderFiles" displayName="Header Files" @@ -8,6 +8,9 @@ <itemPath>include/AbstractMultiFileMovie.h</itemPath> <itemPath>include/Audio.h</itemPath> <itemPath>include/DVDImage.h</itemPath> + <itemPath>include/File.h</itemPath> + <itemPath>include/FileRepresentation.h</itemPath> + <itemPath>include/FileSystem.h</itemPath> <itemPath>include/FilesystemScanner.h</itemPath> <itemPath>include/LegacyVdrRecording.h</itemPath> <itemPath>include/MediaFactory.h</itemPath> @@ -26,6 +29,9 @@ <itemPath>src/AbstractMultiFileMovie.cc</itemPath> <itemPath>src/Audio.cc</itemPath> <itemPath>src/DVDImage.cc</itemPath> + <itemPath>src/File.cc</itemPath> + <itemPath>src/FileRepresentation.cc</itemPath> + <itemPath>src/FileSystem.cc</itemPath> <itemPath>src/FilesystemScanner.cc</itemPath> <itemPath>src/LegacyVdrRecording.cc</itemPath> <itemPath>src/MediaFactory.cc</itemPath> @@ -63,8 +69,14 @@ </incDir> <commandLine>-std=gnu++0x -fomit-frame-pointer -fPIC -pthread -Wall -Wno-parentheses -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wwrite-strings -Wtype-limits -Wundef -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -Werror=implicit-function-declaration -ansi</commandLine> <preprocessorList> + <Elem>_FILE_OFFSET_BITS=64</Elem> <Elem>_GNU_SOURCE=1</Elem> + <Elem>_LARGEFILE64_SOURCE</Elem> + <Elem>_LARGEFILE_SOURCE</Elem> <Elem>_REENTRANT</Elem> + <Elem>__STDC_CONSTANT_MACROS</Elem> + <Elem>__STDC_FORMAT_MACROS</Elem> + <Elem>__STDC_LIMIT_MACROS</Elem> </preprocessorList> <warningLevel>2</warningLevel> </ccTool> diff --git a/libs/fsScan/nbproject/private/configurations.xml b/libs/fsScan/nbproject/private/configurations.xml index fa15dc7..616cc91 100644 --- a/libs/fsScan/nbproject/private/configurations.xml +++ b/libs/fsScan/nbproject/private/configurations.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<configurationDescriptor version="80"> +<configurationDescriptor version="84"> <projectmakefile>Makefile</projectmakefile> <confs> <conf name="Debug" type="3"> diff --git a/libs/fsScan/nbproject/private/private.xml b/libs/fsScan/nbproject/private/private.xml index 5ee2703..dfdcba4 100644 --- a/libs/fsScan/nbproject/private/private.xml +++ b/libs/fsScan/nbproject/private/private.xml @@ -5,4 +5,5 @@ <activeConfIndexElem>0</activeConfIndexElem> </data> <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1"/> + <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/> </project-private> diff --git a/libs/fsScan/src/AbstractMedia.cc b/libs/fsScan/src/AbstractMedia.cc index 3a3556b..17cf86c 100644 --- a/libs/fsScan/src/AbstractMedia.cc +++ b/libs/fsScan/src/AbstractMedia.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: AbstractMedia.cc - * Created: 2. Juli 2012, 14:33 + * Created: 2. Juli 2012, 14 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libfsScan: mediatypes and filesystem scanning * diff --git a/libs/fsScan/src/AbstractMultiFileMovie.cc b/libs/fsScan/src/AbstractMultiFileMovie.cc index bcbd115..823130e 100644 --- a/libs/fsScan/src/AbstractMultiFileMovie.cc +++ b/libs/fsScan/src/AbstractMultiFileMovie.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: AbstractMultiFileMovie.cc - * Created: 3. Juli 2012, 07:39 + * Created: 3. Juli 2012, 07 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libfsScan: mediatypes and filesystem scanning * diff --git a/libs/fsScan/src/Audio.cc b/libs/fsScan/src/Audio.cc index 25521dc..6d92576 100644 --- a/libs/fsScan/src/Audio.cc +++ b/libs/fsScan/src/Audio.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: Audio.cc - * Created: 2. Juli 2012, 15:00 + * Created: 2. Juli 2012, 15 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libfsScan: mediatypes and filesystem scanning * diff --git a/libs/fsScan/src/DVDImage.cc b/libs/fsScan/src/DVDImage.cc index 5ffb170..6ce7d30 100644 --- a/libs/fsScan/src/DVDImage.cc +++ b/libs/fsScan/src/DVDImage.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: DVDImage.cc - * Created: 3. Juli 2012, 08:34 + * Created: 3. Juli 2012, 08 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libfsScan: mediatypes and filesystem scanning * diff --git a/libs/fsScan/src/File.cc b/libs/fsScan/src/File.cc new file mode 100644 index 0000000..c88fd7c --- /dev/null +++ b/libs/fsScan/src/File.cc @@ -0,0 +1,146 @@ +/** + * ======================== legal notice ====================== + * + * File: File.cc + * Created: 21. Juli 2012, 12:41 + * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> + * Project: libfsScan: mediatypes and filesystem scanning + * + * CMP - compound media player + * + * is a client/server mediaplayer intended to play any media from any workstation + * without the need to export or mount shares. cmps is an easy to use backend + * with a (ready to use) HTML-interface. Additionally the backend supports + * authentication via HTTP-digest authorization. + * cmpc is a client with vdr-like osd-menues. + * + * Copyright (c) 2012 Reinhard Mantey, some rights reserved! + * published under Creative Commons by-sa + * For details see http://creativecommons.org/licenses/by-sa/3.0/ + * + * The cmp project's homepage is at http://projects.vdr-developer.org/projects/cmp + * + * -------------------------------------------------------------- + */ +#include <File.h> +#include <FileSystem.h> +#include <FileRepresentation.h> +#include <StringBuilder.h> +#include <sys/stat.h> +#include <sys/dir.h> + +cFileSystem *cFile::fs = NULL; +static mode_t ReadMask = S_IRUSR | S_IRGRP | S_IROTH; +static mode_t WriteMask = S_IWUSR | S_IWGRP | S_IWOTH; +static mode_t ExecMask = S_IXUSR | S_IXGRP | S_IXOTH; + + +cFile::cFile(const char *Path) + : rep(NULL) +{ + if (!fs) fs = new cFileSystem(); + rep = fs->representationOfFile(Path); +} + +cFile::cFile(const cFile& Parent, const char* RelativePath) + : rep(NULL) +{ + if (!fs) fs = new cFileSystem(); + rep = fs->representationOfFile(Parent, RelativePath); +} + +cFile::cFile(const cFileRepresentation *fr) + : rep(fr) +{ + if (!fs) fs = new cFileSystem(); +} + +cFile::~cFile() +{ +} + +char *cFile::AbsolutePath(void) const +{ + cStringBuilder *sb = rep->internalPath(); + char *rv = NULL; + + if (sb) { + rv = sb->toString(); + delete sb; + } + return rv; +} + +bool cFile::Exists(void) const +{ + return rep->exists; +} + +bool cFile::IsDirectory(void) const +{ + return (rep->mode & S_IFMT) == S_IFDIR; +} + +bool cFile::IsFile(void) const +{ + return (rep->mode & S_IFMT) == S_IFREG; +} + +bool cFile::IsSymbolic(void) const +{ + return (rep->mode & S_IFMT) == S_IFLNK; +} + +bool cFile::CanRead(void) const +{ + return rep->mode & ReadMask; +} + +bool cFile::CanWrite(void) const +{ + return rep->mode & WriteMask; +} + +bool cFile::CanExecute(void) const +{ + return rep->mode & ExecMask; +} + +off64_t cFile::Size(void) const +{ + return rep->size; +} + +ulong cFile::LastModified(void) const +{ + return rep->lastModified; +} + +cFile *cFile::Parent(void) const +{ + return new cFile(rep->getParent()); +} + +const char *cFile::Name(void) const +{ + return rep->name; +} + +void cFile::Cleanup(void) +{ + if (fs) delete fs; +} + +void cFile::VisitFiles(int (*cb)(cFile *, const char *)) +{ + struct dirent entryBuffer, *pE; + char * path = AbsolutePath(); + DIR *dir = opendir(path); + + while (!readdir_r(dir, &entryBuffer, &pE) && pE) { + if (*(pE->d_name) == '.') continue; // don't bother with hidden stuff + cb(this, pE->d_name); + } + closedir(dir); + free(path); +} diff --git a/libs/fsScan/src/FileRepresentation.cc b/libs/fsScan/src/FileRepresentation.cc new file mode 100644 index 0000000..8899e16 --- /dev/null +++ b/libs/fsScan/src/FileRepresentation.cc @@ -0,0 +1,109 @@ +/** + * ======================== legal notice ====================== + * + * File: FileRepresentation.cc + * Created: 21. Juli 2012, 12:41 + * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> + * Project: libfsScan: mediatypes and filesystem scanning + * + * CMP - compound media player + * + * is a client/server mediaplayer intended to play any media from any workstation + * without the need to export or mount shares. cmps is an easy to use backend + * with a (ready to use) HTML-interface. Additionally the backend supports + * authentication via HTTP-digest authorization. + * cmpc is a client with vdr-like osd-menues. + * + * Copyright (c) 2012 Reinhard Mantey, some rights reserved! + * published under Creative Commons by-sa + * For details see http://creativecommons.org/licenses/by-sa/3.0/ + * + * The cmp project's homepage is at http://projects.vdr-developer.org/projects/cmp + * + * -------------------------------------------------------------- + */ +#include <FileRepresentation.h> +#include <FileSystem.h> +#include <StringBuilder.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <string.h> +#include <stdlib.h> +#include <iostream> +#include <stack> + +cFileRepresentation::cFileRepresentation(const char *Path) + : exists(false) + , isRoot(true) + , mode(0) + , size(0) + , lastModified(0) + , name(NULL) + , parent(NULL) +{ + struct stat st; + + if (!stat(Path, &st)) { + name = strdup(Path); + exists = true; + mode = st.st_mode; + size = st.st_size; + lastModified = st.st_mtime; + } +} + +cFileRepresentation::cFileRepresentation(const cFileRepresentation *Parent, const char *Path) + : exists(false) + , isRoot(false) + , mode(0) + , size(0) + , lastModified(0) + , name(NULL) + , parent(Parent) +{ + name = strdup(Path); + cStringBuilder *sb = internalPath(); + char *tmp = sb->toString(); + struct stat st; + + std::cout << "real path is: " << tmp << std::endl; + if (!stat(tmp, &st)) { + exists = true; + mode = st.st_mode; + size = st.st_size; + lastModified = st.st_mtime; + } + free(tmp); + delete sb; + std::cout << "should create file representation for " << Path << std::endl; +} + +cFileRepresentation::~cFileRepresentation() +{ + free(name); +} + +cStringBuilder *cFileRepresentation::internalPath(void) const +{ + cStringBuilder *sb = new cStringBuilder(); + const cFileRepresentation *f = this; + std::stack<const cFileRepresentation *> rev; + char *chk; + + while (!f->isRoot) { + rev.push(f); + f = f->parent; + } + + for (;;) { + sb->Append(f->name); + if (rev.empty()) break; + chk = f->name + strlen(f->name) - 1; + if (*chk != cFileSystem::PathSeparator) sb->Append(cFileSystem::PathSeparator); + f = rev.top(); + rev.pop(); + } + + return sb; +} + diff --git a/libs/fsScan/src/FileSystem.cc b/libs/fsScan/src/FileSystem.cc new file mode 100644 index 0000000..9d467c6 --- /dev/null +++ b/libs/fsScan/src/FileSystem.cc @@ -0,0 +1,132 @@ +/** + * ======================== legal notice ====================== + * + * File: FileSystem.cc + * Created: 21. Juli 2012, 12:44 + * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> + * Project: libfsScan: mediatypes and filesystem scanning + * + * CMP - compound media player + * + * is a client/server mediaplayer intended to play any media from any workstation + * without the need to export or mount shares. cmps is an easy to use backend + * with a (ready to use) HTML-interface. Additionally the backend supports + * authentication via HTTP-digest authorization. + * cmpc is a client with vdr-like osd-menues. + * + * Copyright (c) 2012 Reinhard Mantey, some rights reserved! + * published under Creative Commons by-sa + * For details see http://creativecommons.org/licenses/by-sa/3.0/ + * + * The cmp project's homepage is at http://projects.vdr-developer.org/projects/cmp + * + * -------------------------------------------------------------- + */ +#include <FileSystem.h> +#include <FileRepresentation.h> +#include <File.h> +#include <StringBuilder.h> +#include <iostream> +#include <stdlib.h> +#include <string.h> + +char cFileSystem::PathSeparator = '/'; +char cFileSystem::RootPath[4] = { PathSeparator, 0, 0, 0 }; + +cFileSystem::cFileSystem() +{ +} + +cFileSystem::~cFileSystem() +{ + std::tr1::unordered_map<std::string, cFileRepresentation *>::iterator it = fileCache.begin(); + + while (it != fileCache.end()) { + if (it->second) delete it->second; + ++it; + } +} + +cFileRepresentation *cFileSystem::cacheEntry(const char* Path) +{ + std::tr1::unordered_map<std::string, cFileRepresentation *>::iterator it = fileCache.find(Path); + + if (it != fileCache.end()) return it->second; + return NULL; +} + +cFileRepresentation *cFileSystem::representationOfFile(const cFile &Parent, const char* Path) +{ + cFileRepresentation *parentRep = (cFileRepresentation *) Parent.rep; + cFileRepresentation *tmp = NULL; + cStringBuilder *sb = parentRep->internalPath(); + char *scratch = strdup(Path); + char *last = scratch + strlen(Path); + char *start = *scratch == PathSeparator ? scratch + 1 : scratch; + char *end = strchr(scratch, PathSeparator); + char *path; + + while (start < last) { + end = strchr(start, PathSeparator); + if (!end) end = start + strlen(start); + *end = 0; + sb->Append(PathSeparator).Append(start); + path = sb->toString(); + tmp = cacheEntry(path); + if (!tmp) { + tmp = new cFileRepresentation(parentRep, start); + fileCache[path] = tmp; + } + parentRep = tmp; + free(path); + start = end + 1; + } + free(scratch); + delete sb; + + if (tmp) return tmp; + return NULL; +} + +cFileRepresentation *cFileSystem::representationOfFile(const char* Path) +{ + cFileRepresentation *rv = cacheEntry(Path); + + if (!rv) { + cFileRepresentation *tmp = NULL; + char *scratch = strdup(Path); + char *p; + + for (p = strrchr(scratch, PathSeparator); !rv && p; p = strrchr(scratch, PathSeparator)) { + if (p > scratch) *p = 0; + else { + if (!(rv = cacheEntry(RootPath))) { + *p = 0; + tmp = new cFileRepresentation(RootPath); + fileCache["/"] = tmp; + break; + } + } + std::cout << "check path " << scratch << std::endl; + if ((tmp = cacheEntry(scratch))) break; + } + + if (tmp) { + cFileRepresentation *parent = tmp; + size_t poolSize = fileCache.size(); + const char *last = scratch + strlen(Path); + + for (p = scratch + strlen(scratch) + 1; p < last; p += strlen(p) + 1) { + if (!*(p - 1)) *(p - 1) = PathSeparator; + tmp = new cFileRepresentation(parent, p); + fileCache[scratch] = tmp; + poolSize = fileCache.size(); + parent = tmp; + } + rv = parent; + } + free(scratch); + } + return rv; +} + diff --git a/libs/fsScan/src/FilesystemScanner.cc b/libs/fsScan/src/FilesystemScanner.cc index 29fabba..2315ee1 100644 --- a/libs/fsScan/src/FilesystemScanner.cc +++ b/libs/fsScan/src/FilesystemScanner.cc @@ -1,25 +1,25 @@ /** * ======================== legal notice ====================== - * + * * File: FilesystemScanner.cc - * Created: 2. Juli 2012, 13:58 + * Created: 2. Juli 2012, 13 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libfsScan: mediatypes and filesystem scanning - * + * * CMP - compound media player - * + * * is a client/server mediaplayer intended to play any media from any workstation * without the need to export or mount shares. cmps is an easy to use backend * with a (ready to use) HTML-interface. Additionally the backend supports * authentication via HTTP-digest authorization. * cmpc is a client with vdr-like osd-menues. - * + * * Copyright (c) 2012 Reinhard Mantey, some rights reserved! * published under Creative Commons by-sa * For details see http://creativecommons.org/licenses/by-sa/3.0/ - * + * * The cmp project's homepage is at http://projects.vdr-developer.org/projects/cmp - * + * * -------------------------------------------------------------- */ #include <FilesystemScanner.h> diff --git a/libs/fsScan/src/LegacyVdrRecording.cc b/libs/fsScan/src/LegacyVdrRecording.cc index ea2ed35..29bebe7 100644 --- a/libs/fsScan/src/LegacyVdrRecording.cc +++ b/libs/fsScan/src/LegacyVdrRecording.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: LegacyVdrRecording.cc - * Created: 3. Juli 2012, 08:16 + * Created: 3. Juli 2012, 08 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libfsScan: mediatypes and filesystem scanning * diff --git a/libs/fsScan/src/MediaFactory.cc b/libs/fsScan/src/MediaFactory.cc index a94fbb1..dfb0142 100644 --- a/libs/fsScan/src/MediaFactory.cc +++ b/libs/fsScan/src/MediaFactory.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: MediaFactory.cc - * Created: 2. Juli 2012, 15:43 + * Created: 2. Juli 2012, 15 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libfsScan: mediatypes and filesystem scanning * diff --git a/libs/fsScan/src/Movie.cc b/libs/fsScan/src/Movie.cc index a558f81..878beb0 100644 --- a/libs/fsScan/src/Movie.cc +++ b/libs/fsScan/src/Movie.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: Movie.cc - * Created: 2. Juli 2012, 15:12 + * Created: 2. Juli 2012, 15 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libfsScan: mediatypes and filesystem scanning * diff --git a/libs/fsScan/src/Picture.cc b/libs/fsScan/src/Picture.cc index 3c44ce6..f1e509c 100644 --- a/libs/fsScan/src/Picture.cc +++ b/libs/fsScan/src/Picture.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: Picture.cc - * Created: 2. Juli 2012, 15:18 + * Created: 2. Juli 2012, 15 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libfsScan: mediatypes and filesystem scanning * diff --git a/libs/fsScan/src/VdrRecording.cc b/libs/fsScan/src/VdrRecording.cc index f706477..cf192ba 100644 --- a/libs/fsScan/src/VdrRecording.cc +++ b/libs/fsScan/src/VdrRecording.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: VdrRecording.cc - * Created: 3. Juli 2012, 08:30 + * Created: 3. Juli 2012, 08 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libfsScan: mediatypes and filesystem scanning * diff --git a/libs/networking/include/AbstractSocket.h b/libs/networking/include/AbstractSocket.h index 98e77f7..5a3fa87 100644 --- a/libs/networking/include/AbstractSocket.h +++ b/libs/networking/include/AbstractSocket.h @@ -1,25 +1,25 @@ /** * ======================== legal notice ====================== - * + * * File: AbstractSocket.h - * Created: 4. Juli 2012, 07:13 + * Created: 4. Juli 2012, 07 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libnetworking: classes for tcp/ip sockets and http-protocol handling - * + * * CMP - compound media player - * + * * is a client/server mediaplayer intended to play any media from any workstation * without the need to export or mount shares. cmps is an easy to use backend * with a (ready to use) HTML-interface. Additionally the backend supports * authentication via HTTP-digest authorization. * cmpc is a client with vdr-like osd-menues. - * + * * Copyright (c) 2012 Reinhard Mantey, some rights reserved! * published under Creative Commons by-sa * For details see http://creativecommons.org/licenses/by-sa/3.0/ - * + * * The cmp project's homepage is at http://projects.vdr-developer.org/projects/cmp - * + * * -------------------------------------------------------------- */ #ifndef ABSTRACTSOCKET_H diff --git a/libs/networking/include/Authorization.h b/libs/networking/include/Authorization.h index fa04bd4..164928c 100644 --- a/libs/networking/include/Authorization.h +++ b/libs/networking/include/Authorization.h @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: Authorization.h - * Created: 3. Juli 2012, 17:27 + * Created: 3. Juli 2012, 17 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libnetworking: classes for tcp/ip sockets and http-protocol handling * diff --git a/libs/networking/include/ClientSocket.h b/libs/networking/include/ClientSocket.h index 0dc899e..76ee94c 100644 --- a/libs/networking/include/ClientSocket.h +++ b/libs/networking/include/ClientSocket.h @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: ClientSocket.h - * Created: 4. Juli 2012, 07:25 + * Created: 4. Juli 2012, 07 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libnetworking: classes for tcp/ip sockets and http-protocol handling * diff --git a/libs/networking/include/ConnectionHandler.h b/libs/networking/include/ConnectionHandler.h index c4232be..108a366 100644 --- a/libs/networking/include/ConnectionHandler.h +++ b/libs/networking/include/ConnectionHandler.h @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: ConnectionHandler.h - * Created: 4. Juli 2012, 07:32 + * Created: 4. Juli 2012, 07 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libnetworking: classes for tcp/ip sockets and http-protocol handling * diff --git a/libs/networking/include/ConnectionPoint.h b/libs/networking/include/ConnectionPoint.h index 8980adb..318d82d 100644 --- a/libs/networking/include/ConnectionPoint.h +++ b/libs/networking/include/ConnectionPoint.h @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: ConnectionPoint.h - * Created: 4. Juli 2012, 06:29 + * Created: 4. Juli 2012, 06 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libnetworking: classes for tcp/ip sockets and http-protocol handling * diff --git a/libs/networking/include/Credentials.h b/libs/networking/include/Credentials.h index c27532d..cdc7903 100644 --- a/libs/networking/include/Credentials.h +++ b/libs/networking/include/Credentials.h @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: Credentials.h - * Created: 3. Juli 2012, 14:37 + * Created: 3. Juli 2012, 14 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libnetworking: classes for tcp/ip sockets and http-protocol handling * diff --git a/libs/networking/include/HTTPAuthorizationRequest.h b/libs/networking/include/HTTPAuthorizationRequest.h index d3d566d..d717657 100644 --- a/libs/networking/include/HTTPAuthorizationRequest.h +++ b/libs/networking/include/HTTPAuthorizationRequest.h @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: HTTPAuthorizationRequest.h - * Created: 4. Juli 2012, 07:41 + * Created: 4. Juli 2012, 07 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libnetworking: classes for tcp/ip sockets and http-protocol handling * diff --git a/libs/networking/include/HTTPFileResponse.h b/libs/networking/include/HTTPFileResponse.h index 0457850..cc3a849 100644 --- a/libs/networking/include/HTTPFileResponse.h +++ b/libs/networking/include/HTTPFileResponse.h @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: HTTPFileResponse.h - * Created: 4. Juli 2012, 07:50 + * Created: 4. Juli 2012, 07 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libnetworking: classes for tcp/ip sockets and http-protocol handling * diff --git a/libs/networking/include/HTTPMessage.h b/libs/networking/include/HTTPMessage.h index cb88c69..716758b 100644 --- a/libs/networking/include/HTTPMessage.h +++ b/libs/networking/include/HTTPMessage.h @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: HTTPMessage.h - * Created: 3. Juli 2012, 17:40 + * Created: 3. Juli 2012, 17 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libnetworking: classes for tcp/ip sockets and http-protocol handling * diff --git a/libs/networking/include/HTTPParser.h b/libs/networking/include/HTTPParser.h index 9ed8169..2e8b12a 100644 --- a/libs/networking/include/HTTPParser.h +++ b/libs/networking/include/HTTPParser.h @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: HTTPParser.h - * Created: 10. Juli 2012, 08:37 + * Created: 10. Juli 2012, 08 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libnetworking: classes for tcp/ip sockets and http-protocol handling * diff --git a/libs/networking/include/HTTPRequest.h b/libs/networking/include/HTTPRequest.h index 87c78d7..6c5e0bb 100644 --- a/libs/networking/include/HTTPRequest.h +++ b/libs/networking/include/HTTPRequest.h @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: HTTPRequest.h - * Created: 3. Juli 2012, 17:54 + * Created: 3. Juli 2012, 17 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libnetworking: classes for tcp/ip sockets and http-protocol handling * diff --git a/libs/networking/include/HTTPRequestHandler.h b/libs/networking/include/HTTPRequestHandler.h index 99c31d2..9255cae 100644 --- a/libs/networking/include/HTTPRequestHandler.h +++ b/libs/networking/include/HTTPRequestHandler.h @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: HTTPRequestHandler.h - * Created: 4. Juli 2012, 15:12 + * Created: 4. Juli 2012, 15 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libnetworking: classes for tcp/ip sockets and http-protocol handling * diff --git a/libs/networking/include/HTTPResponse.h b/libs/networking/include/HTTPResponse.h index afa4ae5..f7745c6 100644 --- a/libs/networking/include/HTTPResponse.h +++ b/libs/networking/include/HTTPResponse.h @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: HTTPResponse.h - * Created: 4. Juli 2012, 06:03 + * Created: 4. Juli 2012, 06 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libnetworking: classes for tcp/ip sockets and http-protocol handling * diff --git a/libs/networking/include/HTTPServer.h b/libs/networking/include/HTTPServer.h index 4dbe5a8..aac14a9 100644 --- a/libs/networking/include/HTTPServer.h +++ b/libs/networking/include/HTTPServer.h @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: HTTPServer.h - * Created: 4. Juli 2012, 12:16 + * Created: 4. Juli 2012, 12 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libnetworking: classes for tcp/ip sockets and http-protocol handling * diff --git a/libs/networking/include/HTTPStatus.h b/libs/networking/include/HTTPStatus.h index 10ff080..d776cde 100644 --- a/libs/networking/include/HTTPStatus.h +++ b/libs/networking/include/HTTPStatus.h @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: HTTPStatus.h - * Created: 3. Juli 2012, 17:34 + * Created: 3. Juli 2012, 17 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libnetworking: classes for tcp/ip sockets and http-protocol handling * diff --git a/libs/networking/include/Principal.h b/libs/networking/include/Principal.h index 49afbde..e777946 100644 --- a/libs/networking/include/Principal.h +++ b/libs/networking/include/Principal.h @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: Principal.h - * Created: 3. Juli 2012, 12:50 + * Created: 3. Juli 2012, 12 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libnetworking: classes for tcp/ip sockets and http-protocol handling * diff --git a/libs/networking/include/ServerConfig.h b/libs/networking/include/ServerConfig.h index c61c896..0f9efec 100644 --- a/libs/networking/include/ServerConfig.h +++ b/libs/networking/include/ServerConfig.h @@ -1,25 +1,25 @@ /** * ======================== legal notice ====================== - * + * * File: ServerConfig.h - * Created: 8. Juli 2012, 06:12 + * Created: 8. Juli 2012, 06 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libnetworking: classes for tcp/ip sockets and http-protocol handling - * + * * CMP - compound media player - * + * * is a client/server mediaplayer intended to play any media from any workstation * without the need to export or mount shares. cmps is an easy to use backend * with a (ready to use) HTML-interface. Additionally the backend supports * authentication via HTTP-digest authorization. * cmpc is a client with vdr-like osd-menues. - * + * * Copyright (c) 2012 Reinhard Mantey, some rights reserved! * published under Creative Commons by-sa * For details see http://creativecommons.org/licenses/by-sa/3.0/ - * + * * The cmp project's homepage is at http://projects.vdr-developer.org/projects/cmp - * + * * -------------------------------------------------------------- */ #ifndef SERVERCONFIG_H diff --git a/libs/networking/include/ServerSocket.h b/libs/networking/include/ServerSocket.h index 9465d67..9133fea 100644 --- a/libs/networking/include/ServerSocket.h +++ b/libs/networking/include/ServerSocket.h @@ -1,25 +1,25 @@ /** * ======================== legal notice ====================== - * + * * File: ServerSocket.h - * Created: 4. Juli 2012, 07:28 + * Created: 4. Juli 2012, 07 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libnetworking: classes for tcp/ip sockets and http-protocol handling - * + * * CMP - compound media player - * + * * is a client/server mediaplayer intended to play any media from any workstation * without the need to export or mount shares. cmps is an easy to use backend * with a (ready to use) HTML-interface. Additionally the backend supports * authentication via HTTP-digest authorization. * cmpc is a client with vdr-like osd-menues. - * + * * Copyright (c) 2012 Reinhard Mantey, some rights reserved! * published under Creative Commons by-sa * For details see http://creativecommons.org/licenses/by-sa/3.0/ - * + * * The cmp project's homepage is at http://projects.vdr-developer.org/projects/cmp - * + * * -------------------------------------------------------------- */ #ifndef SERVERSOCKET_H diff --git a/libs/networking/include/Url.h b/libs/networking/include/Url.h index c88a00a..970ba62 100644 --- a/libs/networking/include/Url.h +++ b/libs/networking/include/Url.h @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: Url.h - * Created: 4. Juli 2012, 05:42 + * Created: 4. Juli 2012, 05 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libnetworking: classes for tcp/ip sockets and http-protocol handling * diff --git a/libs/networking/nbproject/private/private.xml b/libs/networking/nbproject/private/private.xml index 5ee2703..dfdcba4 100644 --- a/libs/networking/nbproject/private/private.xml +++ b/libs/networking/nbproject/private/private.xml @@ -5,4 +5,5 @@ <activeConfIndexElem>0</activeConfIndexElem> </data> <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1"/> + <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/> </project-private> diff --git a/libs/networking/networking.layout b/libs/networking/networking.layout index ec66590..fc9bc45 100644 --- a/libs/networking/networking.layout +++ b/libs/networking/networking.layout @@ -6,14 +6,14 @@ <Cursor1 position="0" topLine="0" /> </Cursor> </File> - <File name="include/ConnectionHandler.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/HTTPFileResponse.cc" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> <Cursor1 position="0" topLine="0" /> </Cursor> </File> - <File name="src/HTTPFileResponse.cc" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/ConnectionHandler.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="0" topLine="0" /> + <Cursor1 position="1551" topLine="0" /> </Cursor> </File> <File name="src/HTTPMessage.cc" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> @@ -21,22 +21,22 @@ <Cursor1 position="0" topLine="0" /> </Cursor> </File> - <File name="src/ConnectionHandler.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="include/HTTPResponse.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="1551" topLine="0" /> + <Cursor1 position="0" topLine="0" /> </Cursor> </File> - <File name="include/HTTPResponse.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="include/HTTPMessage.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> <Cursor1 position="0" topLine="0" /> </Cursor> </File> - <File name="include/ConnectionPoint.h" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="include/ConnectionHandler.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> <Cursor1 position="0" topLine="0" /> </Cursor> </File> - <File name="include/HTTPMessage.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="include/ConnectionPoint.h" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> <Cursor1 position="0" topLine="0" /> </Cursor> diff --git a/libs/networking/networking.layout.save b/libs/networking/networking.layout.save index ebf3c00..fc9bc45 100644 --- a/libs/networking/networking.layout.save +++ b/libs/networking/networking.layout.save @@ -1,19 +1,19 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <CodeBlocks_layout_file> <ActiveTarget name="Debug" /> - <File name="src/ConnectionHandler.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/ConnectionPoint.cc" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="1551" topLine="0" /> + <Cursor1 position="0" topLine="0" /> </Cursor> </File> - <File name="include/ConnectionPoint.h" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/HTTPFileResponse.cc" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> <Cursor1 position="0" topLine="0" /> </Cursor> </File> - <File name="src/HTTPFileResponse.cc" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/ConnectionHandler.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="0" topLine="0" /> + <Cursor1 position="1551" topLine="0" /> </Cursor> </File> <File name="src/HTTPMessage.cc" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> @@ -26,17 +26,17 @@ <Cursor1 position="0" topLine="0" /> </Cursor> </File> - <File name="src/ConnectionPoint.cc" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="include/HTTPMessage.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> <Cursor1 position="0" topLine="0" /> </Cursor> </File> - <File name="include/HTTPMessage.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="include/ConnectionHandler.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> <Cursor1 position="0" topLine="0" /> </Cursor> </File> - <File name="include/ConnectionHandler.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="include/ConnectionPoint.h" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> <Cursor1 position="0" topLine="0" /> </Cursor> diff --git a/libs/networking/src/AbstractSocket.cc b/libs/networking/src/AbstractSocket.cc index 827d466..64dc39b 100644 --- a/libs/networking/src/AbstractSocket.cc +++ b/libs/networking/src/AbstractSocket.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: AbstractSocket.cc - * Created: 4. Juli 2012, 07:13 + * Created: 4. Juli 2012, 07 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libnetworking: classes for tcp/ip sockets and http-protocol handling * diff --git a/libs/networking/src/Authorization.cc b/libs/networking/src/Authorization.cc index b22145a..094a70d 100644 --- a/libs/networking/src/Authorization.cc +++ b/libs/networking/src/Authorization.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: Authorization.cc - * Created: 3. Juli 2012, 17:27 + * Created: 3. Juli 2012, 17 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libnetworking: classes for tcp/ip sockets and http-protocol handling * diff --git a/libs/networking/src/ClientSocket.cc b/libs/networking/src/ClientSocket.cc index db42cf9..9c77576 100644 --- a/libs/networking/src/ClientSocket.cc +++ b/libs/networking/src/ClientSocket.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: ClientSocket.cc - * Created: 4. Juli 2012, 07:25 + * Created: 4. Juli 2012, 07 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libnetworking: classes for tcp/ip sockets and http-protocol handling * diff --git a/libs/networking/src/ConnectionHandler.cc b/libs/networking/src/ConnectionHandler.cc index c5d5ebf..9ad24a6 100644 --- a/libs/networking/src/ConnectionHandler.cc +++ b/libs/networking/src/ConnectionHandler.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: ConnectionHandler.cc - * Created: 4. Juli 2012, 07:32 + * Created: 4. Juli 2012, 07 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libnetworking: classes for tcp/ip sockets and http-protocol handling * diff --git a/libs/networking/src/ConnectionPoint.cc b/libs/networking/src/ConnectionPoint.cc index 4700652..4490236 100644 --- a/libs/networking/src/ConnectionPoint.cc +++ b/libs/networking/src/ConnectionPoint.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: ConnectionPoint.cc - * Created: 4. Juli 2012, 06:29 + * Created: 4. Juli 2012, 06 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libnetworking: classes for tcp/ip sockets and http-protocol handling * diff --git a/libs/networking/src/Credentials.cc b/libs/networking/src/Credentials.cc index db1e219..a32f01a 100644 --- a/libs/networking/src/Credentials.cc +++ b/libs/networking/src/Credentials.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: Credentials.cc - * Created: 3. Juli 2012, 14:37 + * Created: 3. Juli 2012, 14 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libnetworking: classes for tcp/ip sockets and http-protocol handling * diff --git a/libs/networking/src/HTTPAuthorizationRequest.cc b/libs/networking/src/HTTPAuthorizationRequest.cc index 5c558f8..00a682d 100644 --- a/libs/networking/src/HTTPAuthorizationRequest.cc +++ b/libs/networking/src/HTTPAuthorizationRequest.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: HTTPAuthorizationRequest.cc - * Created: 4. Juli 2012, 07:41 + * Created: 4. Juli 2012, 07 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libnetworking: classes for tcp/ip sockets and http-protocol handling * diff --git a/libs/networking/src/HTTPFileResponse.cc b/libs/networking/src/HTTPFileResponse.cc index d79b085..499db03 100644 --- a/libs/networking/src/HTTPFileResponse.cc +++ b/libs/networking/src/HTTPFileResponse.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: HTTPFileResponse.cc - * Created: 4. Juli 2012, 07:50 + * Created: 4. Juli 2012, 07 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libnetworking: classes for tcp/ip sockets and http-protocol handling * diff --git a/libs/networking/src/HTTPMessage.cc b/libs/networking/src/HTTPMessage.cc index 9e1b5ba..8b41814 100644 --- a/libs/networking/src/HTTPMessage.cc +++ b/libs/networking/src/HTTPMessage.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: HTTPMessage.cc - * Created: 3. Juli 2012, 17:40 + * Created: 3. Juli 2012, 17 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libnetworking: classes for tcp/ip sockets and http-protocol handling * diff --git a/libs/networking/src/HTTPParser.cc b/libs/networking/src/HTTPParser.cc index 2fc1dad..2c3d6bc 100644 --- a/libs/networking/src/HTTPParser.cc +++ b/libs/networking/src/HTTPParser.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: HTTPParser.cc - * Created: 10. Juli 2012, 08:37 + * Created: 10. Juli 2012, 08 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libnetworking: classes for tcp/ip sockets and http-protocol handling * diff --git a/libs/networking/src/HTTPRequest.cc b/libs/networking/src/HTTPRequest.cc index c17b29c..9520ec0 100644 --- a/libs/networking/src/HTTPRequest.cc +++ b/libs/networking/src/HTTPRequest.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: HTTPRequest.cc - * Created: 3. Juli 2012, 17:54 + * Created: 3. Juli 2012, 17 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libnetworking: classes for tcp/ip sockets and http-protocol handling * diff --git a/libs/networking/src/HTTPRequestHandler.cc b/libs/networking/src/HTTPRequestHandler.cc index 60ce8d9..f1ad752 100644 --- a/libs/networking/src/HTTPRequestHandler.cc +++ b/libs/networking/src/HTTPRequestHandler.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: HTTPRequestHandler.cc - * Created: 4. Juli 2012, 15:12 + * Created: 4. Juli 2012, 15 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libnetworking: classes for tcp/ip sockets and http-protocol handling * diff --git a/libs/networking/src/HTTPResponse.cc b/libs/networking/src/HTTPResponse.cc index 2f0eeef..c49483c 100644 --- a/libs/networking/src/HTTPResponse.cc +++ b/libs/networking/src/HTTPResponse.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: HTTPResponse.cc - * Created: 4. Juli 2012, 06:03 + * Created: 4. Juli 2012, 06 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libnetworking: classes for tcp/ip sockets and http-protocol handling * diff --git a/libs/networking/src/HTTPServer.cc b/libs/networking/src/HTTPServer.cc index 3b9757b..ba62283 100644 --- a/libs/networking/src/HTTPServer.cc +++ b/libs/networking/src/HTTPServer.cc @@ -1,25 +1,25 @@ /** * ======================== legal notice ====================== - * + * * File: HTTPServer.cc - * Created: 4. Juli 2012, 12:16 + * Created: 4. Juli 2012, 12 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libnetworking: classes for tcp/ip sockets and http-protocol handling - * + * * CMP - compound media player - * + * * is a client/server mediaplayer intended to play any media from any workstation * without the need to export or mount shares. cmps is an easy to use backend * with a (ready to use) HTML-interface. Additionally the backend supports * authentication via HTTP-digest authorization. * cmpc is a client with vdr-like osd-menues. - * + * * Copyright (c) 2012 Reinhard Mantey, some rights reserved! * published under Creative Commons by-sa * For details see http://creativecommons.org/licenses/by-sa/3.0/ - * + * * The cmp project's homepage is at http://projects.vdr-developer.org/projects/cmp - * + * * -------------------------------------------------------------- */ #include <HTTPServer.h> diff --git a/libs/networking/src/HTTPStatus.cc b/libs/networking/src/HTTPStatus.cc index 74623ed..659294d 100644 --- a/libs/networking/src/HTTPStatus.cc +++ b/libs/networking/src/HTTPStatus.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: HTTPStatus.cc - * Created: 3. Juli 2012, 17:34 + * Created: 3. Juli 2012, 17 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libnetworking: classes for tcp/ip sockets and http-protocol handling * diff --git a/libs/networking/src/Principal.cc b/libs/networking/src/Principal.cc index 65103d9..7f2e0f5 100644 --- a/libs/networking/src/Principal.cc +++ b/libs/networking/src/Principal.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: Principal.cc - * Created: 3. Juli 2012, 12:50 + * Created: 3. Juli 2012, 12 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libnetworking: classes for tcp/ip sockets and http-protocol handling * diff --git a/libs/networking/src/ServerConfig.cc b/libs/networking/src/ServerConfig.cc index d749264..a339497 100644 --- a/libs/networking/src/ServerConfig.cc +++ b/libs/networking/src/ServerConfig.cc @@ -1,25 +1,25 @@ /** * ======================== legal notice ====================== - * + * * File: ServerConfig.cc - * Created: 8. Juli 2012, 06:12 + * Created: 8. Juli 2012, 06 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libnetworking: classes for tcp/ip sockets and http-protocol handling - * + * * CMP - compound media player - * + * * is a client/server mediaplayer intended to play any media from any workstation * without the need to export or mount shares. cmps is an easy to use backend * with a (ready to use) HTML-interface. Additionally the backend supports * authentication via HTTP-digest authorization. * cmpc is a client with vdr-like osd-menues. - * + * * Copyright (c) 2012 Reinhard Mantey, some rights reserved! * published under Creative Commons by-sa * For details see http://creativecommons.org/licenses/by-sa/3.0/ - * + * * The cmp project's homepage is at http://projects.vdr-developer.org/projects/cmp - * + * * -------------------------------------------------------------- */ #include <ServerConfig.h> diff --git a/libs/networking/src/ServerSocket.cc b/libs/networking/src/ServerSocket.cc index ae51a18..7e0392f 100644 --- a/libs/networking/src/ServerSocket.cc +++ b/libs/networking/src/ServerSocket.cc @@ -1,25 +1,25 @@ /** * ======================== legal notice ====================== - * + * * File: ServerSocket.cc - * Created: 4. Juli 2012, 07:28 + * Created: 4. Juli 2012, 07 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libnetworking: classes for tcp/ip sockets and http-protocol handling - * + * * CMP - compound media player - * + * * is a client/server mediaplayer intended to play any media from any workstation * without the need to export or mount shares. cmps is an easy to use backend * with a (ready to use) HTML-interface. Additionally the backend supports * authentication via HTTP-digest authorization. * cmpc is a client with vdr-like osd-menues. - * + * * Copyright (c) 2012 Reinhard Mantey, some rights reserved! * published under Creative Commons by-sa * For details see http://creativecommons.org/licenses/by-sa/3.0/ - * + * * The cmp project's homepage is at http://projects.vdr-developer.org/projects/cmp - * + * * -------------------------------------------------------------- */ #include <ServerSocket.h> diff --git a/libs/networking/src/Url.cc b/libs/networking/src/Url.cc index 011d493..b0237d5 100644 --- a/libs/networking/src/Url.cc +++ b/libs/networking/src/Url.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: Url.cc - * Created: 4. Juli 2012, 05:42 + * Created: 4. Juli 2012, 05 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libnetworking: classes for tcp/ip sockets and http-protocol handling * diff --git a/libs/util/include/AbstractListAssembler.h b/libs/util/include/AbstractListAssembler.h index 1e547e4..bf0c81f 100644 --- a/libs/util/include/AbstractListAssembler.h +++ b/libs/util/include/AbstractListAssembler.h @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: AbstractListAssembler.h - * Created: 6. Juli 2012, 09:38 + * Created: 6. Juli 2012, 09 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libutil - base classes used by other libraries * diff --git a/libs/util/include/Codec.h b/libs/util/include/Codec.h index 80352d7..ceaea70 100644 --- a/libs/util/include/Codec.h +++ b/libs/util/include/Codec.h @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: Codec.h - * Created: 21. Mai 2012, 14:00 + * Created: 21. Mai 2012, 14 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libutil - base classes used by other libraries * diff --git a/libs/util/include/JSonWriter.h b/libs/util/include/JSonWriter.h index 732daec..e20c240 100644 --- a/libs/util/include/JSonWriter.h +++ b/libs/util/include/JSonWriter.h @@ -1,25 +1,25 @@ /** * ======================== legal notice ====================== - * + * * File: JSonWriter.h - * Created: 6. Juli 2012, 12:47 + * Created: 6. Juli 2012, 12 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libutil - base classes used by other libraries - * + * * CMP - compound media player - * + * * is a client/server mediaplayer intended to play any media from any workstation * without the need to export or mount shares. cmps is an easy to use backend * with a (ready to use) HTML-interface. Additionally the backend supports * authentication via HTTP-digest authorization. * cmpc is a client with vdr-like osd-menues. - * + * * Copyright (c) 2012 Reinhard Mantey, some rights reserved! * published under Creative Commons by-sa * For details see http://creativecommons.org/licenses/by-sa/3.0/ - * + * * The cmp project's homepage is at http://projects.vdr-developer.org/projects/cmp - * + * * -------------------------------------------------------------- */ #ifndef JSONWRITER_H diff --git a/libs/util/include/MD5Calculator.h b/libs/util/include/MD5Calculator.h index 400aba1..0dca5d4 100644 --- a/libs/util/include/MD5Calculator.h +++ b/libs/util/include/MD5Calculator.h @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: MD5Calculator.h - * Created: 3. Juli 2012, 13:15 + * Created: 3. Juli 2012, 13 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libutil - base classes used by other libraries * diff --git a/libs/util/include/ManagedMap.h b/libs/util/include/ManagedMap.h index c71de85..c780a6f 100644 --- a/libs/util/include/ManagedMap.h +++ b/libs/util/include/ManagedMap.h @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: ManagedMap.h - * Created: 7. Juli 2012, 08:28 + * Created: 7. Juli 2012, 08 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libutil - base classes used by other libraries * diff --git a/libs/util/include/ManagedVector.h b/libs/util/include/ManagedVector.h index 7fa7af2..b4ca9a2 100644 --- a/libs/util/include/ManagedVector.h +++ b/libs/util/include/ManagedVector.h @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: ManagedVector.h - * Created: 6. Juli 2012, 19:07 + * Created: 6. Juli 2012, 19 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libutil - base classes used by other libraries * diff --git a/libs/util/include/NamedValue.h b/libs/util/include/NamedValue.h index 329061d..8730d3d 100644 --- a/libs/util/include/NamedValue.h +++ b/libs/util/include/NamedValue.h @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: NamedValue.h - * Created: 3. Juli 2012, 17:43 + * Created: 3. Juli 2012, 17 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libutil - base classes used by other libraries * diff --git a/libs/util/include/StringBuilder.h b/libs/util/include/StringBuilder.h index aea9975..a0e7259 100644 --- a/libs/util/include/StringBuilder.h +++ b/libs/util/include/StringBuilder.h @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: StringBuilder.h - * Created: 6. Juli 2012, 10:54 + * Created: 6. Juli 2012, 10 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libutil - base classes used by other libraries * @@ -35,6 +35,7 @@ public: virtual ~cStringBuilder(); cStringBuilder &Append(const char *Text); + cStringBuilder &Append(char c); cStringBuilder &Append(bool v, const char *TrueValue = "X", const char *FalseValue="-"); cStringBuilder &Append(double v); cStringBuilder &Append(int v); @@ -47,12 +48,16 @@ public: void Rewind(void) { readOffset = 0; } size_t Copy(char *Buf, size_t BufSize); + char *toString(void); + private: void init(void); void Write(const char *p); int chunkSize; size_t readOffset; ///< read offest is the offset over all chunks (thus goes from 0 to size) - int writeOffset; ///< write offset is the offset inside the last chunk (thus goes from 0 to chunkSize) + ///< Copy can be called subsequently, if Buf is smaller than StringBuilders size + int writeOffset; ///< write offset is the offset inside the last chunk (thus goes from 0 to chunkSize) + char *firstChunk; ///< for debugging purpose only cManagedVector pool; }; diff --git a/libs/util/include/util.h b/libs/util/include/util.h index 2b355cc..daa9b8f 100644 --- a/libs/util/include/util.h +++ b/libs/util/include/util.h @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: util.h - * Created: 3. Juli 2012, 13:00 + * Created: 3. Juli 2012, 13 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libutil - base classes used by other libraries * diff --git a/libs/util/src/AbstractListAssembler.cc b/libs/util/src/AbstractListAssembler.cc index e83f965..a32826e 100644 --- a/libs/util/src/AbstractListAssembler.cc +++ b/libs/util/src/AbstractListAssembler.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: AbstractListAssembler.cc - * Created: 6. Juli 2012, 09:38 + * Created: 6. Juli 2012, 09 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libutil - base classes used by other libraries * diff --git a/libs/util/src/Codec.cc b/libs/util/src/Codec.cc index bf6acf3..4a1899d 100644 --- a/libs/util/src/Codec.cc +++ b/libs/util/src/Codec.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: Codec.cc - * Created: 21. Mai 2012, 14:00 + * Created: 21. Mai 2012, 14 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libutil - base classes used by other libraries * diff --git a/libs/util/src/JSonWriter.cc b/libs/util/src/JSonWriter.cc index cde994c..ec9b1dc 100644 --- a/libs/util/src/JSonWriter.cc +++ b/libs/util/src/JSonWriter.cc @@ -1,31 +1,32 @@ /** * ======================== legal notice ====================== - * + * * File: JSonWriter.cc - * Created: 6. Juli 2012, 12:47 + * Created: 6. Juli 2012, 12 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libutil - base classes used by other libraries - * + * * CMP - compound media player - * + * * is a client/server mediaplayer intended to play any media from any workstation * without the need to export or mount shares. cmps is an easy to use backend * with a (ready to use) HTML-interface. Additionally the backend supports * authentication via HTTP-digest authorization. * cmpc is a client with vdr-like osd-menues. - * + * * Copyright (c) 2012 Reinhard Mantey, some rights reserved! * published under Creative Commons by-sa * For details see http://creativecommons.org/licenses/by-sa/3.0/ - * + * * The cmp project's homepage is at http://projects.vdr-developer.org/projects/cmp - * + * * -------------------------------------------------------------- */ #include <JSonWriter.h> #include <StringBuilder.h> #include <Logging.h> #include <stdio.h> +#define DEBUG 1 cJSonWriter::cJSonWriter(cStringBuilder &StringBuilder) : lastState(JS_Unknown) @@ -57,8 +58,14 @@ cJSonWriter::JSonState cJSonWriter::PopState(void) } cJSonWriter &cJSonWriter::Object(void) { - if (lastState == JS_Object) sb.Append(","); - sb.Append("{"); + if (lastState == JS_Object) { +#ifdef DEBUG + sb.Append(",\n"); +#else + sb.Append(", "); +#endif + } + sb.Append("{ "); PushState(JS_Object); lastState = JS_Unknown; return *this; @@ -70,7 +77,7 @@ cJSonWriter &cJSonWriter::EndObject(void) { } else { PopState(); - sb.Append("}"); + sb.Append(" }"); } return *this; } @@ -80,7 +87,7 @@ cJSonWriter &cJSonWriter::Array(void) { esyslog("JSonWriter::Array(): invalid status %d - should be %d", State(), JS_Key); } else { - sb.Append("["); + sb.Append("[ "); PushState(JS_Array); lastState = JS_Unknown; } @@ -92,7 +99,7 @@ cJSonWriter &cJSonWriter::EndArray(void) { esyslog("JSonWriter::EndArray(): invalid status %d - should be %d", State(), JS_Array); } else { - sb.Append("]"); + sb.Append(" ]"); PopState(); if (State() == JS_Key) PopState(); // array is a value, so pop the key } @@ -104,7 +111,13 @@ cJSonWriter &cJSonWriter::Key(const char *Name) { esyslog("JSonWriter::Key(): invalid status %d - should be %d", State(), JS_Object); } else { - if (lastState == JS_Key) sb.Append(", "); + if (lastState == JS_Key) { +#ifdef DEBUG + sb.Append(",\n"); +#else + sb.Append(", "); +#endif + } sb.Append("\"").Append(Name).Append("\": "); PushState(JS_Key); } diff --git a/libs/util/src/MD5Calculator.cc b/libs/util/src/MD5Calculator.cc index 7f2aea4..bc5e243 100644 --- a/libs/util/src/MD5Calculator.cc +++ b/libs/util/src/MD5Calculator.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: MD5Calculator.cc - * Created: 3. Juli 2012, 13:15 + * Created: 3. Juli 2012, 13 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libutil - base classes used by other libraries * diff --git a/libs/util/src/ManagedMap.cc b/libs/util/src/ManagedMap.cc index e0dd528..ad3410d 100644 --- a/libs/util/src/ManagedMap.cc +++ b/libs/util/src/ManagedMap.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: ManagedMap.cc - * Created: 7. Juli 2012, 08:48 + * Created: 7. Juli 2012, 08 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libutil - base classes used by other libraries * diff --git a/libs/util/src/ManagedVector.cc b/libs/util/src/ManagedVector.cc index 7a67bfb..c91f3d0 100644 --- a/libs/util/src/ManagedVector.cc +++ b/libs/util/src/ManagedVector.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: ManagedVector.cc - * Created: 7. Juli 2012, 08:30 + * Created: 7. Juli 2012, 08 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libutil - base classes used by other libraries * diff --git a/libs/util/src/NamedValue.cc b/libs/util/src/NamedValue.cc index f807cb6..56a8abd 100644 --- a/libs/util/src/NamedValue.cc +++ b/libs/util/src/NamedValue.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: NamedValue.cc - * Created: 3. Juli 2012, 17:43 + * Created: 3. Juli 2012, 17 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libutil - base classes used by other libraries * diff --git a/libs/util/src/StringBuilder.cc b/libs/util/src/StringBuilder.cc index 8e90151..28b048e 100644 --- a/libs/util/src/StringBuilder.cc +++ b/libs/util/src/StringBuilder.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: StringBuilder.cc - * Created: 6. Juli 2012, 10:54 + * Created: 6. Juli 2012, 10 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libutil - base classes used by other libraries * @@ -37,6 +37,7 @@ cStringBuilder::cStringBuilder(const char *First) : chunkSize(127) , readOffset(0) , writeOffset(0) + , firstChunk(NULL) , pool(freeStringCallback) { init(); @@ -47,6 +48,7 @@ cStringBuilder::cStringBuilder(int ChunkSize) : chunkSize(ChunkSize) , readOffset(0) , writeOffset(0) + , firstChunk(NULL) , pool(freeStringCallback) { init(); @@ -61,12 +63,13 @@ void cStringBuilder::init(void) char *first = (char *) malloc(chunkSize); pool.push_back(first); + firstChunk = first; } void cStringBuilder::Write(const char *Text) { if (!Text) { - esyslog("ERROR: text to add is a NULL-ponter!"); + esyslog("ERROR: text to add is a NULL-pointer!"); return; } uint chunkFree = chunkSize - writeOffset; @@ -130,6 +133,18 @@ cStringBuilder &cStringBuilder::Append(const char* Text) return *this; } +cStringBuilder &cStringBuilder::Append(char c) +{ + char buf[2]; + + *buf = c; + buf[1] = 0; + + Write(buf); + + return *this; +} + cStringBuilder &cStringBuilder::Append(bool v, const char *TrueValue, const char *FalseValue) { if (v) Write(TrueValue); @@ -176,3 +191,15 @@ cStringBuilder &cStringBuilder::Append(size_t v) return *this; } + +char *cStringBuilder::toString(void) +{ + char *rv = (char *) malloc(Size() + 1); + + if (rv) { + readOffset = 0; + Copy(rv, Size() + 1); + *(rv + Size()) = 0; + } + return rv; +} diff --git a/libs/util/src/util.cc b/libs/util/src/util.cc index 8caac91..61027a1 100644 --- a/libs/util/src/util.cc +++ b/libs/util/src/util.cc @@ -2,7 +2,7 @@ * ======================== legal notice ====================== * * File: util.cc - * Created: 4. Juli 2012, 05:56 + * Created: 4. Juli 2012, 05 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libutil - base classes used by other libraries * diff --git a/libs/util/util.layout b/libs/util/util.layout index d9630b6..00f0d49 100644 --- a/libs/util/util.layout +++ b/libs/util/util.layout @@ -1,19 +1,14 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <CodeBlocks_layout_file> <ActiveTarget name="Debug" /> - <File name="src/AbstractListAssembler.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> - <Cursor> - <Cursor1 position="0" topLine="0" /> - </Cursor> - </File> <File name="include/ManagedMap.h" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> <Cursor1 position="0" topLine="0" /> </Cursor> </File> - <File name="src/StringBuilder.cc" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/StringBuilder.cc" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="3065" topLine="38" /> + <Cursor1 position="1766" topLine="0" /> </Cursor> </File> <File name="include/ManagedVector.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> @@ -21,17 +16,17 @@ <Cursor1 position="0" topLine="0" /> </Cursor> </File> - <File name="include/StringBuilder.h" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="include/StringBuilder.h" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="560" topLine="0" /> + <Cursor1 position="2104" topLine="0" /> </Cursor> </File> - <File name="src/JSonWriter.cc" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/JSonWriter.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> <Cursor1 position="1655" topLine="3" /> </Cursor> </File> - <File name="include/JSonWriter.h" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="include/JSonWriter.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> <Cursor1 position="1532" topLine="0" /> </Cursor> @@ -41,4 +36,9 @@ <Cursor1 position="0" topLine="0" /> </Cursor> </File> + <File name="src/AbstractListAssembler.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <Cursor> + <Cursor1 position="0" topLine="0" /> + </Cursor> + </File> </CodeBlocks_layout_file> diff --git a/libs/util/util.layout.save b/libs/util/util.layout.save index 0fa61b3..8ba253a 100644 --- a/libs/util/util.layout.save +++ b/libs/util/util.layout.save @@ -1,44 +1,44 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <CodeBlocks_layout_file> <ActiveTarget name="Debug" /> - <File name="src/AbstractListAssembler.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="include/ManagedMap.h" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> <Cursor1 position="0" topLine="0" /> </Cursor> </File> - <File name="src/ManagedMap.cc" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/StringBuilder.cc" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="0" topLine="0" /> + <Cursor1 position="1766" topLine="0" /> </Cursor> </File> - <File name="include/ManagedMap.h" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="include/ManagedVector.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> <Cursor1 position="0" topLine="0" /> </Cursor> </File> - <File name="src/StringBuilder.cc" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="include/StringBuilder.h" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="3065" topLine="38" /> + <Cursor1 position="1114" topLine="0" /> </Cursor> </File> - <File name="src/JSonWriter.cc" open="1" top="1" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/JSonWriter.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="294" topLine="0" /> + <Cursor1 position="1655" topLine="3" /> </Cursor> </File> - <File name="include/ManagedVector.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="include/JSonWriter.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="0" topLine="0" /> + <Cursor1 position="1532" topLine="0" /> </Cursor> </File> - <File name="include/StringBuilder.h" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/ManagedMap.cc" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="560" topLine="0" /> + <Cursor1 position="0" topLine="0" /> </Cursor> </File> - <File name="include/JSonWriter.h" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/AbstractListAssembler.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="773" topLine="0" /> + <Cursor1 position="0" topLine="0" /> </Cursor> </File> </CodeBlocks_layout_file> diff --git a/libs/vdr/nbproject/private/private.xml b/libs/vdr/nbproject/private/private.xml index 5ee2703..dfdcba4 100644 --- a/libs/vdr/nbproject/private/private.xml +++ b/libs/vdr/nbproject/private/private.xml @@ -5,4 +5,5 @@ <activeConfIndexElem>0</activeConfIndexElem> </data> <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1"/> + <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/> </project-private> diff --git a/libs/vdr/src/ReadDir.cc b/libs/vdr/src/ReadDir.cc index a837f35..22737ca 100644 --- a/libs/vdr/src/ReadDir.cc +++ b/libs/vdr/src/ReadDir.cc @@ -1,30 +1,30 @@ /** * File: ReadDir.cc * Project: libvdr - classes taken from vdr-project - * + * * from "Video Disk Recorder": - * + * * Copyright (C) 2000, 2003, 2006, 2008 Klaus Schmidinger - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Or, point your browser to http://www.gnu.org/licenses/old-licenses/gpl-2.0.html - * + * * The original author can be reached at kls@tvdr.de - * + * * The vdr project's page is at http://www.tvdr.de - * + * */ #include <ReadDir.h> #include <stddef.h> @@ -47,7 +47,7 @@ struct dirent *cReadDir::Next(void) while (readdir_r(directory, &u.d, &result) == 0 && result) { if (strcmp(result->d_name, ".") && strcmp(result->d_name, "..")) return result; + } } - } return NULL; } diff --git a/libs/vdr/vdr.layout b/libs/vdr/vdr.layout index 3790b1a..ad6768b 100644 --- a/libs/vdr/vdr.layout +++ b/libs/vdr/vdr.layout @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <CodeBlocks_layout_file> <ActiveTarget name="Debug" /> - <File name="src/i18n.cc" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/Thread.cc" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> <Cursor1 position="0" topLine="0" /> </Cursor> @@ -11,14 +11,19 @@ <Cursor1 position="0" topLine="0" /> </Cursor> </File> - <File name="src/CharsetConv.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="include/CharsetConv.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="0" topLine="0" /> + <Cursor1 position="5244" topLine="0" /> </Cursor> </File> - <File name="src/Thread.cc" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/i18n.cc" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> <Cursor1 position="0" topLine="0" /> </Cursor> </File> + <File name="src/CharsetConv.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <Cursor> + <Cursor1 position="3680" topLine="57" /> + </Cursor> + </File> </CodeBlocks_layout_file> diff --git a/libs/vdr/vdr.layout.save b/libs/vdr/vdr.layout.save index 3790b1a..ad6768b 100644 --- a/libs/vdr/vdr.layout.save +++ b/libs/vdr/vdr.layout.save @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <CodeBlocks_layout_file> <ActiveTarget name="Debug" /> - <File name="src/i18n.cc" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/Thread.cc" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> <Cursor1 position="0" topLine="0" /> </Cursor> @@ -11,14 +11,19 @@ <Cursor1 position="0" topLine="0" /> </Cursor> </File> - <File name="src/CharsetConv.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="include/CharsetConv.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="0" topLine="0" /> + <Cursor1 position="5244" topLine="0" /> </Cursor> </File> - <File name="src/Thread.cc" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/i18n.cc" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> <Cursor1 position="0" topLine="0" /> </Cursor> </File> + <File name="src/CharsetConv.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <Cursor> + <Cursor1 position="3680" topLine="57" /> + </Cursor> + </File> </CodeBlocks_layout_file> diff --git a/tests/ConnectionHandlerTest/ConnectionHandlerTest.layout b/tests/ConnectionHandlerTest/ConnectionHandlerTest.layout index 84f2aab..b29fcb8 100644 --- a/tests/ConnectionHandlerTest/ConnectionHandlerTest.layout +++ b/tests/ConnectionHandlerTest/ConnectionHandlerTest.layout @@ -3,7 +3,7 @@ <ActiveTarget name="Debug" /> <File name="ConnectionHandlerTest.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="2048" topLine="0" /> + <Cursor1 position="1092" topLine="3" /> </Cursor> </File> </CodeBlocks_layout_file> diff --git a/tests/ConnectionHandlerTest/ConnectionHandlerTest.layout.save b/tests/ConnectionHandlerTest/ConnectionHandlerTest.layout.save index 84f2aab..b29fcb8 100644 --- a/tests/ConnectionHandlerTest/ConnectionHandlerTest.layout.save +++ b/tests/ConnectionHandlerTest/ConnectionHandlerTest.layout.save @@ -3,7 +3,7 @@ <ActiveTarget name="Debug" /> <File name="ConnectionHandlerTest.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="2048" topLine="0" /> + <Cursor1 position="1092" topLine="3" /> </Cursor> </File> </CodeBlocks_layout_file> diff --git a/tests/JSonTest/JSonTest.depend b/tests/JSonTest/JSonTest.depend index adf49ee..c4ac310 100644 --- a/tests/JSonTest/JSonTest.depend +++ b/tests/JSonTest/JSonTest.depend @@ -1,19 +1 @@ # depslib dependency file v1.0 -1342081955 source:/d/linux/CMP/tests/JSonTest/JSonTest.cc - <StringBuilder.h> - <JSonWriter.h> - <stdlib.h> - <iostream> - -1342076412 /d/linux/CMP/libs/util/include/StringBuilder.h - <ManagedVector.h> - <time.h> - -1342023981 /d/linux/CMP/libs/util/include/ManagedVector.h - <vector> - <stdlib.h> - -1342110667 /d/linux/CMP/libs/util/include/JSonWriter.h - <stack> - <StringBuilder.h> - diff --git a/tests/JSonTest/JSonTest.layout b/tests/JSonTest/JSonTest.layout index ed68962..ec843ab 100644 --- a/tests/JSonTest/JSonTest.layout +++ b/tests/JSonTest/JSonTest.layout @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <CodeBlocks_layout_file> <ActiveTarget name="Debug" /> - <File name="JSonTest.cc" open="1" top="1" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="JSonTest.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> <Cursor1 position="1541" topLine="0" /> </Cursor> |