diff options
-rw-r--r-- | cmps/server.cbp.save | 9 | ||||
-rw-r--r-- | cmps/server.layout | 2 | ||||
-rw-r--r-- | cmps/server.layout.save | 2 | ||||
-rw-r--r-- | cmps/serverlib/include/HTTPMediaResponse.h | 4 | ||||
-rw-r--r-- | cmps/serverlib/serverlib.layout | 8 | ||||
-rw-r--r-- | cmps/serverlib/serverlib.layout.save | 8 | ||||
-rw-r--r-- | cmps/serverlib/src/HTTPMediaResponse.cc | 17 | ||||
-rw-r--r-- | libs/fsScan/fsScan.layout | 48 | ||||
-rw-r--r-- | libs/fsScan/fsScan.layout.save | 48 | ||||
-rw-r--r-- | libs/fsScan/include/AbstractMedia.h | 1 | ||||
-rw-r--r-- | libs/fsScan/include/AbstractMultiFileMovie.h | 1 | ||||
-rw-r--r-- | libs/fsScan/src/AbstractMedia.cc | 8 | ||||
-rw-r--r-- | libs/fsScan/src/AbstractMultiFileMovie.cc | 6 | ||||
-rw-r--r-- | libs/networking/include/HTTPResponse.h | 13 | ||||
-rw-r--r-- | libs/networking/networking.layout | 18 | ||||
-rw-r--r-- | libs/networking/networking.layout.save | 20 | ||||
-rw-r--r-- | libs/networking/src/ConnectionHandler.cc | 13 | ||||
-rw-r--r-- | libs/networking/src/HTTPResponse.cc | 18 | ||||
-rw-r--r-- | libs/util/util.layout | 18 | ||||
-rw-r--r-- | libs/util/util.layout.save | 24 | ||||
-rw-r--r-- | libs/vdr/vdr.layout | 14 | ||||
-rw-r--r-- | libs/vdr/vdr.layout.save | 11 |
22 files changed, 171 insertions, 140 deletions
diff --git a/cmps/server.cbp.save b/cmps/server.cbp.save index 55c4f6d..fd89233 100644 --- a/cmps/server.cbp.save +++ b/cmps/server.cbp.save @@ -46,17 +46,10 @@ <Add library="../libs/networking/libnetworking.a" /> <Add library="../libs/util/libutil.a" /> <Add library="../libs/vdr/libvdr.a" /> - <Add library="jpeg" /> <Add library="pthread" /> - <Add library="dl" /> - <Add library="cap" /> - <Add library="rt" /> - <Add library="fribidi" /> - <Add library="freetype" /> - <Add library="fontconfig" /> - <Add library="yajl" /> <Add library="ssl" /> <Add library="crypt" /> + <Add library="rt" /> </Linker> <Unit filename="main.cc" /> <Extensions> diff --git a/cmps/server.layout b/cmps/server.layout index 6418deb..140c8d3 100644 --- a/cmps/server.layout +++ b/cmps/server.layout @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <CodeBlocks_layout_file> <ActiveTarget name="Debug" /> - <File name="main.cc" open="1" top="1" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="main.cc" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> <Cursor1 position="213" topLine="0" /> </Cursor> diff --git a/cmps/server.layout.save b/cmps/server.layout.save index 33999bc..140c8d3 100644 --- a/cmps/server.layout.save +++ b/cmps/server.layout.save @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <CodeBlocks_layout_file> <ActiveTarget name="Debug" /> - <File name="main.cc" open="1" top="1" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="main.cc" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> <Cursor1 position="213" topLine="0" /> </Cursor> diff --git a/cmps/serverlib/include/HTTPMediaResponse.h b/cmps/serverlib/include/HTTPMediaResponse.h index 298f43c..40830c4 100644 --- a/cmps/serverlib/include/HTTPMediaResponse.h +++ b/cmps/serverlib/include/HTTPMediaResponse.h @@ -35,8 +35,12 @@ public: virtual size_t ReadContentChunk(char *Buf, size_t bufSize); +protected: + virtual void HandleAbort(void); + private: cAbstractMedia *media; + friend class cConnectionHandler; }; #endif /* HTTPMEDIARESPONSE_H */ diff --git a/cmps/serverlib/serverlib.layout b/cmps/serverlib/serverlib.layout index 270cbed..51b7661 100644 --- a/cmps/serverlib/serverlib.layout +++ b/cmps/serverlib/serverlib.layout @@ -1,14 +1,14 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <CodeBlocks_layout_file> <ActiveTarget name="Debug" /> - <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/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/JSonListAssembler.cc" open="0" top="0" tabpos="7" 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="1183" topLine="0" /> + <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"> diff --git a/cmps/serverlib/serverlib.layout.save b/cmps/serverlib/serverlib.layout.save index 270cbed..51b7661 100644 --- a/cmps/serverlib/serverlib.layout.save +++ b/cmps/serverlib/serverlib.layout.save @@ -1,14 +1,14 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <CodeBlocks_layout_file> <ActiveTarget name="Debug" /> - <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/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/JSonListAssembler.cc" open="0" top="0" tabpos="7" 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="1183" topLine="0" /> + <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"> diff --git a/cmps/serverlib/src/HTTPMediaResponse.cc b/cmps/serverlib/src/HTTPMediaResponse.cc index ca08576..e403afe 100644 --- a/cmps/serverlib/src/HTTPMediaResponse.cc +++ b/cmps/serverlib/src/HTTPMediaResponse.cc @@ -1,25 +1,25 @@ /** * ======================== legal notice ====================== - * + * * File: HTTPMediaResponse.cc * Created: 6. Juli 2012, 07 * 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 <HTTPMediaResponse.h> @@ -43,6 +43,11 @@ cHTTPMediaResponse::~cHTTPMediaResponse() { } +void cHTTPMediaResponse::HandleAbort(void) +{ + if (media) media->Reset(); +} + size_t cHTTPMediaResponse::ReadContentChunk(char* Buf, size_t bufSize) { if (!media) return 0; diff --git a/libs/fsScan/fsScan.layout b/libs/fsScan/fsScan.layout index 846388e..8fcde57 100644 --- a/libs/fsScan/fsScan.layout +++ b/libs/fsScan/fsScan.layout @@ -1,64 +1,64 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <CodeBlocks_layout_file> <ActiveTarget name="Debug" /> - <File name="include/File.h" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="include/FileRepresentation.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="1782" topLine="0" /> + <Cursor1 position="1593" topLine="0" /> </Cursor> </File> - <File name="src/File.cc" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="include/MediaFactory.h" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="3161" topLine="54" /> + <Cursor1 position="1119" topLine="0" /> </Cursor> </File> - <File name="src/FilesystemScanner.cc" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/LegacyVdrRecording.cc" open="0" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="2803" topLine="0" /> + <Cursor1 position="1450" topLine="0" /> </Cursor> </File> - <File name="src/FileRepresentation.cc" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/AbstractMedia.cc" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="1911" topLine="9" /> + <Cursor1 position="1453" topLine="0" /> </Cursor> </File> - <File name="include/FileSystem.h" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/FileSystem.cc" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="1438" topLine="0" /> + <Cursor1 position="1476" topLine="9" /> </Cursor> </File> - <File name="src/FileSystem.cc" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="include/File.h" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="1476" topLine="9" /> + <Cursor1 position="1782" topLine="0" /> </Cursor> </File> - <File name="src/AbstractMedia.cc" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="include/FileSystem.h" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="1453" topLine="0" /> + <Cursor1 position="1438" topLine="0" /> </Cursor> </File> - <File name="src/LegacyVdrRecording.cc" open="0" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/VdrRecording.cc" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="1450" topLine="0" /> + <Cursor1 position="1404" topLine="0" /> </Cursor> </File> - <File name="include/FileRepresentation.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/FileRepresentation.cc" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="1593" topLine="0" /> + <Cursor1 position="1911" topLine="9" /> </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"> + <File name="src/MediaFactory.cc" open="1" top="1" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="0" topLine="0" /> + <Cursor1 position="1709" topLine="9" /> </Cursor> </File> - <File name="include/MediaFactory.h" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/File.cc" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="1119" topLine="0" /> + <Cursor1 position="3161" topLine="54" /> </Cursor> </File> - <File name="src/VdrRecording.cc" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/FilesystemScanner.cc" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="1404" topLine="0" /> + <Cursor1 position="2177" topLine="0" /> </Cursor> </File> </CodeBlocks_layout_file> diff --git a/libs/fsScan/fsScan.layout.save b/libs/fsScan/fsScan.layout.save index 846388e..70e2a8e 100644 --- a/libs/fsScan/fsScan.layout.save +++ b/libs/fsScan/fsScan.layout.save @@ -1,64 +1,64 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <CodeBlocks_layout_file> <ActiveTarget name="Debug" /> - <File name="include/File.h" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="include/FileRepresentation.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="1782" topLine="0" /> + <Cursor1 position="1593" topLine="0" /> </Cursor> </File> - <File name="src/File.cc" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/FileSystem.cc" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="3161" topLine="54" /> + <Cursor1 position="1476" topLine="9" /> </Cursor> </File> - <File name="src/FilesystemScanner.cc" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/LegacyVdrRecording.cc" open="0" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="2803" topLine="0" /> + <Cursor1 position="1450" topLine="0" /> </Cursor> </File> - <File name="src/FileRepresentation.cc" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="include/FileSystem.h" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="1911" topLine="9" /> + <Cursor1 position="1438" topLine="0" /> </Cursor> </File> - <File name="include/FileSystem.h" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="include/MediaFactory.h" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="1438" topLine="0" /> + <Cursor1 position="1119" topLine="0" /> </Cursor> </File> - <File name="src/FileSystem.cc" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/MediaFactory.cc" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="1476" topLine="9" /> + <Cursor1 position="1709" topLine="9" /> </Cursor> </File> - <File name="src/AbstractMedia.cc" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/File.cc" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="1453" topLine="0" /> + <Cursor1 position="3161" topLine="54" /> </Cursor> </File> - <File name="src/LegacyVdrRecording.cc" open="0" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/FileRepresentation.cc" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="1450" topLine="0" /> + <Cursor1 position="1911" topLine="9" /> </Cursor> </File> - <File name="include/FileRepresentation.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/VdrRecording.cc" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="1593" topLine="0" /> + <Cursor1 position="1404" 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"> + <File name="src/AbstractMedia.cc" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="0" topLine="0" /> + <Cursor1 position="1453" topLine="0" /> </Cursor> </File> - <File name="include/MediaFactory.h" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="include/File.h" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="1119" topLine="0" /> + <Cursor1 position="1782" topLine="0" /> </Cursor> </File> - <File name="src/VdrRecording.cc" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/FilesystemScanner.cc" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="1404" topLine="0" /> + <Cursor1 position="2177" topLine="0" /> </Cursor> </File> </CodeBlocks_layout_file> diff --git a/libs/fsScan/include/AbstractMedia.h b/libs/fsScan/include/AbstractMedia.h index 573265b..750ffde 100644 --- a/libs/fsScan/include/AbstractMedia.h +++ b/libs/fsScan/include/AbstractMedia.h @@ -63,6 +63,7 @@ public: ///< determine the real size, number of files, etc. virtual size_t ReadChunk(char *buf, size_t bufSize); ///< used to hide the differences between single- and multi-file media. + virtual void Reset(void); static const char *MediaType2Text(int Type); protected: diff --git a/libs/fsScan/include/AbstractMultiFileMovie.h b/libs/fsScan/include/AbstractMultiFileMovie.h index f05826b..aed75b9 100644 --- a/libs/fsScan/include/AbstractMultiFileMovie.h +++ b/libs/fsScan/include/AbstractMultiFileMovie.h @@ -39,6 +39,7 @@ public: protected: cAbstractMultiFileMovie(const cFile &File, const char *Mime, SupportedMediaType Type); + virtual void Reset(void); void SetName(char *Name); void SetSize(size_t Size); bool checkBuffer(void); diff --git a/libs/fsScan/src/AbstractMedia.cc b/libs/fsScan/src/AbstractMedia.cc index 1a7c1da..27ad751 100644 --- a/libs/fsScan/src/AbstractMedia.cc +++ b/libs/fsScan/src/AbstractMedia.cc @@ -86,6 +86,14 @@ size_t cAbstractMedia::ReadChunk(char* Buf, size_t bufSize) return rv; } +void cAbstractMedia::Reset(void) +{ + if (fd >= 0) { + close(fd); + fd = -1; + } +} + size_t cAbstractMedia::Size(void) const { return keyPath.Size(); diff --git a/libs/fsScan/src/AbstractMultiFileMovie.cc b/libs/fsScan/src/AbstractMultiFileMovie.cc index a5de060..d20da87 100644 --- a/libs/fsScan/src/AbstractMultiFileMovie.cc +++ b/libs/fsScan/src/AbstractMultiFileMovie.cc @@ -90,6 +90,12 @@ size_t cAbstractMultiFileMovie::ReadChunk(char* Buf, size_t bufSize) return rv; } +void cAbstractMultiFileMovie::Reset() +{ + cMovie::Reset(); + curFileNo = 0; +} + void cAbstractMultiFileMovie::SetName(char* Name) ///< Name must have already been allocated from heap! { diff --git a/libs/networking/include/HTTPResponse.h b/libs/networking/include/HTTPResponse.h index f7745c6..dbc0969 100644 --- a/libs/networking/include/HTTPResponse.h +++ b/libs/networking/include/HTTPResponse.h @@ -1,25 +1,25 @@ /** * ======================== legal notice ====================== - * + * * File: HTTPResponse.h * 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 - * + * * 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 HTTPRESPONSE_H @@ -58,6 +58,7 @@ public: protected: virtual size_t WriteFirstLine(char *Buffer, size_t BufSize); + virtual void HandleAbort(void); void ParseMessage(const char *MessageBuf); private: diff --git a/libs/networking/networking.layout b/libs/networking/networking.layout index 108821b..2a90f60 100644 --- a/libs/networking/networking.layout +++ b/libs/networking/networking.layout @@ -1,9 +1,9 @@ <?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="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="src/ConnectionPoint.cc" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> @@ -11,32 +11,32 @@ <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="src/HTTPMessage.cc" open="0" top="0" tabpos="8" 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="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/HTTPMessage.cc" open="0" top="0" tabpos="8" 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> </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/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/HTTPResponse.h" open="0" top="0" tabpos="5" 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> diff --git a/libs/networking/networking.layout.save b/libs/networking/networking.layout.save index 108821b..747a7b6 100644 --- a/libs/networking/networking.layout.save +++ b/libs/networking/networking.layout.save @@ -1,44 +1,44 @@ <?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="src/ConnectionPoint.cc" open="0" top="0" tabpos="4" 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> </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="src/HTTPMessage.cc" open="0" top="0" tabpos="8" 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="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/ConnectionHandler.h" open="0" top="0" tabpos="2" 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="0" 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"> + <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="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/HTTPResponse.h" open="0" top="0" tabpos="5" 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> </CodeBlocks_layout_file> diff --git a/libs/networking/src/ConnectionHandler.cc b/libs/networking/src/ConnectionHandler.cc index 9ad24a6..abed00f 100644 --- a/libs/networking/src/ConnectionHandler.cc +++ b/libs/networking/src/ConnectionHandler.cc @@ -1,25 +1,25 @@ /** * ======================== legal notice ====================== - * + * * File: ConnectionHandler.cc * 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 <ConnectionHandler.h> @@ -369,6 +369,7 @@ void cConnectionHandler::TransferResponse(cHTTPResponse *Response) if (nTrans < 1) { esyslog("failed to transmit chunk. Error #%d", errno); + Response->HandleAbort(); break; } total += nTrans; diff --git a/libs/networking/src/HTTPResponse.cc b/libs/networking/src/HTTPResponse.cc index c49483c..e9ae8eb 100644 --- a/libs/networking/src/HTTPResponse.cc +++ b/libs/networking/src/HTTPResponse.cc @@ -1,25 +1,25 @@ /** * ======================== legal notice ====================== - * + * * File: HTTPResponse.cc * 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 - * + * * 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 <HTTPResponse.h> @@ -80,6 +80,12 @@ void cHTTPResponse::SetDefaultStatusBody(HTTPStatusCode Status) "</HTML>\n"); } +void cHTTPResponse::HandleAbort(void) +///< handle cases where client closes connection while transfer was in progress +{ + // default: do nothing +} + size_t cHTTPResponse::ReadContentChunk(char* Buf, size_t bufSize) { return content.Copy(Buf, bufSize); diff --git a/libs/util/util.layout b/libs/util/util.layout index 7e589ad..4b6674b 100644 --- a/libs/util/util.layout +++ b/libs/util/util.layout @@ -1,9 +1,9 @@ <?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/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="src/ManagedMap.cc" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> @@ -11,19 +11,19 @@ <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"> + <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="src/StringBuilder.cc" open="1" 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="1953" topLine="59" /> + <Cursor1 position="0" topLine="0" /> </Cursor> </File> - <File name="src/JSonWriter.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/StringBuilder.cc" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="1655" topLine="3" /> + <Cursor1 position="1953" topLine="59" /> </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"> @@ -36,9 +36,9 @@ <Cursor1 position="1959" topLine="0" /> </Cursor> </File> - <File name="include/JSonWriter.h" open="0" top="0" tabpos="2" 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="1532" topLine="0" /> + <Cursor1 position="1655" topLine="3" /> </Cursor> </File> </CodeBlocks_layout_file> diff --git a/libs/util/util.layout.save b/libs/util/util.layout.save index 258d1db..31519aa 100644 --- a/libs/util/util.layout.save +++ b/libs/util/util.layout.save @@ -6,9 +6,9 @@ <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/JSonWriter.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="1655" topLine="3" /> </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"> @@ -16,29 +16,29 @@ <Cursor1 position="0" topLine="0" /> </Cursor> </File> - <File name="src/StringBuilder.cc" open="1" top="0" tabpos="1" 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="1953" topLine="59" /> + <Cursor1 position="1532" topLine="0" /> </Cursor> </File> - <File name="src/JSonWriter.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="include/StringBuilder.h" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="1655" topLine="3" /> + <Cursor1 position="1959" 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"> + <File name="src/StringBuilder.cc" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="0" topLine="0" /> + <Cursor1 position="1953" topLine="59" /> </Cursor> </File> - <File name="include/StringBuilder.h" open="1" top="0" tabpos="2" 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="1959" topLine="9" /> + <Cursor1 position="0" topLine="0" /> </Cursor> </File> - <File name="include/JSonWriter.h" open="0" top="0" tabpos="2" 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="1532" topLine="0" /> + <Cursor1 position="0" topLine="0" /> </Cursor> </File> </CodeBlocks_layout_file> diff --git a/libs/vdr/vdr.layout b/libs/vdr/vdr.layout index 0786057..3986f32 100644 --- a/libs/vdr/vdr.layout +++ b/libs/vdr/vdr.layout @@ -1,17 +1,22 @@ <?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> </File> + <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="5244" 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> - <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> @@ -21,9 +26,4 @@ <Cursor1 position="0" topLine="0" /> </Cursor> </File> - <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="5244" topLine="0" /> - </Cursor> - </File> </CodeBlocks_layout_file> diff --git a/libs/vdr/vdr.layout.save b/libs/vdr/vdr.layout.save index 0786057..3a9219d 100644 --- a/libs/vdr/vdr.layout.save +++ b/libs/vdr/vdr.layout.save @@ -11,19 +11,24 @@ <Cursor1 position="3680" topLine="57" /> </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/TimeMs.cc" open="1" top="1" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> <Cursor1 position="0" topLine="0" /> </Cursor> </File> + <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="5244" topLine="0" /> + </Cursor> + </File> <File name="include/Thread.h" 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="include/CharsetConv.h" open="0" top="0" tabpos="0" 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="5244" topLine="0" /> + <Cursor1 position="0" topLine="0" /> </Cursor> </File> </CodeBlocks_layout_file> |