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

diameter_nasreq_server_session.hxx

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 /* $Id: diameter_nasreq_server_session.hxx,v 1.3 2004/06/17 21:13:34 yohba Exp $ */
00035 /* 
00036    diameter_nasreq_server_session.hxx
00037    Server Session definition for Diameter EAP Application 
00038    Written by Yoshihiro Ohba
00039    Created April 26, 2004.
00040 */
00041 
00042 #ifndef __NASREQ_SERVER_SESSION_H__
00043 #define __NASREQ_SERVER_SESSION_H__
00044 
00045 #include <string>
00046 #include <list>
00047 #include "ace/Synch.h"
00048 #include "diameter_api.h"
00049 #include "diameter_nasreq_server_fsm.hxx"
00050 #include "diameter_nasreq_parser.hxx"
00051 
00052 class DiameterNasreqClientSession;
00053 
00055 class DIAMETER_NASREQ_SERVER_EXPORTS AA_RequestHandler 
00056   : public AAASessionMessageHandler
00057 {
00058  public:
00059   AA_RequestHandler(AAAApplicationCore &appCore, 
00060                     DiameterNasreqServerSession &s) 
00061     : AAASessionMessageHandler(appCore, AA_CommandCode),
00062       session(s)
00063   {}
00064  private:
00065   AAAReturnCode HandleMessage (AAAMessage &msg);
00066   DiameterNasreqServerSession &session;
00067 };
00068 
00072 class DIAMETER_NASREQ_SERVER_EXPORTS DiameterNasreqServerSession : 
00073     public AAAServerSession, public DiameterNasreqServerStateMachine
00074 {
00075  public:
00076 
00078   DiameterNasreqServerSession
00079   (AAAApplicationCore &appCore, 
00080    diameter_unsigned32_t appId=NasreqApplicationId);
00081 
00083   ~DiameterNasreqServerSession() {}
00084 
00086 
00087   DiameterNasreqServerSession* Self() { return this; }
00088 
00090   AAAReturnCode HandleMessage(AAAMessage &msg);
00091 
00093   AAAReturnCode HandleDisconnect();
00094 
00096   AAAReturnCode HandleSessionTimeout();
00097                                      
00099   AAAReturnCode HandleAuthLifetimeTimeout();
00100                                                                                 
00102   AAAReturnCode HandleAuthGracePeriodTimeout();
00103 
00105   AAAReturnCode HandleAbort() { return AAA_ERR_SUCCESS; }
00106 
00109   AAAReturnCode HandleTimeout();
00110 
00111   void Start() throw (AAA_Error)
00112   {
00113     DiameterNasreqServerStateMachine::Start();
00114   }
00115 
00116  protected:
00117  private:
00118 
00119   AA_RequestHandler requestHandler;
00120 };
00121 
00122 typedef DIAMETER_NASREQ_SERVER_EXPORTS 
00123 AAAServerSessionClassFactory<DiameterNasreqServerSession>
00124 DiameterNasreqServerFactory;
00125 
00126 #endif

Generated on Fri Jun 25 19:15:15 2004 for Diameter NASREQ Application by doxygen 1.3.5