Update of /cvsroot/pclasses/pclasses2/include/pclasses/App
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5601/include/pclasses/App
Modified Files:
SimpleApp.h BackgroundApp.h
Log Message:
- Use new signal handling code
Index: BackgroundApp.h
===================================================================
RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/App/BackgroundApp.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- BackgroundApp.h 24 Jan 2005 22:58:38 -0000 1.2
+++ BackgroundApp.h 23 Apr 2005 17:50:53 -0000 1.3
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2005 by Christian Prochnow *
+ * Copyright (C) 2005 by Christian Prochnow, SecuLogiX GmbH *
* cp...@se... *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -36,17 +36,19 @@
BackgroundApp(const AppDetails& details) throw();
~BackgroundApp() throw();
+ //! Reload config & logfiles
+ virtual void reload();
+
protected:
void setCommandLineOpts(CmdLineOption* opts[]);
void showCommandLineHelp();
+ //! Send application to the background
void daemonize();
- virtual void reload();
virtual int init(int argc, char* argv[]);
virtual void cleanup();
virtual void finish();
- virtual void signal(int sig);
private:
CmdLineParser _cmdLineParser;
Index: SimpleApp.h
===================================================================
RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/App/SimpleApp.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- SimpleApp.h 18 Jan 2005 17:52:24 -0000 1.2
+++ SimpleApp.h 23 Apr 2005 17:50:53 -0000 1.3
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2004 by Christian Prochnow *
+ * Copyright (C) 2004,2005 by Christian Prochnow, SecuLogiX GmbH *
* cp...@se... *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -21,7 +21,6 @@
#ifndef P_App_SimpleApp_h
#define P_App_SimpleApp_h
-#include <pclasses/pclasses-config.h> // reqd for PCLASSES_RETSIGTYPE
#include <pclasses/Export.h>
#include <pclasses/NonCopyable.h>
#include <pclasses/System/Semaphore.h>
@@ -64,7 +63,7 @@
const AppDetails& details() const throw();
//! Returns a pointer to the application object
- friend SimpleApp* theApp() throw();
+ friend SimpleApp& theApp() throw();
protected:
//! Application init
@@ -97,17 +96,12 @@
//! 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;
|