AmEvent.h

Go to the documentation of this file.
00001 /*
00002  * $Id: AmEvent.h 711 2008-02-10 18:52:44Z sayer $
00003  *
00004  * Copyright (C) 2002-2003 Fhg Fokus
00005  *
00006  * This file is part of sems, a free SIP media server.
00007  *
00008  * sems is free software; you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation; either version 2 of the License, or
00011  * (at your option) any later version
00012  *
00013  * For a license to use the ser software under conditions
00014  * other than those described here, or to purchase support for this
00015  * software, please contact iptel.org by e-mail at the following addresses:
00016  *    info@iptel.org
00017  *
00018  * sems is distributed in the hope that it will be useful,
00019  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00020  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00021  * GNU General Public License for more details.
00022  *
00023  * You should have received a copy of the GNU General Public License 
00024  * along with this program; if not, write to the Free Software 
00025  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00026  */
00028 #ifndef AmEvent_h
00029 #define AmEvent_h
00030 
00031 #include "AmArg.h"
00032 
00033 #include <string>
00034 using std::string;
00035 
00036 #define E_PLUGIN 100
00037 
00039 struct AmEvent
00040 {
00041   int event_id;
00042   bool processed;
00043 
00044   AmEvent(int event_id);
00045   virtual ~AmEvent();
00046 };
00047 
00053 struct AmPluginEvent: public AmEvent
00054 {
00055   string      name;
00056   AmArg       data;
00057 
00058   AmPluginEvent(const string& n)
00059     : AmEvent(E_PLUGIN), name(n), data() {}
00060 
00061   AmPluginEvent(const string& n, const AmArg& d)
00062     : AmEvent(E_PLUGIN), name(n), data(d) {}
00063 };
00064 
00065 
00067 class AmEventHandler
00068 {
00069  public:
00070   virtual void process(AmEvent*)=0;
00071   virtual ~AmEventHandler() { };
00072 };
00073 
00074 #endif

Generated on Fri May 16 12:02:05 2008 for SEMS by  doxygen 1.5.1
Home |  Recent changes |  Search |  Glossary |  Sitemap |  Login