Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

pana_egress.h

00001 /* BEGIN_COPYRIGHT                                                        */
00002 /*                                                                        */
00003 /* Open Diameter: Open-source software for the Diameter and               */
00004 /*                Diameter related protocols                              */
00005 /*                                                                        */
00006 /* Copyright (C) 2002-2004 Open Diameter Project                          */
00007 /*                                                                        */
00008 /* This library is free software; you can redistribute it and/or modify   */
00009 /* it under the terms of the GNU Lesser General Public License as         */
00010 /* published by the Free Software Foundation; either version 2.1 of the   */
00011 /* License, or (at your option) any later version.                        */
00012 /*                                                                        */
00013 /* This library is distributed in the hope that it will be useful,        */
00014 /* but WITHOUT ANY WARRANTY; without even the implied warranty of         */
00015 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU      */
00016 /* Lesser General Public License for more details.                        */
00017 /*                                                                        */
00018 /* You should have received a copy of the GNU Lesser General Public       */
00019 /* License along with this library; if not, write to the Free Software    */
00020 /* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307    */
00021 /* USA.                                                                   */
00022 /*                                                                        */
00023 /* In addition, when you copy and redistribute some or the entire part of */
00024 /* the source code of this software with or without modification, you     */
00025 /* MUST include this copyright notice in each copy.                       */
00026 /*                                                                        */
00027 /* If you make any changes that are appeared to be useful, please send    */
00028 /* sources that include the changed part to                               */
00029 /* diameter-developers@lists.sourceforge.net so that we can reflect your  */
00030 /* changes to one unified version of this software.                       */
00031 /*                                                                        */
00032 /* END_COPYRIGHT                                                          */
00033 
00034 #ifndef __PANA_EGRESS_H__
00035 #define __PANA_EGRESS_H__
00036 
00037 #include "pana_session.h"
00038 #include "pana_io.h"
00039 #include "framework.h"
00040 
00041 class PANA_EXPORT PANA_EgressJob : public AAA_Job
00042 {
00043     public:
00044         PANA_EgressJob(AAA_GroupedJob &g,
00045                        PANA_IO &t,
00046                        PANA_Message &m,
00047                        PANA_Session *s,
00048                        const char *name = "") :
00049           m_Group(g),
00050           m_IO(t),
00051           m_Msg(m),
00052           m_Session(s),
00053           m_Name(name) { 
00054         }
00055         virtual bool ExistBacklog() { 
00056           return (false); 
00057         }
00058         virtual int Schedule(AAA_Job*job, size_t backlogSize=1) { 
00059           return m_Group.Schedule(job);
00060         }
00061     
00062     protected:
00063         AAA_GroupedJob &m_Group;
00064         PANA_IO &m_IO;
00065         PANA_Message &m_Msg;
00066         PANA_Session *m_Session;
00067         std::string m_Name;
00068 };
00069 
00070 class PANA_EXPORT PANA_EgressDeliveryJob : public PANA_EgressJob
00071 {
00072     public:
00073         PANA_EgressDeliveryJob(const PANA_EgressJob &copy) :
00074           PANA_EgressDeliveryJob::PANA_EgressJob(copy) { }
00075         virtual int Serve();
00076 };
00077 
00078 class PANA_EXPORT PANA_EgressMacGenerationJob : public PANA_EgressDeliveryJob
00079 {
00080     public:
00081         PANA_EgressMacGenerationJob(const PANA_EgressJob &copy) :
00082           PANA_EgressDeliveryJob(copy) { }
00083         virtual int Serve();
00084 };
00085 
00086 class PANA_EXPORT PANA_EgressSender : public PANA_EgressJob
00087 {
00088     public:
00089         PANA_EgressSender(AAA_GroupedJob &g,
00090                           PANA_IO &t,
00091                           PANA_Message &m,
00092                           PANA_Session *s = NULL,
00093                           const char *name = "") : 
00094           PANA_EgressJob(g, t, m, s, name) { }
00095         virtual int Serve() { return (0); };
00096         virtual void Schedule();
00097     protected:
00098         static int m_MacGenExclusionTable[2];
00099 };
00100 
00101 #endif // __PANA_EGRESS_H__

Generated on Fri Jun 25 19:18:29 2004 for PANA by doxygen 1.3.5