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

eap_identity.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 // $Id: eap_identity.hxx,v 1.15 2004/06/17 21:13:36 yohba Exp $
00034 
00035 // eap_identity.hxx:  Identity method state machine
00036 // Written by Yoshihiro Ohba
00037 
00038 #ifndef __EAP_IDENITTY_HXX__
00039 #define __EAP_IDENTITY_HXX__
00040 
00041 #include <ace/Basic_Types.h>
00042 #include "eap.hxx"
00043 #include "eap_fsm.hxx"
00044 #include "eap_authfsm.hxx"
00045 #include "eap_peerfsm.hxx"
00046 
00048 class EAP_EXPORTS EapAuthIdentityStateMachine : 
00049   public EapMethodStateMachine,
00050   public EapStateMachine<EapAuthIdentityStateMachine>
00051 {
00052   friend class EapMethodStateMachineCreator<EapAuthIdentityStateMachine>;
00053   friend class EapAuthIdentityStateTable_S;
00054 public:
00055 
00057   void Start() throw(AAA_Error)
00058   {
00059     EapStateMachine<EapAuthIdentityStateMachine>::Start();
00060   }
00061 
00063   inline void Notify(AAA_Event ev)
00064   {
00065     EapStateMachine<EapAuthIdentityStateMachine>::Notify(ev);
00066   }
00067 
00068   void Receive(AAAMessageBlock *b) {}
00070   static const ACE_UINT32 maxTrial;
00071 
00073   ACE_UINT32& NumberOfTrial() { return nTrial; }
00074 
00076   enum ProcessIdentityResult {
00077     Success,
00078     Failure
00079   };
00080 
00083   virtual ProcessIdentityResult ProcessIdentity(std::string& identity)=0;
00084 
00085 protected:
00086   EapAuthIdentityStateMachine(EapSwitchStateMachine &s);
00087   ~EapAuthIdentityStateMachine() {} 
00088 
00089   ACE_UINT32 nTrial;
00090 };
00091 
00092 #endif // __EAP_IDENTITY_HXX__

Generated on Fri Jun 25 19:16:16 2004 for EAP State Machine by doxygen 1.3.5