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

diameter_nasreq_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_nasreq_client_session.hxx,v 1.3 2004/06/17 21:13:34 yohba Exp $ */
00035 /* 
00036    diameter_nasreq_client_session.hxx
00037    Client Session definition for Diameter NASREQ Application 
00038    Written by Yoshihiro Ohba
00039    Created May 1, 2004.
00040 */
00041 
00042 #ifndef __NASREQ_CLIENT_SESSION_H__
00043 #define __NASREQ_CLIENT_SESSION_H__
00044 
00045 #include <string>
00046 #include <list>
00047 #include "ace/Synch.h"
00048 #include "diameter_api.h"
00049 #include "diameter_nasreq_client_fsm.hxx"
00050 #include "diameter_nasreq_parser.hxx"
00051 
00052 class DiameterNasreqClientSession;
00053 
00055 class DIAMETER_NASREQ_CLIENT_EXPORTS AA_AnswerHandler : 
00056     public AAASessionMessageHandler
00057 {
00058  public:
00059   AA_AnswerHandler
00060   (AAAApplicationCore &appCore, DiameterNasreqClientSession &s) 
00061     : AAASessionMessageHandler(appCore, AA_CommandCode),
00062       session(s)
00063   {}
00064  private:
00065   AAAReturnCode HandleMessage (AAAMessage &msg);
00066   DiameterNasreqClientSession &session;
00067 };
00068 
00072 class DIAMETER_NASREQ_CLIENT_EXPORTS DiameterNasreqClientSession : 
00073     public AAAClientSession, public DiameterNasreqClientStateMachine
00074 {
00075  public:
00076 
00078   DiameterNasreqClientSession(AAAApplicationCore&, DiameterJobHandle &h);
00079 
00081   ~DiameterNasreqClientSession() {}
00082 
00083   DiameterNasreqClientSession* Self() { return this; }
00084 
00091   AAAReturnCode HandleMessage(AAAMessage &msg);
00092 
00099   AAAReturnCode HandleDisconnect();
00100 
00102   AAAReturnCode HandleSessionTimeout();
00103                                      
00105   AAAReturnCode HandleAuthLifetimeTimeout();
00106 
00108   AAAReturnCode HandleAuthGracePeriodTimeout();
00109 
00115   AAAReturnCode HandleTimeout();
00116 
00122   AAAReturnCode HandleAbort() { return AAA_ERR_SUCCESS; }
00123 
00124   void Start() throw (AAA_Error)
00125   {
00126     DiameterNasreqClientStateMachine::Start();
00127     AAAClientSession::Start();
00128   }
00129 
00130  protected:
00131  private:
00132 
00133   AA_AnswerHandler answerHandler;
00134 };
00135 
00136 #endif

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