diff options
Diffstat (limited to 'libs')
-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 |
15 files changed, 145 insertions, 116 deletions
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> |