| AnyConnect Secure Mobility Client 5.1.3.62

- Main Page
- Related Pages
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

# GUIClientImpl Class Reference

`#include <GUIClientImpl.h>`

List of all members.

## Public Member Functions
| GUIClientImpl (MainDialog *parent)
bool | connect (tstring host)
void | setUserData (ConnectPromptInfo &ConnectPrompt)
## Public Attributes
tstring | ms_user
tstring | ms_pswd
tstring | ms_group
## Protected Member Functions
void | StatsCB (IN VPNStats &stats)
void | StateCB (IN const VPNState state, IN const VPNSubState subState, IN const tstring stateString)
void | BannerCB (IN const tstring &banner)
void | PreConnectReminderCB (const tstring &rtstrPreConnectReminder)
void | NoticeCB (IN const tstring &notice, IN const MessageType type, IN const bool bSensitive=false)
void | ExitNoticeCB (IN const tstring &notice, const int returnCode)
void | ServiceReadyCB ()
void | UserPromptCB (IN ConnectPromptInfo &ConnectPrompt)
void | CertBlockedCB (IN const tstring &rtstrUntrustedServer)
void | CertWarningCB (IN const tstring &rtstrUntrustedServer, IN const std::list< tstring > &rltstrCertErrors, IN bool bAllowImport)
void | EventAvailable ()
## Protected Attributes
ConnectPromptInfo * | m_pConnectPrompt
MainDialog * | parentWindow

## Detailed Description

This is an example application demonstrating the implementation of the AnyConnect API

## Member Function Documentation

bool GUIClientImpl::connect | ( | tstring | host | ) |

This method initiates a connection to the specified host. The connection results in the presentation of authentication credentials, as appropriate. Any credentials returned by the secure gateway are delivered via the #UserPromptCB method.

See ConnectPromptInfo for more details on possible authentication credentials.

If the connection request is accepted, true is returned. This does not mean the connection succeeded. If the connection succeeds, a state of connect will be received via the #StateCB method.

Reimplemented from ClientIfc.

    {
        me_RequestType = REQ_CONNECT;

        // This is the main method for initiating a VPN connection.
        // The method can be found in ClientIfc.
        //
        bool bSuccess = ClientIfc::connect(host);
        if (!bSuccess)
        {
            return false;
        }

        return true;
    }

void GUIClientImpl::EventAvailable | ( |  | ) | `[protected, virtual]`

The implementation of this method and subsequent call on MainDialog::HandleEventAvailable demonstrates the posting of an event.

Reimplemented from ClientIfcBase.

    {
        parentWindow->HandleEventAvailable();
    }

void GUIClientImpl::PreConnectReminderCB | ( | const tstring & | rtstrPreConnectReminder | ) | `[protected, virtual]`

If a pre-connect reminder needs to be acknowledged, this CB delivers the pre-connect reminder to the client.

NOTE: Connection establishment will block until the method setPreConnectReminderResponse() is called.

In a GUI, a pre-connect reminder would typically be displayed in a modal dialog with an OK button selection.

See also:
  setPreConnectReminderResponse() to set the user acknowledgement to the pre-connect reminder message.

Reimplemented from ClientIfcBase.

    {
        setPreConnectReminderResponse();
    }

void GUIClientImpl::ServiceReadyCB | ( |  | ) | `[protected, virtual]`

Under normal operating conditions, this CB is called as soon as the attach method completes. In case the service (vpn agent) is not ready, this CB is not called until it is.

Any API calls made prior to this CB being called will result in a NoticeCB error message.

Implements ClientIfcBase.

    { }