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

diameter_eap_client_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_client_session.hxx,v 1.6 2004/06/17 19:10:42 yohba Exp $ */
00035 /* 
00036    diameter_eap_client_session.hxx
00037    Client Session definition for Diameter EAP Application 
00038    Written by Yoshihiro Ohba
00039    Created December 4, 2003.
00040 */
00041 
00042 #ifndef __EAP_CLIENT_SESSION_H__
00043 #define __EAP_CLIENT_SESSION_H__
00044 
00045 #include <string>
00046 #include <list>
00047 #include "ace/Synch.h"
00048 #include "diameter_api.h"
00049 #include "diameter_eap_client_fsm.hxx"
00050 #include "diameter_eap_parser.hxx"
00051 
00052 class DiameterEapClientSession;
00053 
00055 class DIAMETER_EAP_CLIENT_EXPORTS DEA_Handler : 
00056     public AAASessionMessageHandler
00057 {
00058  public:
00059   DEA_Handler(AAAApplicationCore &appCore, DiameterEapClientSession &s) 
00060     : AAASessionMessageHandler(appCore, EapCommandCode),
00061       session(s)
00062   {}
00063  private:
00064   AAAReturnCode HandleMessage (AAAMessage &msg);
00065   DiameterEapClientSession &session;
00066 };
00067 
00071 class DIAMETER_EAP_CLIENT_EXPORTS DiameterEapClientSession : 
00072     public AAAClientSession, public DiameterEapClientStateMachine
00073 {
00074  public:
00075 
00077   DiameterEapClientSession(AAAApplicationCore&, DiameterJobHandle &h);
00078 
00080   ~DiameterEapClientSession() {}
00081 
00082   DiameterEapClientSession* Self() { return this; }
00083 
00090   AAAReturnCode HandleMessage(AAAMessage &msg);
00091 
00098   AAAReturnCode HandleDisconnect();
00099 
00101   AAAReturnCode HandleSessionTimeout();
00102                                      
00104   AAAReturnCode HandleAuthLifetimeTimeout();
00105 
00107   AAAReturnCode HandleAuthGracePeriodTimeout();
00108 
00114   AAAReturnCode HandleTimeout();
00115 
00121   AAAReturnCode HandleAbort() { return AAA_ERR_SUCCESS; }
00122 
00123   void Start() throw (AAA_Error)
00124   {
00125     DiameterEapClientStateMachine::Start();
00126     AAAClientSession::Start();
00127   }
00128 
00129  protected:
00130  private:
00131 
00132   DEA_Handler answerHandler;
00133 };
00134 
00135 #endif

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