XmlRpcDaemonShutdownSignalHandler.h

Go to the documentation of this file.
00001 /*------------------------------------------------------------------------------
00002  
00003     Copyright (c) 2004 Media Development Loan Fund
00004   
00005     This file is part of the Campcaster project.
00006     https://www.campware.org/
00007     To report bugs, send an e-mail to [email protected]
00008   
00009     Campcaster is free software; you can redistribute it and/or modify
00010     it under the terms of the GNU General Public License as published by
00011     the Free Software Foundation; either version 2 of the License, or
00012     (at your option) any later version.
00013    
00014     Campcaster is distributed in the hope that it will be useful,
00015     but WITHOUT ANY WARRANTY; without even the implied warranty of
00016     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017     GNU General Public License for more details.
00018   
00019     You should have received a copy of the GNU General Public License
00020     along with Campcaster; if not, write to the Free Software
00021     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00022   
00023   
00024     Author   : $Author: fgerlits $
00025     Version  : $Revision: 2329 $
00026     Location : $URL: svn://code.campware.org/campcaster/trunk/campcaster/src/products/scheduler/src/XmlRpcDaemonShutdownSignalHandler.h $
00027  
00028 ------------------------------------------------------------------------------*/
00029 #ifndef XmlRpcDaemonShutdownSignalHandler_h
00030  #define XmlRpcDaemonShutdownSignalHandler_h
00031  
00032 #ifndef __cplusplus
00033  #error This is a C++ include file
00034  #endif
00035  
00036 
00037 /* ============================================================ include files */
00038 
00039 #ifdef HAVE_CONFIG_H
00040  #include "configure.h"
00041 #endif
00042  
00043 #include "SignalHandler.h"
00044 #include "XmlRpcDaemon.h"
00045 
00046 
00047 namespace LiveSupport {
00048 namespace Scheduler {
00049 
00050 /* ================================================================ constants */
00051 
00052 
00053 /* =================================================================== macros */
00054 
00055 
00056 /* =============================================================== data types */
00057 
00065 class XmlRpcDaemonShutdownSignalHandler : public SignalHandler
00066 {
00067     private:
00071         XmlRpcDaemon      * xmlRpcDaemon;
00072 
00073     public:
00080         XmlRpcDaemonShutdownSignalHandler(
00081                             XmlRpcDaemon  * xmlRpcDaemon)
00082                                                         throw ()
00083         {
00084             this->xmlRpcDaemon = xmlRpcDaemon;
00085         }
00086 
00093         virtual void
00094         handleSignal(int signal)                        throw ()
00095         {
00096             xmlRpcDaemon->shutdown();
00097         }
00098 
00102         virtual
00103         ~XmlRpcDaemonShutdownSignalHandler(void)        throw ()
00104         {
00105         }
00106 };
00107 
00108 
00109 /* ================================================= external data structures */
00110 
00111 
00112 /* ====================================================== function prototypes */
00113 
00114 
00115 } // namespace Scheduler
00116 } // namespace LiveSupport
00117 
00118 #endif // XmlRpcDaemonShutdownSignalHandler_h
00119  

Generated on Sat Sep 22 02:00:30 2007 for Campcaster by  1.4.7