You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(622) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(303) |
Feb
(64) |
Mar
(5) |
Apr
(63) |
May
(82) |
Jun
(53) |
Jul
(50) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Christian P. <cp...@us...> - 2005-01-16 00:08:52
|
Update of /cvsroot/pclasses/pclasses2/include/pclasses/System In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25391/include/pclasses/System Modified Files: Makefile.am Log Message: Makefile.am fixes. Index: Makefile.am =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/System/Makefile.am,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Makefile.am 31 Dec 2004 03:23:53 -0000 1.4 +++ Makefile.am 16 Jan 2005 00:08:09 -0000 1.5 @@ -1,5 +1,7 @@ +pclasses_system_includedir=$(pkgincludedir)/System + INCLUDES = METASOURCES = AUTO -pkginclude_HEADERS = SystemError.h SharedMemory.h CriticalSection.h Mutex.h \ - Condition.h Semaphore.h Thread.h SharedLib.h File.h FileInfo.h \ - Directory.h SystemClock.h ProcessIO.h Process.h +pclasses_system_include_HEADERS = SystemError.h SharedMemory.h CriticalSection.h Mutex.h \ + Condition.h Semaphore.h Thread.h SharedLib.h File.h FileInfo.h \ + Directory.h SystemClock.h ProcessIO.h Process.h |
From: Christian P. <cp...@us...> - 2005-01-16 00:08:51
|
Update of /cvsroot/pclasses/pclasses2/include/pclasses/Net In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25391/include/pclasses/Net Modified Files: Makefile.am Log Message: Makefile.am fixes. Index: Makefile.am =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/Net/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Makefile.am 14 Jan 2005 15:00:18 -0000 1.3 +++ Makefile.am 16 Jan 2005 00:08:08 -0000 1.4 @@ -1,4 +1,6 @@ +pclasses_net_includedir=$(pkgincludedir)/Net + INCLUDES = METASOURCES = AUTO -pkginclude_HEADERS = NetworkAddress.h Socket.h InetAddress.h InetSocket.h \ - HTTPHeader.h HTTPClient.h RTSPHeader.h RTSPSocket.h +pclasses_net_include_HEADERS = NetworkAddress.h Socket.h InetAddress.h InetSocket.h \ + HTTPHeader.h HTTPClient.h RTSPHeader.h RTSPSocket.h RTSPSession.h |
From: Christian P. <cp...@us...> - 2005-01-16 00:08:51
|
Update of /cvsroot/pclasses/pclasses2/include/pclasses/IO In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25391/include/pclasses/IO Modified Files: Makefile.am Log Message: Makefile.am fixes. Index: Makefile.am =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/IO/Makefile.am,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Makefile.am 6 Jan 2005 19:26:30 -0000 1.6 +++ Makefile.am 16 Jan 2005 00:08:01 -0000 1.7 @@ -1,3 +1,5 @@ +pclasses_io_includedir=$(pkgincludedir)/IO + INCLUDES = METASOURCES = AUTO -pkginclude_HEADERS = IOError.h IODevice.h IOStream.h IOFilter.h URL.h ZLib.h ZLibIOFilter.h BZip2.h BZip2IOFilter.h +pclasses_io_include_HEADERS = IOError.h IODevice.h IOStream.h IOFilter.h URL.h ZLib.h ZLibIOFilter.h BZip2.h BZip2IOFilter.h |
From: Christian P. <cp...@us...> - 2005-01-16 00:08:39
|
Update of /cvsroot/pclasses/pclasses2/include/pclasses In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25391/include/pclasses Modified Files: Makefile.am Log Message: Makefile.am fixes. Index: Makefile.am =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/Makefile.am,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- Makefile.am 14 Jan 2005 14:54:07 -0000 1.7 +++ Makefile.am 16 Jan 2005 00:08:00 -0000 1.8 @@ -1,4 +1,6 @@ -SUBDIRS = Unicode IO System Net Util XML App +pclasses_core_includedir=$(includedir)/pclasses + +SUBDIRS = Unicode IO System Plugin Net Util XML App INCLUDES = METASOURCES = AUTO pkginclude_HEADERS = Exception.h IntTypes.h ScopedArrayPtr.h ScopedPtr.h \ |
From: Christian P. <cp...@us...> - 2005-01-16 00:08:22
|
Update of /cvsroot/pclasses/pclasses2/include/pclasses/XML In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25391/include/pclasses/XML Modified Files: Makefile.am Log Message: Makefile.am fixes. Index: Makefile.am =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/XML/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Makefile.am 14 Jan 2005 14:48:55 -0000 1.2 +++ Makefile.am 16 Jan 2005 00:08:12 -0000 1.3 @@ -1,3 +1,5 @@ +pclasses_xml_includedir=$(pkgincludedir)/XML + INCLUDES = METASOURCES = AUTO -pkginclude_HEADERS = XMLParseError.h XMLPushParser.h +pclasses_xml_include_HEADERS = XMLParseError.h XMLPushParser.h |
From: Christian P. <cp...@us...> - 2005-01-16 00:08:21
|
Update of /cvsroot/pclasses/pclasses2/include/pclasses/Util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25391/include/pclasses/Util Modified Files: Makefile.am Log Message: Makefile.am fixes. Index: Makefile.am =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/Util/Makefile.am,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Makefile.am 30 Dec 2004 16:46:30 -0000 1.4 +++ Makefile.am 16 Jan 2005 00:08:11 -0000 1.5 @@ -1,3 +1,5 @@ +pclasses_util_includedir=$(pkgincludedir)/Util + INCLUDES = METASOURCES = AUTO -pkginclude_HEADERS = Any.h LexT.h ManagedThread.h Prefs.h SimplePropertyStore.h SimpleArgvParser.h StringTool.h ThreadPool.h Variant.h WorkQueue.h +pclasses_util_include_HEADERS = Any.h LexT.h ManagedThread.h Prefs.h SimplePropertyStore.h SimpleArgvParser.h StringTool.h ThreadPool.h Variant.h WorkQueue.h |
From: Christian P. <cp...@us...> - 2005-01-16 00:08:21
|
Update of /cvsroot/pclasses/pclasses2/include/pclasses/Unicode In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25391/include/pclasses/Unicode Modified Files: Makefile.am Log Message: Makefile.am fixes. Index: Makefile.am =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/Unicode/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Makefile.am 14 Jan 2005 14:46:01 -0000 1.2 +++ Makefile.am 16 Jan 2005 00:08:09 -0000 1.3 @@ -1,3 +1,5 @@ +pclasses_unicode_includedir=$(pkgincludedir)/Unicode + INCLUDES = METASOURCES = AUTO -pkginclude_HEADERS = uctype.h ustring.h Char.h String.h TextStream.h +pclasses_unicode_include_HEADERS = uctype.h ustring.h Char.h String.h TextStream.h |
From: Christian P. <cp...@us...> - 2005-01-16 00:08:18
|
Update of /cvsroot/pclasses/pclasses2/include/pclasses/Plugin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25391/include/pclasses/Plugin Added Files: Makefile.am Log Message: Makefile.am fixes. --- NEW FILE: Makefile.am --- pclasses_plugin_includedir=$(pkgincludedir)/Plugin INCLUDES = METASOURCES = AUTO pclasses_plugin_include_HEADERS = Plugin.h |
From: Christian P. <cp...@us...> - 2005-01-16 00:05:12
|
Update of /cvsroot/pclasses/pclasses2/include/pclasses/Net In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24693/include/pclasses/Net Modified Files: RTSPSocket.h Log Message: Some RTSP parts are rewritten. Index: RTSPSocket.h =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/Net/RTSPSocket.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- RTSPSocket.h 14 Jan 2005 14:56:01 -0000 1.1 +++ RTSPSocket.h 16 Jan 2005 00:05:00 -0000 1.2 @@ -32,6 +32,7 @@ public: //! RTSP Request methods enum Method { + UNKNOWN, DESCRIBE, ANNOUNCE, GET_PARAMETER, @@ -45,6 +46,7 @@ TEARDOWN }; + RTSPRequest(); RTSPRequest(Method m); RTSPRequest(Method m, const IO::URL& url); ~RTSPRequest() throw(); @@ -57,14 +59,17 @@ bool hasUrl() const throw(); const IO::URL& url() const throw(); - const RTSPRequestHeader& header() const throw(); + void setProtocolVersion(const std::string& protoVer); + const std::string& protocolVersion() const throw(); + const RTSPRequestHeader& header() const throw(); RTSPRequestHeader& header() throw(); private: Method _method; IO::URL _url; bool _urlValid; + std::string _protoVer; RTSPRequestHeader _header; }; @@ -73,6 +78,9 @@ //! RTSP response class class RTSPResponse: public IO::IODevice { public: + RTSPResponse(const std::string& protoVer, + int code, const std::string& reason); + RTSPResponse(RTSPSocket& socket, const std::string& protoVer, int code, const std::string& reason); @@ -112,8 +120,18 @@ void open(Domain d) throw(IO::IOError); - void sendRequest(RTSPRequest& req) throw(IO::IOError); + void sendRequest(const RTSPRequest& req) throw(IO::IOError); + RTSPRequest readRequest() throw(IO::IOError); + + void sendResponse(const RTSPResponse& resp) throw(IO::IOError); RTSPResponse readResponse() throw(IO::IOError); + + private: + void readHeader(RTSPHeader& header) throw(IO::IOError); + void sendHeader(const RTSPHeader& header) throw(IO::IOError); + + unsigned int _cSeqInNext; + unsigned int _cSeqOutNext; }; |
From: Christian P. <cp...@us...> - 2005-01-16 00:05:12
|
Update of /cvsroot/pclasses/pclasses2/src/Net In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24693/src/Net Modified Files: RTSPSocket.cpp Log Message: Some RTSP parts are rewritten. Index: RTSPSocket.cpp =================================================================== RCS file: /cvsroot/pclasses/pclasses2/src/Net/RTSPSocket.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- RTSPSocket.cpp 14 Jan 2005 14:56:01 -0000 1.1 +++ RTSPSocket.cpp 16 Jan 2005 00:05:00 -0000 1.2 @@ -28,13 +28,18 @@ extern Socket::Domain AddrFamily2Domain(int family); +RTSPRequest::RTSPRequest() +: _method(UNKNOWN), _url(), _urlValid(false), _protoVer("RTSP/1.0") +{ +} + RTSPRequest::RTSPRequest(Method method) -: _method(method), _url(), _urlValid(false) +: _method(method), _url(), _urlValid(false), _protoVer("RTSP/1.0") { } RTSPRequest::RTSPRequest(Method method, const IO::URL& url) -: _method(method), _url(url), _urlValid(true) +: _method(method), _url(url), _urlValid(true), _protoVer("RTSP/1.0") { } @@ -68,6 +73,16 @@ return _urlValid; } +void RTSPRequest::setProtocolVersion(const std::string& protoVer) +{ + _protoVer = protoVer; +} + +const std::string& RTSPRequest::protocolVersion() const throw() +{ + return _protoVer; +} + const RTSPRequestHeader& RTSPRequest::header() const throw() { return _header; @@ -78,8 +93,15 @@ return _header; } +RTSPResponse::RTSPResponse(const std::string& protoVer, + int code, const std::string& reason) +: _socket(0), _protoVer(protoVer), _statusCode(code), _reason(reason), + _bytesRead(0), _contentLength(0) +{ +} + RTSPResponse::RTSPResponse(RTSPSocket& socket, const std::string& protoVer, - int code, const std::string& reason) + int code, const std::string& reason) : _socket(&socket), _protoVer(protoVer), _statusCode(code), _reason(reason), _bytesRead(0), _contentLength(0) { @@ -208,9 +230,44 @@ Socket::open(d, Stream, 0); } -void RTSPSocket::sendRequest(RTSPRequest& req) throw(IO::IOError) +void RTSPSocket::sendHeader(const RTSPHeader& header) throw(IO::IOError) { - IO::IOStream reqs(*this); +} + +void RTSPSocket::readHeader(RTSPHeader& header) throw(IO::IOError) +{ + std::string line; + + // read request headers ... + while(1) + { + line = readLine(); + + // eof ? + if(line.empty()) + break; + + // response header terminated ? + if(line == "\r\n" || line == "\r" || line == "\n") + break; + + // split string and set header field/value ... + size_t pos = line.find(':'); + if(pos != std::string::npos && line.size() > 4) + { + std::string headName = line.substr(0, pos); + std::string headVal = line.substr(pos+2, line.size()-(pos+4)); + + std::cerr << headName << '=' << headVal << std::endl; + + header.set(headName, headVal); + } + } +} + +void RTSPSocket::sendRequest(const RTSPRequest& req) throw(IO::IOError) +{ + std::ostringstream reqs; switch(req.method()) { @@ -258,7 +315,7 @@ reqs << "*"; // send protocol version .. - reqs << " RTSP/1.0\r\n"; + reqs << " " << req.protocolVersion() << "\r\n"; // send header lines ... RTSPHeader::const_iterator i = req.header().begin(); @@ -275,44 +332,103 @@ if(!hostFound) reqs << "Host: " << req.url().host() << "\r\n"; - // terminate request and flush stream + // terminate request and send it ... reqs << "\r\n"; - reqs.sync(); + + std::string reqStr = reqs.str(); + write(reqStr.data(), reqStr.size()); +} + +RTSPRequest RTSPSocket::readRequest() throw(IO::IOError) +{ + std::string rtspMethod; + std::string url; + std::string rtspProto; + + std::string line = readLine(); + if(!line.empty()) + { + std::istringstream is(line); + is >> rtspMethod; + is >> url; + is >> rtspProto; + } + + RTSPRequest::Method method; + + if(rtspMethod == "DESCRIBE") + method = RTSPRequest::DESCRIBE; + else if(rtspMethod == "ANNOUNCE") + method = RTSPRequest::ANNOUNCE; + else if(rtspMethod == "GET_PARAMETER") + method = RTSPRequest::GET_PARAMETER; + else if(rtspMethod == "OPTIONS") + method = RTSPRequest::OPTIONS; + else if(rtspMethod == "PAUSE") + method = RTSPRequest::PAUSE; + else if(rtspMethod == "PLAY") + method = RTSPRequest::PLAY; + else if(rtspMethod == "RECORD") + method = RTSPRequest::RECORD; + else if(rtspMethod == "REDIRECT") + method = RTSPRequest::REDIRECT; + else if(rtspMethod == "SETUP") + method = RTSPRequest::SETUP; + else if(rtspMethod == "SET_PARAMETER") + method = RTSPRequest::SET_PARAMETER; + else if(rtspMethod == "TEARDOWN") + method = RTSPRequest::TEARDOWN; + else + { + //@@fixme throw + } + + // construct our request object ... + RTSPRequest ret(method); + ret.setProtocolVersion(rtspProto); + + // set request url if not '*' ... + if(url != "*") + ret.setUrl(url); + + readHeader(ret.header()); + + return ret; +} + +void RTSPSocket::sendResponse(const RTSPResponse& resp) throw(IO::IOError) +{ + std::ostringstream resps; + resps << resp.protocolVersion() << " " << resp.statusCode() << " " << resp.reason() << "\r\n"; + + // send header lines ... + RTSPHeader::const_iterator i = resp.header().begin(); + while(i != resp.header().end()) + { + resps << i->first << ": " << i->second << "\r\n"; + ++i; + } + + // terminate request and send it ... + resps << "\r\n"; + + std::string respStr = resps.str(); + write(respStr.data(), respStr.size()); } RTSPResponse RTSPSocket::readResponse() throw(IO::IOError) { - std::string line1 = readLine(); + std::string line = readLine(); std::string rtspProto, rtspResponse; int rtspResponseCode; - std::string tmp; - std::istringstream is(line1); + std::istringstream is(line); is >> rtspProto; is >> rtspResponseCode; is >> rtspResponse; RTSPResponse resp(*this, rtspProto, rtspResponseCode, rtspResponse); - - while(1) - { - tmp = readLine(); - - // response header terminated ? - if(tmp == "\r\n" || tmp == "\n") - break; - - size_t pos = tmp.find(':'); - if(pos != std::string::npos && tmp.size() > 4) - { - std::string headName = tmp.substr(0, pos); - std::string headVal = tmp.substr(pos+2, tmp.size()-(pos+4)); - - std::cerr << headName << '=' << headVal << std::endl; - - resp.header().set(headName, headVal); - } - } + readHeader(resp.header()); return resp; } |
From: Christian P. <cp...@us...> - 2005-01-16 00:03:30
|
Update of /cvsroot/pclasses/pclasses2/src/Net In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24410/src/Net Added Files: RTSPSession.cpp Log Message: Added RTSPSession class. --- NEW FILE: RTSPSession.cpp --- /*************************************************************************** * Copyright (C) 2004 by Christian Prochnow * * cp...@se... * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU Library 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 Library General Public * * License along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include "pclasses/Net/RTSPSession.h" namespace P { namespace Net { RTSPSession::RTSPSession() : _state(Setup) { //@@fixme generate sessionId } RTSPSession::RTSPSession(const std::string& sessionId) : _state(Setup), _sessionId(sessionId) { } RTSPSession::~RTSPSession() { } RTSPSession::State RTSPSession::state() const throw() { return _state; } const std::string& RTSPSession::sessionId() const throw() { return _sessionId; } } // !namespace Net } // !namespace P |
From: Christian P. <cp...@us...> - 2005-01-16 00:03:28
|
Update of /cvsroot/pclasses/pclasses2/include/pclasses/Net In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24410/include/pclasses/Net Added Files: RTSPSession.h Log Message: Added RTSPSession class. --- NEW FILE: RTSPSession.h --- /*************************************************************************** * Copyright (C) 2004 by Christian Prochnow * * cp...@se... * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU Library 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 Library General Public * * License along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include <string> namespace P { namespace Net { //! RTSP Session class RTSPSession { public: enum State { Setup, Play, Record, Pause, Teardown }; RTSPSession(); RTSPSession(const std::string& sessionId); ~RTSPSession() throw(); State state() const throw(); const std::string& sessionId() const throw(); private: State _state; std::string _sessionId; }; } // !namespace Net } // !namespace P |
From: Christian P. <cp...@us...> - 2005-01-16 00:00:07
|
Update of /cvsroot/pclasses/pclasses2/src/App In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23225/src/App Modified Files: Makefile.am Added Files: SimpleApp.cpp Log Message: Fixed install pkgincludedir in Makefile.am Added SimpleApp. --- NEW FILE: SimpleApp.cpp --- /*************************************************************************** * Copyright (C) 2004 by Christian Prochnow * * cp...@se... * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU Library 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 Library General Public * * License along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include "pclasses/App/SimpleApp.h" #include <signal.h> namespace P { namespace App { SimpleApp* SimpleApp::_theApp = 0; SimpleApp::SimpleApp(const AppDetails& details) throw() : _exitCode(0), _details(details) { _theApp = this; } SimpleApp::~SimpleApp() throw() { _theApp = 0; } const AppDetails& SimpleApp::details() const throw() { return _details; } int SimpleApp::exitCode() const throw() { return _exitCode; } int SimpleApp::run(int argc, char* argv[]) { int ret = init(argc, argv); if(!ret) { ret = main(); cleanup(); } return ret; } int SimpleApp::init(int argc, char* argv[]) { #ifdef WIN32 { //SetConsoleCtrlHandler((PHANDLER_ROUTINE)SIGTERM_handler, TRUE); signal(SIGTERM, &signal_handler); signal(SIGINT, &signal_handler); } #else { signal(SIGTERM, &signal_handler); signal(SIGQUIT, &signal_handler); signal(SIGINT, &signal_handler); } #endif return 0; } int SimpleApp::main() { _exitSem.wait(); return _exitCode; } void SimpleApp::stop(int code) { _exitCode = code; _exitSem.post(); } void SimpleApp::cleanup() { } void SimpleApp::terminate(int signal) { stop(1); } PCLASSES_RETSIGTYPE SimpleApp::signal_handler(int sig) { #ifdef WIN32 { _theApp->terminate(sig); } #else { if(sig == SIGTERM || sig == SIGQUIT || sig == SIGINT) { signal(sig, SIG_IGN); _theApp->terminate(sig); signal(sig, &signal_handler); } } #endif } SimpleApp* theApp() throw() { return SimpleApp::_theApp; } } // !namespace App } // !namespace P Index: Makefile.am =================================================================== RCS file: /cvsroot/pclasses/pclasses2/src/App/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Makefile.am 11 Jan 2005 14:55:50 -0000 1.2 +++ Makefile.am 15 Jan 2005 23:59:53 -0000 1.3 @@ -3,7 +3,7 @@ lib_LTLIBRARIES = libpclasses_app.la libpclasses_app_la_SOURCES = AppDetails.cpp LogMessage.cpp LogTarget.cpp \ - LogChannel.cpp LogManager.cpp + LogChannel.cpp LogManager.cpp SimpleApp.cpp libpclasses_app_la_LDFLAGS = -no-undefined |
From: Christian P. <cp...@us...> - 2005-01-16 00:00:05
|
Update of /cvsroot/pclasses/pclasses2/include/pclasses/App In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23225/include/pclasses/App Modified Files: Makefile.am Added Files: SimpleApp.h Log Message: Fixed install pkgincludedir in Makefile.am Added SimpleApp. Index: Makefile.am =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/App/Makefile.am,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Makefile.am 10 Jan 2005 02:38:57 -0000 1.1 +++ Makefile.am 15 Jan 2005 23:59:53 -0000 1.2 @@ -1,3 +1,6 @@ +pclasses_app_includedir=$(pkgincludedir)/App + INCLUDES = METASOURCES = AUTO -pkginclude_HEADERS = AppDetails.h LogMessage.h LogTarget.h LogChannel.h LogManager.h +pclasses_app_include_HEADERS = AppDetails.h LogMessage.h LogTarget.h \ + LogChannel.h LogManager.h SimpleApp.h --- NEW FILE: SimpleApp.h --- /*************************************************************************** * Copyright (C) 2004 by Christian Prochnow * * cp...@se... * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU Library 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 Library General Public * * License along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #ifndef P_App_SimpleApp_h #define P_App_SimpleApp_h #include <pclasses/pclasses-config.h> #include <pclasses/NonCopyable.h> #include <pclasses/System/Semaphore.h> #include <pclasses/App/AppDetails.h> namespace P { namespace App { //! Simple application base class class SimpleApp: public NonCopyable { public: //! Simple application constructor /*! Simple application constructor. \param about A reference to the applications about data. */ SimpleApp(const AppDetails& details) throw(); virtual ~SimpleApp() throw(); //! Init & run the application /*! This method initializes the application by calling init(). When initialization was successfull the main method will be called. Before returning with the app's exit code, cleanup() will be called. \return the applications exit code, returned by the main() method */ int run(int argc, char* argv[]); //! Stop the application /*! The stop functions increases a semaphore to tell the main-loop that it should exit. \param code applications exit code */ void stop(int code); //! Terminate application on signal virtual void terminate(int signal); //! Returns a reference to the about data const AppDetails& details() const throw(); //! Returns a pointer to the application object friend SimpleApp* theApp() throw(); protected: //! Application init /*! Overload this method to implement application initialization. Remember to call the default implementation to initialize the process signal handlers. \return returns zero if initialization was successfull, otherwise the exit code of the application. */ virtual int init(int argc, char* argv[]); //! Application main loop /*! Overload this method to implement the application main-loop. The default implementation does nothing except waiting for the exit semaphore to become increased and will then return with the value given to the stop() method. \return the applications exit code */ virtual int main(); //! Application cleanup function /*! Implement this method for cleaning up the application before exiting. */ virtual void cleanup(); //! Process signal handler static PCLASSES_RETSIGTYPE signal_handler(int); //! Returns a reference to the exit-semaphore System::Semaphore& exitSem() const throw(); //! Returns the application's exit code int exitCode() const throw(); private: System::Semaphore _exitSem; int _exitCode; const AppDetails& _details; static SimpleApp* _theApp; }; } // !namespace App } // !namespace P #endif |
From: stephan b. <sg...@us...> - 2005-01-15 23:40:33
|
Update of /cvsroot/pclasses/pclasses2/include/pclasses In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18873 Modified Files: Factory.h Log Message: added a missing typename which is caught by Marc's compiler but not mine :/ Index: Factory.h =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/Factory.h,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- Factory.h 10 Jan 2005 13:00:56 -0000 1.19 +++ Factory.h 15 Jan 2005 23:40:22 -0000 1.20 @@ -366,7 +366,7 @@ virtual void registerFactory( const key_type & key, FactoryFuncType fp ) { //CERR << "registerFactory("<<key<<",facfunc)\n"; - factoryMap().insert( FactoryMap::value_type( key, fp ) ); + factoryMap().insert( typename FactoryMap::value_type( key, fp ) ); } template <typename TypeName> |
From: stephan b. <sg...@us...> - 2005-01-15 23:16:48
|
Update of /cvsroot/pclasses/pclasses2/src/Unicode In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13065 Modified Files: Makefile.toc Log Message: added unicodedata.cpp Index: Makefile.toc =================================================================== RCS file: /cvsroot/pclasses/pclasses2/src/Unicode/Makefile.toc,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- Makefile.toc 15 Jan 2005 23:08:45 -0000 1.9 +++ Makefile.toc 15 Jan 2005 23:16:38 -0000 1.10 @@ -12,7 +12,8 @@ SOURCES = Char.cpp \ String.cpp \ - TextStream.cpp + TextStream.cpp \ + unicodedata.cpp HEADERS = unicodedata.h @@ -26,7 +27,8 @@ OBJECTS = Char.o \ String.o \ - TextStream.o + TextStream.o \ + unicodedata.o $(OBJECTS): $(SOURCES_UNICODE_GEN) |
From: stephan b. <sg...@us...> - 2005-01-15 23:15:06
|
Update of /cvsroot/pclasses/pclasses2/src/XML In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12714 Modified Files: Makefile.am Log Message: removed a missing file so Marc (sitting next to me) can build on his box. Index: Makefile.am =================================================================== RCS file: /cvsroot/pclasses/pclasses2/src/XML/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Makefile.am 14 Jan 2005 14:48:56 -0000 1.2 +++ Makefile.am 15 Jan 2005 23:14:56 -0000 1.3 @@ -3,8 +3,10 @@ lib_LTLIBRARIES = libpclasses_xml.la -libpclasses_xml_la_SOURCES = XMLParseError.cpp XMLPushParser.expat.cpp \ - XMLRPC_Value.cpp +libpclasses_xml_la_SOURCES = XMLParseError.cpp XMLPushParser.expat.cpp + +# Christian: please commit this file and re-add to Makefile.am: +# XMLRPC_Value.cpp libpclasses_xml_la_LDFLAGS = -no-undefined |
From: stephan b. <sg...@us...> - 2005-01-15 23:11:44
|
Update of /cvsroot/pclasses/pclasses2/toc/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12137 Modified Files: user_is_stephan_beal.sh Log Message: updated for the new laptop Index: user_is_stephan_beal.sh =================================================================== RCS file: /cvsroot/pclasses/pclasses2/toc/tests/user_is_stephan_beal.sh,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- user_is_stephan_beal.sh 30 Dec 2004 15:30:42 -0000 1.2 +++ user_is_stephan_beal.sh 15 Jan 2005 23:11:33 -0000 1.3 @@ -6,7 +6,7 @@ got=0 -for h in cheyenne ludo jareth hoggle owl; do +for h in owl goblin; do test x$h = "x${HOSTNAME}" && { got=1; break; } done |
From: stephan b. <sg...@us...> - 2005-01-15 23:08:55
|
Update of /cvsroot/pclasses/pclasses2/src/Unicode In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11657 Modified Files: Makefile.am Makefile.toc Log Message: updated unicodedata.* rules to match Makefile.am Index: Makefile.am =================================================================== RCS file: /cvsroot/pclasses/pclasses2/src/Unicode/Makefile.am,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Makefile.am 14 Jan 2005 14:46:02 -0000 1.4 +++ Makefile.am 15 Jan 2005 23:08:45 -0000 1.5 @@ -18,3 +18,5 @@ libpclasses_unicode_la_LDFLAGS = -no-undefined libpclasses_unicode_la_LIBADD = $(top_builddir)/src/libpclasses.la + +all: unicodedata Index: Makefile.toc =================================================================== RCS file: /cvsroot/pclasses/pclasses2/src/Unicode/Makefile.toc,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- Makefile.toc 29 Dec 2004 20:11:19 -0000 1.8 +++ Makefile.toc 15 Jan 2005 23:08:45 -0000 1.9 @@ -14,7 +14,9 @@ String.cpp \ TextStream.cpp -SOURCES_UNICODE_GEN = unicodedata.h unicodedata_extra.h +HEADERS = unicodedata.h + +SOURCES_UNICODE_GEN = unicodedata_extra_db.h unicodedata_db.h ######################################################################## # install these or not? @@ -73,7 +75,7 @@ ifeq (1,$(THIS_IS_A_DEV_TREE)) CLEAN_FILES += $(SOURCES_UNICODE_GEN) $(SOURCES_UNICODE_GEN): $(UNICODE_DATA_FILE) - $(AWK_BIN) -f $(UD_GENERATOR) $(UNICODE_DATA_FILE) >unicodedata.h + $(AWK_BIN) -f $(UD_GENERATOR) $(UNICODE_DATA_FILE) >unicodedata_db.h else ###### for "mere mortal" trees, use the shipped copies and don't delete them: $(SOURCES_UNICODE_GEN): |
From: Christian P. <cp...@us...> - 2005-01-14 15:00:31
|
Update of /cvsroot/pclasses/pclasses2/include/pclasses/Net In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22155/include/pclasses/Net Modified Files: Makefile.am Log Message: Addded RTSPHeader.[h|cpp], RTSPSocket.[h|cpp] Index: Makefile.am =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/Net/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Makefile.am 7 Jan 2005 13:43:54 -0000 1.2 +++ Makefile.am 14 Jan 2005 15:00:18 -0000 1.3 @@ -1,4 +1,4 @@ INCLUDES = METASOURCES = AUTO -pkginclude_HEADERS = NetworkAddress.h Socket.h InetAddress.h InetSocket.h HTTPHeader.h HTTPClient.h - +pkginclude_HEADERS = NetworkAddress.h Socket.h InetAddress.h InetSocket.h \ + HTTPHeader.h HTTPClient.h RTSPHeader.h RTSPSocket.h |
From: Christian P. <cp...@us...> - 2005-01-14 15:00:31
|
Update of /cvsroot/pclasses/pclasses2/src/Net In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22155/src/Net Modified Files: Makefile.am Log Message: Addded RTSPHeader.[h|cpp], RTSPSocket.[h|cpp] Index: Makefile.am =================================================================== RCS file: /cvsroot/pclasses/pclasses2/src/Net/Makefile.am,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Makefile.am 11 Jan 2005 14:55:48 -0000 1.4 +++ Makefile.am 14 Jan 2005 15:00:19 -0000 1.5 @@ -12,6 +12,6 @@ libpclasses_net_la_LDFLAGS = -no-undefined libpclasses_net_la_SOURCES = Socket.cpp NetworkAddress.cpp InetAddress.cpp \ - InetSocket.cpp HTTPHeader.cpp HTTPClient.cpp + InetSocket.cpp HTTPHeader.cpp HTTPClient.cpp RTSPHeader.cpp RTSPSocket.cpp noinst_HEADERS = SocketOption.h |
From: Christian P. <cp...@us...> - 2005-01-14 14:58:17
|
Update of /cvsroot/pclasses/pclasses2/src/Net In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21590/src/Net Modified Files: HTTPClient.cpp Log Message: Renamed some members of HTTPResponse. Index: HTTPClient.cpp =================================================================== RCS file: /cvsroot/pclasses/pclasses2/src/Net/HTTPClient.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- HTTPClient.cpp 7 Jan 2005 13:41:23 -0000 1.1 +++ HTTPClient.cpp 14 Jan 2005 14:58:05 -0000 1.2 @@ -67,9 +67,9 @@ return _header; } -HTTPResponse::HTTPResponse(HTTPClient& client, const std::string& proto, - int code, const std::string& resp) -: _client(&client), _proto(proto), _responseCode(code), _response(resp), +HTTPResponse::HTTPResponse(HTTPClient& client, const std::string& protoVer, + int code, const std::string& reason) +: _client(&client), _protoVer(protoVer), _statusCode(code), _reason(reason), _bytesRead(0), _contentLength(0), _chunkedEncoding(false) { setAccess(Read); @@ -92,19 +92,19 @@ return _header; } -const std::string& HTTPResponse::protocol() const throw() +const std::string& HTTPResponse::protocolVersion() const throw() { - return _proto; + return _protoVer; } -int HTTPResponse::responseCode() const throw() +int HTTPResponse::statusCode() const throw() { - return _responseCode; + return _statusCode; } -const std::string& HTTPResponse::response() const throw() +const std::string& HTTPResponse::reason() const throw() { - return _response; + return _reason; } void HTTPResponse::_close() throw(IO::IOError) @@ -221,9 +221,9 @@ return ret; } -HTTPClient::Domain AddrFamily2Domain(int family) +Socket::Domain AddrFamily2Domain(int family) { - HTTPClient::Domain d; + Socket::Domain d; switch(family) { case AF_INET: |
From: Christian P. <cp...@us...> - 2005-01-14 14:58:15
|
Update of /cvsroot/pclasses/pclasses2/include/pclasses/Net In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21590/include/pclasses/Net Modified Files: HTTPClient.h Log Message: Renamed some members of HTTPResponse. Index: HTTPClient.h =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/Net/HTTPClient.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- HTTPClient.h 7 Jan 2005 13:41:23 -0000 1.1 +++ HTTPClient.h 14 Jan 2005 14:58:04 -0000 1.2 @@ -58,11 +58,11 @@ HTTPRequestHeader _header; }; -//! HTTP Response codes +//! HTTP Status codes /*! - Response codes used by the Hypertext-Transfer-Protocol. + Response status codes used by the Hypertext-Transfer-Protocol. */ -enum HTTPResponseCode { +enum HTTPStatusCode { HTTP_100_CONTINUE = 100, HTTP_101_SWITCHING_PROTOCOL = 101, HTTP_200_OK = 200, @@ -109,19 +109,19 @@ class HTTPResponse: public IO::IODevice { public: - HTTPResponse(HTTPClient& client, const std::string& proto, - int code, const std::string& resp); + HTTPResponse(HTTPClient& client, const std::string& protoVer, + int code, const std::string& reason); ~HTTPResponse() throw(); const HTTPResponseHeader& header() const throw(); HTTPResponseHeader& header() throw(); - const std::string& protocol() const throw(); + const std::string& protocolVersion() const throw(); - int responseCode() const throw(); + int statusCode() const throw(); - const std::string& response() const throw(); + const std::string& reason() const throw(); private: void _close() throw(IO::IOError); @@ -130,9 +130,9 @@ HTTPClient* _client; HTTPResponseHeader _header; - std::string _proto; - int _responseCode; - std::string _response; + std::string _protoVer; + int _statusCode; + std::string _reason; size_t _bytesRead; size_t _contentLength; bool _chunkedEncoding; |
From: Christian P. <cp...@us...> - 2005-01-14 14:57:03
|
Update of /cvsroot/pclasses/pclasses2/src/Net In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21416/src/Net Modified Files: HTTPHeader.cpp Log Message: Use PropertyMap as base-class for Headers. Index: HTTPHeader.cpp =================================================================== RCS file: /cvsroot/pclasses/pclasses2/src/Net/HTTPHeader.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- HTTPHeader.cpp 7 Jan 2005 13:41:23 -0000 1.1 +++ HTTPHeader.cpp 14 Jan 2005 14:56:50 -0000 1.2 @@ -32,54 +32,24 @@ { } -const std::string& HTTPHeader::get(const std::string& head) const -{ - static std::string empty; - const_iterator i = _values.find(head); - if(i != _values.end()) - return i->second; - - return empty; -} -void HTTPHeader::set(const std::string& head, const std::string& val) -{ - _values[head] = val; -} - -bool HTTPHeader::remove(const std::string& head) +HTTPRequestHeader::HTTPRequestHeader() { - iterator i = _values.find(head); - if(i != _values.end()) - { - _values.erase(i); - return true; - } - - return false; } -bool HTTPHeader::contains(const std::string& head) const +HTTPRequestHeader::~HTTPRequestHeader() { - return (_values.find(head) != _values.end() ? true : false); } -HTTPHeader::iterator HTTPHeader::find(const std::string& head) -{ - return _values.find(head); -} -HTTPHeader::const_iterator HTTPHeader::find(const std::string& head) const +HTTPResponseHeader::HTTPResponseHeader() { - return _values.find(head); } -const std::string& HTTPHeader::operator[](const std::string& head) const +HTTPResponseHeader::~HTTPResponseHeader() { - return get(head); } - } // !namespace Net } // !namespace P |
From: Christian P. <cp...@us...> - 2005-01-14 14:57:03
|
Update of /cvsroot/pclasses/pclasses2/include/pclasses/Net In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21416/include/pclasses/Net Modified Files: HTTPHeader.h Log Message: Use PropertyMap as base-class for Headers. Index: HTTPHeader.h =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/Net/HTTPHeader.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- HTTPHeader.h 7 Jan 2005 13:41:23 -0000 1.1 +++ HTTPHeader.h 14 Jan 2005 14:56:50 -0000 1.2 @@ -21,8 +21,8 @@ #ifndef P_Net_HTTPHeader_h #define P_Net_HTTPHeader_h +#include <pclasses/PropertyMap.h> #include <string> -#include <map> namespace P { @@ -32,24 +32,11 @@ /*! The base class for a HTTP-Request or -Response. */ -class HTTPHeader { +class HTTPHeader: public PropertyMap<std::string, std::string> { public: - typedef std::map<std::string, std::string> FieldMap; - typedef FieldMap::iterator iterator; - typedef FieldMap::const_iterator const_iterator; - HTTPHeader(); ~HTTPHeader(); - void set(const std::string& head, const std::string& val); - const std::string& get(const std::string& head) const; - - bool remove(const std::string& head); - bool contains(const std::string& head) const; - - iterator find(const std::string& head); - const_iterator find(const std::string& head) const; - inline void setCacheControl(const std::string& val) { set("Cache-Control", val); } @@ -83,22 +70,6 @@ inline void setWarning(const std::string& val) { set("Warning", val); } - const std::string& operator[](const std::string& head) const; - - inline const_iterator begin() const - { return _values.begin(); } - - inline const_iterator end() const - { return _values.end(); } - - inline iterator begin() - { return _values.begin(); } - - inline iterator end() - { return _values.end(); } - - private: - FieldMap _values; }; //! HTTP Request-Header @@ -107,8 +78,8 @@ */ class HTTPRequestHeader: public HTTPHeader { public: - HTTPRequestHeader() {} - ~HTTPRequestHeader() {} + HTTPRequestHeader(); + ~HTTPRequestHeader(); inline void setAccept(const std::string& val) { set("Accept", val); } @@ -174,8 +145,8 @@ */ class HTTPResponseHeader: public HTTPHeader { public: - HTTPResponseHeader() {} - ~HTTPResponseHeader() {} + HTTPResponseHeader(); + ~HTTPResponseHeader(); inline void setAcceptRanges(const std::string& val) { set("Accept-Ranges", val); } |