| AnyConnect Secure Mobility Client 5.1.4.74

- Main Page
- Related Pages
- Classes
- Files

- File List
- File Members

# examples/GUI/GUIClientImpl.h

    00001 /******************************************************************************\
    00002  *  This sample is supplied as is with no implied warranty.
    00003  *  It is designed to assist you in using the Cisco AnyConnect VPN API.
    00004  *  It is assumed that you will build a production application and
    00005  *  refer to this sample as a reference only.
    00006  \*****************************************************************************/
    00007
    00008 #ifndef _GUICLIENTIMPL_
    00009 #define _GUICLIENTIMPL_
    00010
    00011 #include "ClientIfc.h"
    00012
    00013 enum RequestType { REQ_CONNECT, REQ_GROUPLIST, REQ_END };
    00014
    00015 class MainDialog;
    00016
    00017 /**
    00018  * This is an example application demonstrating the implementation of the
    00019  * AnyConnect API
    00020  */
    00021
    00022 class GUIClientImpl : public ClientIfc
    00023 {
    00024     public:
    00025
    00026         GUIClientImpl( MainDialog *parent );
    00027         virtual ~GUIClientImpl();
    00028
    00029         bool connect(tstring host);
    00030
    00031         tstring ms_user,
    00032                 ms_pswd,
    00033                 ms_group;
    00034
    00035         void setUserData(ConnectPromptInfo &ConnectPrompt);
    00036
    00037     protected:
    00038
    00039         ConnectPromptInfo *m_pConnectPrompt;
    00040         MainDialog *parentWindow;
    00041
    00042         void StatsCB(IN VPNStats &stats);
    00043
    00044         void StateCB(IN const VPNState state,
    00045                      IN const VPNSubState subState,
    00046                      IN const tstring stateString);
    00047
    00048         void BannerCB(IN const tstring &banner);
    00049
    00050         void PreConnectReminderCB(const tstring &rtstrPreConnectReminder);
    00051
    00052         void NoticeCB(IN const tstring &notice,
    00053                       IN const MessageType type,
    00054                       IN const bool bSensitive = false);
    00055
    00056         void ExitNoticeCB(IN const tstring &notice, const int returnCode);
    00057
    00058         void ServiceReadyCB();
    00059
    00060         void UserPromptCB(IN ConnectPromptInfo &ConnectPrompt);
    00061
    00062         void CertBlockedCB(IN const tstring &rtstrUntrustedServer);
    00063         void CertWarningCB(IN const tstring &rtstrUntrustedServer,
    00064                            IN const std::list<tstring> &rltstrCertErrors,
    00065                            IN bool bAllowImport);
    00066
    00067         /**
    00068          * The implementation of this method and subsequent call on
    00069          * MainDialog::HandleEventAvailable demonstrates the posting of
    00070          * an event.
    00071          */
    00072         void EventAvailable();
    00073
    00074
    00075      private:
    00076
    00077         RequestType me_RequestType;
    00078
    00079 };
    00080
    00081
    00082 #endif // _GUICLIENTIMPL_