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

diameter_eap_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_eap_server_session.hxx,v 1.5 2004/06/17 19:10:42 yohba Exp $ */
00035 /* 
00036    diameter_eap_server_session.hxx
00037    Server Session definition for Diameter EAP Application 
00038    Written by Yoshihiro Ohba
00039    Created December 16, 2003.
00040 */
00041 
00042 #ifndef __EAP_SERVER_SESSION_H__
00043 #define __EAP_SERVER_SESSION_H__
00044 
00045 #include <string>
00046 #include <list>
00047 #include "ace/Synch.h"
00048 #include "diameter_api.h"
00049 #include "diameter_eap_server_fsm.hxx"
00050 #include "diameter_eap_parser.hxx"
00051 
00052 class DiameterEapClientSession;
00053 
00055 class DIAMETER_EAP_SERVER_EXPORTS DER_Handler : public AAASessionMessageHandler
00056 {
00057  public:
00058   DER_Handler(AAAApplicationCore &appCore, DiameterEapServerSession &s) 
00059     : AAASessionMessageHandler(appCore, EapCommandCode),
00060       session(s)
00061   {}
00062  private:
00063   AAAReturnCode HandleMessage (AAAMessage &msg);
00064   DiameterEapServerSession &session;
00065 };
00066 
00070 class DIAMETER_EAP_SERVER_EXPORTS DiameterEapServerSession : 
00071     public AAAServerSession, public DiameterEapServerStateMachine
00072 {
00073  public:
00074 
00076   DiameterEapServerSession
00077   (AAAApplicationCore &appCore, 
00078    diameter_unsigned32_t appId=EapApplicationId);
00079 
00081   ~DiameterEapServerSession() {}
00082 
00084 
00085   DiameterEapServerSession* Self() { return this; }
00086 
00088   AAAReturnCode HandleMessage(AAAMessage &msg);
00089 
00091   AAAReturnCode HandleDisconnect();
00092 
00094   AAAReturnCode HandleSessionTimeout();
00095                                      
00097   AAAReturnCode HandleAuthLifetimeTimeout();
00098                                                                                 
00100   AAAReturnCode HandleAuthGracePeriodTimeout();
00101 
00103   AAAReturnCode HandleAbort() { return AAA_ERR_SUCCESS; }
00104 
00107   AAAReturnCode HandleTimeout();
00108 
00109   void Start() throw (AAA_Error)
00110   {
00111     DiameterEapServerStateMachine::Start();
00112   }
00113 
00114  protected:
00115  private:
00116 
00117   DER_Handler requestHandler;
00118 };
00119 
00120 typedef DIAMETER_EAP_SERVER_EXPORTS 
00121 AAAServerSessionClassFactory<DiameterEapServerSession>
00122 DiameterEapServerFactory;
00123 
00124 #endif

Generated on Fri Jun 25 19:14:22 2004 for Diameter EAP Application by doxygen 1.3.5