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: Loof, D. <dl...@us...> - 2005-01-19 13:26:05
|
Update of /cvsroot/pclasses/pclasses2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29468 Modified Files: configure.in Log Message: add debian support Index: configure.in =================================================================== RCS file: /cvsroot/pclasses/pclasses2/configure.in,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- configure.in 17 Jan 2005 22:38:44 -0000 1.7 +++ configure.in 19 Jan 2005 13:25:55 -0000 1.8 @@ -24,6 +24,8 @@ AM_CONFIG_HEADER(include/pclasses/config.h) AM_INIT_AUTOMAKE(pclasses, 2.0_alpha1) +AC_PREREQ(2.50) + AC_GNU_SOURCE AC_AIX AC_MINIX |
From: stephan b. <sg...@us...> - 2005-01-18 18:13:35
|
Update of /cvsroot/pclasses/pclasses2/doc/manual In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3954 Modified Files: pclasses2.lyx Log Message: minor changes/fixed Index: pclasses2.lyx =================================================================== RCS file: /cvsroot/pclasses/pclasses2/doc/manual/pclasses2.lyx,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- pclasses2.lyx 29 Dec 2004 20:10:55 -0000 1.5 +++ pclasses2.lyx 18 Jan 2005 18:13:05 -0000 1.6 @@ -43,9 +43,7 @@ \layout Abstract This is the library manual for P::Classes 2.x. -\layout Abstract - -It provides an overview of what features P::Classes provides and how to + It provides an overview of what features P::Classes provides and how to use them. This document is a supplement to the API docs, and does not provide a 100% standalone source of information about the library. @@ -93,7 +91,7 @@ Threading. \layout Itemize -Plugins. +Plugins (dynamic loading of types from DLLs). \layout Itemize Server-neutral database interface, including modules for MySQL(tm), Postgres(tm) @@ -103,18 +101,25 @@ Unicode-capable string and regular expressions support. \layout Itemize -Signals and slots. +Generic, type-safe callback (signals and slots). +\layout Itemize + +Application-level services, such as persistant, per-application preferences/conf +iguration data. +\layout Itemize + +Generic, powerful object serialization. \layout Standard P \begin_inset Quotes sld \end_inset -should run +should \begin_inset Quotes srd \end_inset - at at least the following architectures: + run on at least the following architectures: \layout Itemize Win32, MSVC ( @@ -124,7 +129,7 @@ ) \layout Itemize -Posix (GNU/Linux), +Posix (e.g., GNU/Linux), \color red gcc 3.2(?)+ \layout Itemize @@ -162,6 +167,26 @@ pclasses2 \family default . +\layout Subsubsection + +3rd-party dependencies +\layout Standard + +As of this writing, P2 has the following dependencies on 3rd-party libraries: +\layout Itemize + +zlib +\layout Itemize + +bz2lib +\layout Itemize + +expat (dep to be removed) +\layout Itemize + +Unix systems only: libdl or libltdl, or another supported native interface + similar to dlopen(). + (Windows systems use the built-in LoadModule() function instead.) \layout Subsection Disclaimers @@ -193,32 +218,46 @@ Some included source code may fall under other licenses, such as BSD or Public Domain. Please see the specific files for details. + All licenses used in this project allow clients to use the library in their + own code without being forced to change their own software's licenses. \layout Subsection Credits \layout Itemize -Christian Prochnow: author, project lead and main developer. +Christian Prochnow (Germany): author, project lead and main developer. \layout Itemize -Marc Duerner: +Dr. + Marc Duerner (Germany): \color red TODO \color default . \layout Itemize -Bernhard Rosenkraenzer: +Bernhard +\begin_inset Quotes sld +\end_inset + +Bero +\begin_inset Quotes srd +\end_inset + + Rosenkraenzer (Germany): \color red TODO \color default . \layout Itemize -Gregor Jehle: w-w-webmaster. +Gregor Jehle (Germany): w-w-webmaster. \layout Itemize -stephan beal: likes to write docs and break old code/conventions. +Bernhard Hieke (Germany): father figure and a really nice guy. +\layout Itemize + +stephan beal (Germany): likes to write docs and break old code/conventions. Writes the P::s11n support (http://s11n.net/ps11n/). \layout Section @@ -237,10 +276,13 @@ Unicode: Unicode string support. \layout Itemize +IO: device-independent i/o support. +\layout Itemize + System: threading and shared library support. \layout Itemize -IO: device-independent i/o support. +XML: Parsers and helpers for working with the world's most Xtreme data format. \layout Itemize Net: network-transparent i/o support. @@ -249,13 +291,13 @@ SQL: db-neutral SQL support. \layout Itemize -Util: more advanced thread management. +Util: general utility code. \layout Itemize Crypto: cryptography and hasing support. \layout Itemize -s11n: +SIO: \begin_inset Quotes sld \end_inset @@ -264,6 +306,9 @@ \end_inset support. +\layout Itemize + +App: application-level services. \layout Section Core Module @@ -302,6 +347,22 @@ SourceInfo is a type used by Exception to tell developers exactly where an exception is thrown from. + It is rarely used directly, but is often seen in calls such as this one: +\layout Quote + +throw MyException( +\begin_inset Quotes sld +\end_inset + +Damn! +\begin_inset Quotes srd +\end_inset + +, P_SOURCEINFO ); +\layout Standard + +where the P_SOURCEINFO macro creates a SourceInfo object to pass to the + exception. \layout Subsection LinkedItem @@ -368,6 +429,8 @@ The Factory template type plays a major role in P, providing the interface for key-based lookup of object factories. What does that mean? It means the ability to dynamically load classes. + It is based off of the classloading architecture described here: http://s11n.net +/papers/classloading_cpp.html \layout Subsubsection Registration @@ -428,7 +491,7 @@ PFACREG_TYPE_NAME = the string form of the name to use for classloading. \layout Itemize -PFACREG_TYPE_INTERFACE = dubtypes of MyType should define this to MyType, +PFACREG_TYPE_INTERFACE = subtypes of MyType should define this to MyType, so that they get registered with the proper base classloader. \layout Itemize @@ -437,7 +500,16 @@ \layout Itemize PFACREG_CONTEXT = the factory context. + +\emph on +Chefsache +\emph default +. Don't set this unless you really, really know what you're doing. +\layout Standard + +As per the general conventions for supermacros, all of these macros are + undefined after calling the FactoryReg.h supermacro. \layout Paragraph Factory::registerFactory() @@ -457,7 +529,7 @@ \family default or \family typewriter -/srctree/test/CType.cpp +srctree/test/CType.cpp \family default for examples. \layout Paragraph @@ -479,7 +551,7 @@ s11n. \layout Subsection -Signals and Slots +Callback (Signals and Slots) \layout Standard A templates-based, thread-safe signals and slots (object messaging) implementati @@ -507,6 +579,9 @@ \layout Standard Encapsulates a Unicode string. + This String type is highly optimized for substring and range operations, + allowing several Strings to share parts of a string without copying them + (until a copy is needed, of course). \layout Subsection @@ -609,6 +684,8 @@ Provides a platform-neutral interface into shared libraries (also called DLL's and .so's). + This includes the ability to open them and peek inside them to extract + known symbols. \layout Subsubsection @@ -733,16 +810,50 @@ \layout Standard -The types in this section all live in the namespace P::Util. +Most of the types in this section all live in the namespace P::Util, and + some live under P::Util::Ext. +\layout Subsection + +SimpleArgvParser +\layout Standard + +A simple helper to parse command-line arguments passed in to main(). +\layout Subsection + +SimplePropertyStore +\layout Standard + +A simple key/value pair store. +\layout Subsection + +StringTool +\layout Standard + +A set of utility functions for working with string data. +\layout Subsection + +LexT +\layout Standard + +A type providing a simple-to-use lexical casting interface. \layout Subsection ManagedThread +\layout Standard + +IMO, should be moved to System (stephan). \layout Subsection ThreadPool +\layout Standard + +IMO, should be moved to System (stephan). \layout Subsection WorkQueue +\layout Standard + +IMO, should be moved to System (stephan). \layout Section s11n Module @@ -758,6 +869,13 @@ This module is a direct fork/port of s11n.net's libs11n framework. Only the core, non-platform-dependents parts are ported here. + Clients are encouraged to avoid using P::s11n directly, and to use P::SIO + (section +\begin_inset LatexCommand \ref{sub:SIO-interface} + +\end_inset + +) when possible, as SIO provides a P-centric API into the s11n core. \layout Standard P::s11n will not be documented much here, as it is just a clone of libs11n, @@ -782,9 +900,13 @@ Also, i [stephan] am the maintainer of s11n.net, as well of of P::s11n, and want to keep the cross-tree-porting effort to a minimum. We hope you can appreciate the reasons for this API inconsistency. - A more P-friendly interface will be developed at some point, to hide this - difference from (most) client code. - + See the P::SIO module (section +\begin_inset LatexCommand \ref{sec:IO-Module} + +\end_inset + +) for a P-centric s11n API, which uses the P naming conventions and provides + s11n proxies for several P types. \layout Subsection SIO interface @@ -798,9 +920,9 @@ Clients using P's s11n features are encourages to use the P::SIO API, provided via \family typewriter -<pclasses/s11n/SIO.h> +<pclasses/SIO/SIO.h> \family default -. +, instead of using P::s11n. \layout Standard Here are examples of using the SIO interface: @@ -808,7 +930,7 @@ \family typewriter -#include <pclasses/s11n/SIO.h> +#include <pclasses/PSIO/SIO.h> \layout Quote @@ -828,13 +950,11 @@ That saves using the SIO::serializerClass() Serializer, which is set via serializerClass(classname). - Default is of course expat, because that's all we have at the moment. \layout Standard Loading has 3 options, shown below. Remember that you don't need to know the input format of a stream/file: - any loaded/loadable format will do. - That is, if s11n can find a handler for it, it will be loaded. + if s11n can find a handler for it, it will be loaded. \layout Standard Loading, method #1: @@ -913,6 +1033,21 @@ \family typewriter MyType * t = loadSerializable<MyType>( file|stream ); +\layout Standard + +As a general tip: use +\family typewriter +std::auto_ptr<S11nNode> +\family default + to make sure that +\begin_inset Quotes sld +\end_inset + +temporary +\begin_inset Quotes srd +\end_inset + + nodes are cleaned up in the face of exceptions. \layout Subsection Registering Serializables @@ -934,7 +1069,7 @@ \family typewriter -#include <pclasses/s11n/SIO.h> // P client interface into s11n +#include <pclasses/SIO/SIO.h> // P client interface into s11n \layout Quote @@ -1027,6 +1162,8 @@ \family default , to get information regarding includes paths and linker options required for building client code. + Note that P is separated into several libraries, and the exact libs clients + need to link to depends on which parts of P they use. \layout Standard |
From: stephan b. <sg...@us...> - 2005-01-18 18:12:26
|
Update of /cvsroot/pclasses/pclasses2/include/pclasses In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3829/include/pclasses Modified Files: pclasses-config.h.at Log Message: added PCLASSES_RETSIGTYPE Index: pclasses-config.h.at =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/pclasses-config.h.at,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- pclasses-config.h.at 30 Dec 2004 20:14:10 -0000 1.9 +++ pclasses-config.h.at 18 Jan 2005 18:12:12 -0000 1.10 @@ -4,6 +4,7 @@ // @CONFIGURE_TIMESTAMP@ // ^^^ exists to force some files to rebuild after a configure. + namespace P { } // namespace P @@ -18,6 +19,8 @@ #define PCLASSES_SHARED_DATA_DIR "@prefix@/share/pclasses" #define PCLASSES_PLUGINS_DIR "@prefix@/lib/pclasses" +#define PCLASSES_RETSIGTYPE @PCLASSES_RETSIGTYPE@ + #if @PCLASSES_HAVE_LARGEFILE@ == 0 # undef PCLASSES_HAVE_LARGEFILE #else |
From: stephan b. <sg...@us...> - 2005-01-18 18:10:56
|
Update of /cvsroot/pclasses/pclasses2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3421 Modified Files: configure.pclasses2 Log Message: added quick-hack workaround for PCLASSES_RETSIGTYPE. Index: configure.pclasses2 =================================================================== RCS file: /cvsroot/pclasses/pclasses2/configure.pclasses2,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- configure.pclasses2 12 Jan 2005 11:59:53 -0000 1.25 +++ configure.pclasses2 18 Jan 2005 18:10:33 -0000 1.26 @@ -146,7 +146,7 @@ rm sizes toc_export LDADD_SHM="-lrt" - +toc_export PCLASSES_RETSIGTYPE=void # fix this: determine dynamically cat <<EOF > /dev/null the following defs needs to be ported to toc: |
From: stephan b. <sg...@us...> - 2005-01-18 18:04:48
|
Update of /cvsroot/pclasses/pclasses2/src/System In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2036 Modified Files: Makefile.toc Log Message: added ThreadKey.posix.cpp Index: Makefile.toc =================================================================== RCS file: /cvsroot/pclasses/pclasses2/src/System/Makefile.toc,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- Makefile.toc 31 Dec 2004 14:34:10 -0000 1.18 +++ Makefile.toc 18 Jan 2005 18:04:17 -0000 1.19 @@ -59,7 +59,8 @@ Semaphore.posix.cpp \ SharedMemory.posix.cpp \ SystemClock.posix.cpp \ - Thread.posix.cpp + Thread.posix.cpp \ + ThreadKey.posix.cpp SOURCES_WIN32 = Condition.win32.cpp \ CriticalSection.win32.cpp \ |
From: Christian P. <cp...@us...> - 2005-01-18 17:53:24
|
Update of /cvsroot/pclasses/pclasses2/include/pclasses/App In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32117/include/pclasses/App Modified Files: Makefile.am Log Message: Added BackgroundApp.[h|cpp] Index: Makefile.am =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/App/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Makefile.am 15 Jan 2005 23:59:53 -0000 1.2 +++ Makefile.am 18 Jan 2005 17:53:12 -0000 1.3 @@ -3,4 +3,4 @@ INCLUDES = METASOURCES = AUTO pclasses_app_include_HEADERS = AppDetails.h LogMessage.h LogTarget.h \ - LogChannel.h LogManager.h SimpleApp.h + LogChannel.h LogManager.h SimpleApp.h BackgroundApp.h |
From: Christian P. <cp...@us...> - 2005-01-18 17:53:24
|
Update of /cvsroot/pclasses/pclasses2/src/App In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32117/src/App Modified Files: Makefile.am Log Message: Added BackgroundApp.[h|cpp] Index: Makefile.am =================================================================== RCS file: /cvsroot/pclasses/pclasses2/src/App/Makefile.am,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Makefile.am 17 Jan 2005 22:50:33 -0000 1.4 +++ Makefile.am 18 Jan 2005 17:53:14 -0000 1.5 @@ -5,7 +5,7 @@ CPPFLAGS = -DPAPP_BUILD libpclasses_app_la_SOURCES = AppDetails.cpp LogMessage.cpp LogTarget.cpp \ - LogChannel.cpp LogManager.cpp SimpleApp.cpp + LogChannel.cpp LogManager.cpp SimpleApp.cpp BackgroundApp.cpp libpclasses_app_la_LDFLAGS = -no-undefined |
From: Christian P. <cp...@us...> - 2005-01-18 17:52:39
|
Update of /cvsroot/pclasses/pclasses2/src/App In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31834/src/App Modified Files: SimpleApp.cpp Log Message: Export SimpleApp. Added SimpleApp::finish(). Re-worked signal handling. Index: SimpleApp.cpp =================================================================== RCS file: /cvsroot/pclasses/pclasses2/src/App/SimpleApp.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- SimpleApp.cpp 15 Jan 2005 23:59:53 -0000 1.1 +++ SimpleApp.cpp 18 Jan 2005 17:52:24 -0000 1.2 @@ -55,6 +55,7 @@ { ret = main(); cleanup(); + finish(); } return ret; @@ -65,16 +66,19 @@ #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 + + #ifdef SIGTERM + ::signal(SIGTERM, &signalHandler); + #endif + #ifdef SIGQUIT + ::signal(SIGQUIT, &signalHandler); + #endif + #ifdef SIGINT + ::signal(SIGINT, &signalHandler); + #endif + return 0; } @@ -94,29 +98,45 @@ { } -void SimpleApp::terminate(int signal) +void SimpleApp::finish() { - stop(1); } -PCLASSES_RETSIGTYPE SimpleApp::signal_handler(int sig) +PCLASSES_RETSIGTYPE SimpleApp::signalHandler(int sig) { #ifdef WIN32 { - _theApp->terminate(sig); + _theApp->signal(sig); } #else { - if(sig == SIGTERM || sig == SIGQUIT || sig == SIGINT) - { - signal(sig, SIG_IGN); - _theApp->terminate(sig); - signal(sig, &signal_handler); - } + ::signal(sig, SIG_IGN); + _theApp->signal(sig); + ::signal(sig, &signalHandler); } #endif } +void SimpleApp::signal(int sig) +{ + switch(sig) + { + #ifdef SIGTERM + case SIGTERM: + #endif + #ifdef SIGQUIT + case SIGQUIT: + #endif + #ifdef SIGINT + case SIGINT: + stop(1); + break; + #endif + default: + break; + } +} + SimpleApp* theApp() throw() { return SimpleApp::_theApp; |
From: Christian P. <cp...@us...> - 2005-01-18 17:52:37
|
Update of /cvsroot/pclasses/pclasses2/include/pclasses/App In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31834/include/pclasses/App Modified Files: SimpleApp.h Log Message: Export SimpleApp. Added SimpleApp::finish(). Re-worked signal handling. Index: SimpleApp.h =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/App/SimpleApp.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- SimpleApp.h 15 Jan 2005 23:59:53 -0000 1.1 +++ SimpleApp.h 18 Jan 2005 17:52:24 -0000 1.2 @@ -21,7 +21,8 @@ #ifndef P_App_SimpleApp_h #define P_App_SimpleApp_h -#include <pclasses/pclasses-config.h> +#include <pclasses/pclasses-config.h> // reqd for PCLASSES_RETSIGTYPE +#include <pclasses/Export.h> #include <pclasses/NonCopyable.h> #include <pclasses/System/Semaphore.h> #include <pclasses/App/AppDetails.h> @@ -31,7 +32,7 @@ namespace App { //! Simple application base class -class SimpleApp: public NonCopyable { +class PAPP_EXPORT SimpleApp: public NonCopyable { public: //! Simple application constructor /*! @@ -43,10 +44,10 @@ //! 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. + 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, + but only when init() was successfull. \return the applications exit code, returned by the main() method */ int run(int argc, char* argv[]); @@ -59,9 +60,6 @@ */ 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(); @@ -74,7 +72,7 @@ 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, + \return should return zero when initialization was successfull, otherwise the exit code of the application. */ virtual int init(int argc, char* argv[]); @@ -95,16 +93,21 @@ exiting. */ virtual void cleanup(); - - //! Process signal handler - static PCLASSES_RETSIGTYPE signal_handler(int); - + + //! Called right before exiting the process, but after cleanup(). + virtual void finish(); + + //! Signal handler + virtual void signal(int sig); + //! Returns a reference to the exit-semaphore System::Semaphore& exitSem() const throw(); //! Returns the application's exit code int exitCode() const throw(); + static PCLASSES_RETSIGTYPE signalHandler(int); + private: System::Semaphore _exitSem; int _exitCode; |
From: Christian P. <cp...@us...> - 2005-01-18 17:50:18
|
Update of /cvsroot/pclasses/pclasses2/include/pclasses/App In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31280/include/pclasses/App Added Files: BackgroundApp.h Log Message: Added BackgroundApp class. --- NEW FILE: BackgroundApp.h --- /*************************************************************************** * Copyright (C) 2005 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_BackgroundApp_h #define P_App_BackgroundApp_h #include <pclasses/Export.h> #include <pclasses/System/SystemError.h> #include <pclasses/App/SimpleApp.h> namespace P { namespace App { //! Background application base class class PAPP_EXPORT BackgroundApp: public SimpleApp { public: BackgroundApp(const AppDetails& details) throw(); ~BackgroundApp() throw(); protected: virtual void reload(); virtual int init(int argc, char* argv[]); virtual void cleanup(); virtual void finish(); virtual void signal(int sig); }; } // !namespace App } // !namespace P #endif |
From: Christian P. <cp...@us...> - 2005-01-18 17:50:18
|
Update of /cvsroot/pclasses/pclasses2/src/App In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31280/src/App Added Files: BackgroundApp.cpp Log Message: Added BackgroundApp class. --- NEW FILE: BackgroundApp.cpp --- /*************************************************************************** * Copyright (C) 2005 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/BackgroundApp.h" #include <signal.h> #ifndef WIN32 # include <sys/types.h> # include <sys/stat.h> # include <fcntl.h> #endif namespace P { namespace App { BackgroundApp::BackgroundApp(const AppDetails& details) throw() : SimpleApp(details) { } BackgroundApp::~BackgroundApp() throw() { } #ifdef WIN32 bool startService() { HANDLE SC_HANDLE svcmgr = OpenSCManager(0,0,GENERIC_READ); if(svcmgr == NULL) { std::cerr << "ERROR: Could not open the service manager." << std::endl; return false; } SC_HANDLE svc = OpenService(svcmgr, "", SERVICE_ALL_ACCESS); if(svc == NULL) { CloseServiceHandle(svcmgr); std::cerr << "ERROR: Could not open service." << std::endl; return false; } if(!StartService(svc, 0, NULL)) { CloseServiceHandle(svcmgr); CloseServiceHandle(svc); std::cerr << "ERROR: Could not start service." << std::endl; return false; } std::cout << "Service starting ... " << std::flush(); DWORD startTickCount = 0, lastCheckPoint = 0; while(1) { if(!QueryServiceStatusEx(svc, SC_STATUS_PROCESS_INFO, &svcStatus, sizeof(SERVICE_STATUS_PROCESS), 0)) { CloseServiceHandle(svcmgr); CloseServiceHandle(svc); std::cerr << "ERROR: Could not query service state." << std::endl; return false; } if(svcStatus.dwCurrentState != SERVICE_START_PENDING) break; bool serviceOk = false; // update checkpoint values ... if(svcStatus.dwCheckPoint > lastCheckPoint) { startTickCount = GetTickCount(); lastCheckPoint = svcStatus.dwCheckPoint; std::cout << "." << std::flush(); ok = true; } // if checkpoint value did not change, // check if the service has timed out. if(!serviceOk) { // the service seems to hang ... if(GetTickCount() - startTickCount > svcStatus.dwWaitHint) break; } // wait some time ... Thread::sleep(1000); } std::cout << std::endl; switch(svcStatus.dwCurrentState) { case SERVICE_START_PENDING: std::cerr << "ERROR: Service takes longer to start than expected." << std::endl; break; case SERVICE_PAUSED: case SERVICE_PAUSE_PENDING: case SERVICE_CONTINUE_PENDING: case SERVICE_RUNNING: std::cout << "Service successfully started." << std::endl; break; case SERVICE_STOPPED: case SERVICE_STOP_PENDING: std::cerr << "Service is stopped." << std::endl; break; } CloseServiceHandle(svcmgr); CloseServiceHandle(svc); return true; } bool installService() { } DWORD WINAPI serviceCtrlHandler(DWORD control, DWORD eventType, LPVOID eventData, LPVOID context) { } void WINAPI serviceMain(DWORD argc, LPTSTR* argv) { SERVICE_STATUS_HANDLE statusHandle = RegisterServiceCtrlHandlerEx(serviceName, serviceCtrlHandler, 0); } #endif int BackgroundApp::init(int argc, char* argv[]) { int ret = SimpleApp::init(argc, argv); if(ret) return ret; #ifdef SIGHUP ::signal(SIGHUP, SimpleApp::signalHandler); #endif #ifdef WIN32 { // connect to the service controller ... // StartServiceCtrlDispatcher() // otherwise try to start the service ... if(!startService()) { std::cerr << "There was an error starting the service. Is the Service already installed?" << std::endl; std::cerr << "Try executing \"" << argv[0] << " --install-service\" on the command line." << std::endl; return 1; } } #else { // send the process to the background ... pid_t pid; if((pid = fork()) != 0) exit(0); setsid(); // redirect input and output to nirvana ... int nullfd = open("/dev/null", O_RDWR); dup2(nullfd, 0); dup2(nullfd, 1); dup2(nullfd, 2); } #endif return 0; } void BackgroundApp::cleanup() { } void BackgroundApp::finish() { } void BackgroundApp::signal(int sig) { SimpleApp::signal(sig); #ifdef SIGHUP if(sig == SIGHUP) reload(); #endif } void BackgroundApp::reload() { } } // !namespace App } // !namespace P |
From: stephan b. <sg...@us...> - 2005-01-18 17:47:42
|
Update of /cvsroot/pclasses/pclasses2/src/Net In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30932 Modified Files: Makefile.toc Log Message: added missing files Index: Makefile.toc =================================================================== RCS file: /cvsroot/pclasses/pclasses2/src/Net/Makefile.toc,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Makefile.toc 24 Dec 2004 23:06:26 -0000 1.5 +++ Makefile.toc 18 Jan 2005 17:47:30 -0000 1.6 @@ -6,33 +6,32 @@ DIST_FILES += $(HEADERS) INSTALL_PACKAGE_HEADERS += $(HEADERS) -SOURCES = InetAddress.cpp \ +SOURCES = \ + HTTPClient.cpp \ + HTTPHeader.cpp \ + InetAddress.cpp \ InetSocket.cpp \ NetworkAddress.cpp \ + RTSPHeader.cpp \ + RTSPSocket.cpp \ Socket.cpp DIST_FILES += $(SOURCES) -OBJECTS = InetAddress.o \ - InetSocket.o \ - NetworkAddress.o \ - Socket.o +OBJECTS = $(patsubst %.cpp,%.o,$(SOURCES)) CLEAN_FILES += $(OBJECTS) -build_libs = 1 LIBNAME = lib$(LIBPNET_BASENAME) -ifeq (1,$(build_libs)) - STATIC_LIBS = $(LIBNAME) - SHARED_LIBS = $(LIBNAME) - $(LIBNAME)_a_OBJECTS = $(OBJECTS) - $(LIBNAME)_so_OBJECTS = $($(LIBNAME)_a_OBJECTS) - $(LIBNAME)_so_VERSION = $(PACKAGE_VERSION) - # $(LIBNAME)_so_LDADD = - include $(TOC_MAKESDIR)/SHARED_LIBS.make - include $(TOC_MAKESDIR)/STATIC_LIBS.make +STATIC_LIBS = $(LIBNAME) +SHARED_LIBS = $(LIBNAME) +$(LIBNAME)_a_OBJECTS = $(OBJECTS) +$(LIBNAME)_so_OBJECTS = $($(LIBNAME)_a_OBJECTS) +$(LIBNAME)_so_VERSION = $(PACKAGE_VERSION) +# $(LIBNAME)_so_LDADD = +include $(TOC_MAKESDIR)/SHARED_LIBS.make +include $(TOC_MAKESDIR)/STATIC_LIBS.make SHARED_LIBS: STATIC_LIBS -endif all: SHARED_LIBS |
From: Christian P. <cp...@us...> - 2005-01-17 23:15:57
|
Update of /cvsroot/pclasses/pclasses2/include/pclasses In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7304 Removed Files: config.h.in Log Message: File does not belong into cvs. --- config.h.in DELETED --- |
From: Christian P. <cp...@us...> - 2005-01-17 22:51:32
|
Update of /cvsroot/pclasses/pclasses2/src/System In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1865/src/System Modified Files: Makefile.am Log Message: Added build export macros. Index: Makefile.am =================================================================== RCS file: /cvsroot/pclasses/pclasses2/src/System/Makefile.am,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- Makefile.am 16 Jan 2005 01:59:18 -0000 1.8 +++ Makefile.am 17 Jan 2005 22:50:39 -0000 1.9 @@ -69,6 +69,8 @@ Time_Sources = SystemClock.win32.cpp endif +#EventLoop_Sources = EventLoop.select.cpp + EXTRA_DIST = CriticalSection.generic.cpp CriticalSection.win32.cpp \ Mutex.solaris.cpp Mutex.posix.cpp Mutex.win32.cpp SharedMemory.sysv.cpp \ SharedMemory.posix.cpp SharedMemory.win32.cpp @@ -78,11 +80,14 @@ lib_LTLIBRARIES = libpclasses_system.la +CPPFLAGS = -DPSYSTEM_BUILD + libpclasses_system_la_SOURCES = timeout.cpp SystemError.cpp \ CriticalSection.cpp Mutex.cpp $(Thread_Sources) \ $(Semaphore_Sources) $(SharedMem_Sources) $(SharedLib_Sources) \ SharedLib.common.cpp FileInfo.common.cpp ProcessIO.cpp Process.common.cpp \ - $(IO_Sources) $(Time_Sources) PathFinder.cpp + $(IO_Sources) $(Time_Sources) PathFinder.cpp +# EventLoop.common.cpp $(EventLoop_Sources) libpclasses_system_la_LDFLAGS = -no-undefined |
From: Christian P. <cp...@us...> - 2005-01-17 22:51:32
|
Update of /cvsroot/pclasses/pclasses2/src/XML In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1865/src/XML Modified Files: Makefile.am Log Message: Added build export macros. Index: Makefile.am =================================================================== RCS file: /cvsroot/pclasses/pclasses2/src/XML/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Makefile.am 15 Jan 2005 23:14:56 -0000 1.3 +++ Makefile.am 17 Jan 2005 22:50:41 -0000 1.4 @@ -3,6 +3,8 @@ lib_LTLIBRARIES = libpclasses_xml.la +CPPFLAGS = -DPXML_BUILD + libpclasses_xml_la_SOURCES = XMLParseError.cpp XMLPushParser.expat.cpp # Christian: please commit this file and re-add to Makefile.am: |
From: Christian P. <cp...@us...> - 2005-01-17 22:51:31
|
Update of /cvsroot/pclasses/pclasses2/src/Unicode In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1865/src/Unicode Modified Files: Makefile.am Log Message: Added build export macros. Index: Makefile.am =================================================================== RCS file: /cvsroot/pclasses/pclasses2/src/Unicode/Makefile.am,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Makefile.am 16 Jan 2005 01:45:56 -0000 1.6 +++ Makefile.am 17 Jan 2005 22:50:41 -0000 1.7 @@ -15,6 +15,9 @@ METASOURCES = AUTO lib_LTLIBRARIES = libpclasses_unicode.la + +CPPFLAGS = -DPUNICODE_BUILD + libpclasses_unicode_la_SOURCES = unicodedata.cpp uctype.cpp ustring.cpp Char.cpp String.cpp TextStream.cpp libpclasses_unicode_la_LDFLAGS = -no-undefined |
From: Christian P. <cp...@us...> - 2005-01-17 22:51:30
|
Update of /cvsroot/pclasses/pclasses2/src/Util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1865/src/Util Modified Files: Makefile.am Log Message: Added build export macros. Index: Makefile.am =================================================================== RCS file: /cvsroot/pclasses/pclasses2/src/Util/Makefile.am,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Makefile.am 11 Jan 2005 14:55:50 -0000 1.6 +++ Makefile.am 17 Jan 2005 22:50:41 -0000 1.7 @@ -1,6 +1,9 @@ INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include $(all_includes) METASOURCES = AUTO lib_LTLIBRARIES = libpclasses_util.la + +CPPFLAGS = -DPUTIL_BUILD + libpclasses_util_la_SOURCES = ManagedThread.cpp Prefs.cpp \ SimplePropertyStore.cpp \ StringTool.cpp \ |
From: Christian P. <cp...@us...> - 2005-01-17 22:51:29
|
Update of /cvsroot/pclasses/pclasses2/src/Net In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1865/src/Net Modified Files: Makefile.am Log Message: Added build export macros. Index: Makefile.am =================================================================== RCS file: /cvsroot/pclasses/pclasses2/src/Net/Makefile.am,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Makefile.am 14 Jan 2005 15:00:19 -0000 1.5 +++ Makefile.am 17 Jan 2005 22:50:36 -0000 1.6 @@ -3,6 +3,8 @@ lib_LTLIBRARIES = libpclasses_net.la +CPPFLAGS = -DPNET_BUILD + libpclasses_net_la_LIBADD = $(top_builddir)/src/libpclasses.la \ $(top_builddir)/src/Unicode/libpclasses_unicode.la \ $(top_builddir)/src/IO/libpclasses_io.la \ |
From: Christian P. <cp...@us...> - 2005-01-17 22:51:17
|
Update of /cvsroot/pclasses/pclasses2/src/IO In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1865/src/IO Modified Files: Makefile.am Log Message: Added build export macros. Index: Makefile.am =================================================================== RCS file: /cvsroot/pclasses/pclasses2/src/IO/Makefile.am,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- Makefile.am 11 Jan 2005 14:55:49 -0000 1.8 +++ Makefile.am 17 Jan 2005 22:50:34 -0000 1.9 @@ -2,6 +2,8 @@ METASOURCES = AUTO lib_LTLIBRARIES = libpclasses_io.la +CPPFLAGS = -DPIO_BUILD + libpclasses_io_la_SOURCES = IOError.cpp IODevice.cpp IOStream.cpp \ IOFilter.cpp URL.cpp ZLib.cpp ZLibIOFilter.cpp BZip2.cpp BZip2IOFilter.cpp \ StringDevice.cpp |
From: Christian P. <cp...@us...> - 2005-01-17 22:51:16
|
Update of /cvsroot/pclasses/pclasses2/src/App In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1865/src/App Modified Files: Makefile.am Log Message: Added build export macros. Index: Makefile.am =================================================================== RCS file: /cvsroot/pclasses/pclasses2/src/App/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Makefile.am 15 Jan 2005 23:59:53 -0000 1.3 +++ Makefile.am 17 Jan 2005 22:50:33 -0000 1.4 @@ -2,6 +2,8 @@ METASOURCES = AUTO lib_LTLIBRARIES = libpclasses_app.la +CPPFLAGS = -DPAPP_BUILD + libpclasses_app_la_SOURCES = AppDetails.cpp LogMessage.cpp LogTarget.cpp \ LogChannel.cpp LogManager.cpp SimpleApp.cpp |
From: Christian P. <cp...@us...> - 2005-01-17 22:51:14
|
Update of /cvsroot/pclasses/pclasses2/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1865/src Modified Files: Makefile.am Log Message: Added build export macros. Index: Makefile.am =================================================================== RCS file: /cvsroot/pclasses/pclasses2/src/Makefile.am,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Makefile.am 11 Jan 2005 14:53:47 -0000 1.5 +++ Makefile.am 17 Jan 2005 22:50:23 -0000 1.6 @@ -5,6 +5,8 @@ lib_LTLIBRARIES = libpclasses.la +CPPFLAGS = -DPCORE_BUILD + libpclasses_la_LDFLAGS = -no-undefined libpclasses_la_SOURCES = Alloc.cpp Exception.cpp AtomicInt.gcc-x86.cpp \ |
From: Christian P. <cp...@us...> - 2005-01-17 22:49:30
|
Update of /cvsroot/pclasses/pclasses2/include/pclasses/XML In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1789/include/pclasses/XML Modified Files: XMLParseError.h XMLPushParser.h Log Message: Added export macros. Index: XMLParseError.h =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/XML/XMLParseError.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- XMLParseError.h 14 Jan 2005 14:48:55 -0000 1.2 +++ XMLParseError.h 17 Jan 2005 22:49:15 -0000 1.3 @@ -21,6 +21,7 @@ #ifndef P_XML_XMLParseError #define P_XML_XMLParseError +#include <pclasses/Export.h> #include <pclasses/Exception.h> #include <string> @@ -29,7 +30,7 @@ namespace XML { //! XML parse error -class XMLParseError: public RuntimeError { +class PXML_EXPORT XMLParseError: public RuntimeError { public: XMLParseError(int err, const std::string& text, const char* what, const SourceInfo& si); Index: XMLPushParser.h =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/XML/XMLPushParser.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- XMLPushParser.h 11 Jan 2005 14:47:47 -0000 1.1 +++ XMLPushParser.h 17 Jan 2005 22:49:15 -0000 1.2 @@ -21,9 +21,10 @@ #ifndef P_XML_XMLPushParser_h #define P_XML_XMLPushParser_h -#include <pclasses/XML/XMLParseError.h> +#include <pclasses/Export.h> #include <pclasses/NonCopyable.h> #include <pclasses/Signal.h> +#include <pclasses/XML/XMLParseError.h> #include <string> #include <map> @@ -32,7 +33,7 @@ namespace XML { //! XML push parser -class XMLPushParser: public NonCopyable { +class PXML_EXPORT XMLPushParser: public NonCopyable { public: typedef std::map<std::string,std::string> AttributeMap; |
From: Christian P. <cp...@us...> - 2005-01-17 22:48:45
|
Update of /cvsroot/pclasses/pclasses2/src/Unicode In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1601/src/Unicode Modified Files: unicodedata.awk Log Message: Don't append to existing db file. Index: unicodedata.awk =================================================================== RCS file: /cvsroot/pclasses/pclasses2/src/Unicode/unicodedata.awk,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- unicodedata.awk 14 Jan 2005 14:46:02 -0000 1.3 +++ unicodedata.awk 17 Jan 2005 22:48:34 -0000 1.4 @@ -1,5 +1,6 @@ BEGIN { FS=";" + print "" > "unicodedata_extra_db.h" print "codePointData codePoints[] = {" extranum = 0; } |
From: Christian P. <cp...@us...> - 2005-01-17 22:48:01
|
Update of /cvsroot/pclasses/pclasses2/include/pclasses In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1385/include/pclasses Modified Files: Export.h Log Message: Added macros for Util and Unicode module. Index: Export.h =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/Export.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Export.h 17 Jan 2005 22:38:57 -0000 1.2 +++ Export.h 17 Jan 2005 22:47:42 -0000 1.3 @@ -77,6 +77,20 @@ # define PXML_EXPORT P_CXX_CLASS_IMPORT #endif +/* Util module */ +#ifdef PUTIL_BUILD +# define PUTIL_EXPORT P_CXX_CLASS_EXPORT +#else +# define PUTIL_EXPORT P_CXX_CLASS_IMPORT +#endif + +/* Unicode module */ +#ifdef PUNICODE_BUILD +# define PUNICODE_EXPORT P_CXX_CLASS_EXPORT +#else +# define PUNICODE_EXPORT P_CXX_CLASS_IMPORT +#endif + /* add more export macros for each module ... */ #endif |
From: Christian P. <cp...@us...> - 2005-01-17 22:39:14
|
Update of /cvsroot/pclasses/pclasses2/include/pclasses In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32184/include/pclasses Modified Files: Export.h Log Message: Added gcc visibility patch support. Index: Export.h =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/Export.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Export.h 17 Jan 2005 21:55:20 -0000 1.1 +++ Export.h 17 Jan 2005 22:38:57 -0000 1.2 @@ -21,44 +21,62 @@ #ifndef P_Export_h #define P_Export_h +#include <pclasses/pclasses-config.h> + #ifdef WIN32 -# ifdef PCORE_BUILD -# define PCORE_EXPORT __declspec(dllexport) +# define P_CXX_CLASS_EXPORT __declspec(dllexport) +# define P_CXX_CLASS_IMPORT __declspec(dllimport) +#else +# ifdef PCLASSES_GCC_VISIBILITY +# define P_CXX_CLASS_EXPORT __attribute__((visibility("default"))) # else -# define PCORE_EXPORT __declspec(dllimport) +# define P_CXX_CLASS_EXPORT # endif +# define P_CXX_CLASS_IMPORT +#endif + +/* core */ +#ifdef PCORE_BUILD +# define PCORE_EXPORT P_CXX_CLASS_EXPORT #else -# define PCORE_EXPORT +# define PCORE_EXPORT P_CXX_CLASS_IMPORT #endif -#ifdef WIN32 -# ifdef PIO_BUILD -# define PIO_EXPORT __declspec(dllexport) -# else -# define PIO_EXPORT __declspec(dllimport) -# endif +/* I/O module */ +#ifdef PIO_BUILD +# define PIO_EXPORT P_CXX_CLASS_EXPORT #else -# define PIO_EXPORT +# define PIO_EXPORT P_CXX_CLASS_IMPORT #endif -#ifdef WIN32 -# ifdef PSYSTEM_BUILD -# define PSYSTEM_EXPORT __declspec(dllexport) -# else -# define PSYSTEM_EXPORT __declspec(dllimport) -# endif +/* System abstraction module */ +#ifdef PSYSTEM_BUILD +# define PSYSTEM_EXPORT P_CXX_CLASS_EXPORT #else -# define PSYSTEM_EXPORT +# define PSYSTEM_EXPORT P_CXX_CLASS_IMPORT #endif -#ifdef WIN32 -# ifdef PNET_BUILD -# define PNET_EXPORT __declspec(dllexport) -# else -# define PNET_EXPORT __declspec(dllimport) -# endif +/* Network module */ +#ifdef PNET_BUILD +# define PNET_EXPORT P_CXX_CLASS_EXPORT #else -# define PNET_EXPORT +# define PNET_EXPORT P_CXX_CLASS_IMPORT #endif +/* App module */ +#ifdef PAPP_BUILD +# define PAPP_EXPORT P_CXX_CLASS_EXPORT +#else +# define PAPP_EXPORT P_CXX_CLASS_IMPORT +#endif + +/* XML module */ +#ifdef PXML_BUILD +# define PXML_EXPORT P_CXX_CLASS_EXPORT +#else +# define PXML_EXPORT P_CXX_CLASS_IMPORT +#endif + +/* add more export macros for each module ... */ + #endif |