| AnyConnect Secure Mobility Client 5.1.1.42

- Main Page
- Related Pages
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Member Functions

# ConnectPromptInfo Class Reference

`#include <ConnectPromptInfo.h>`

List of all members.

## Public Member Functions
ConnectPromptType | getConnectPromptType () const
bool | isCanceled () const
void | setCanceled (bool bIsCanceled)
UserResponseError | getResponseError () const
void | setResponseError (UserResponseError err)
unsigned int | countPromptEntry () const
const tstring & | getMessage () const
const std::list< tstring > & | getListPromptNames (std::list< tstring > &listPromptNames) const
PromptEntry * | getPromptEntry (const tstring &promptName) const
const std::list< PromptEntry * > & | getListPromptEntry () const
bool | hasAuthenticationError () const
int | getAuthenticationError () const
const tstring & | getSubmitButtonName () const
bool | hasEnrollmentCA () const
void | setUseEnrollmentCA (bool bUseEnrollmentCA)
bool | setTunnelGroup (const tstring &group)
bool | isEmpty () const
| ConnectPromptInfo (tstring defaultSubmitButtonName)

## Detailed Description

This class transports credential data between the client interface and the API. The API creates PromptEntry instances for each required option or credential. These PromptEntry instances can range from an instance with group options to one containing a password prompt.

The API automatically references the instance of this class and any values that have been set. When the selections or values are set, simply call the API method ClientIfc::UserSubmit to alert the API that it can process the responses and proceed with VPN establishment.

The storage and management of this class are the responsibility of the API. No management is required on the part of a client program.

## Member Function Documentation

unsigned int ConnectPromptInfo::countPromptEntry | ( |  | ) | const

This method returns the count of any available PromptEntry objects. Each PromptEntry object, typically, represents a credential whose value the client must set before calling the UserSubmit method.

Reimplemented from ConnectPromptInfoBase.

int ConnectPromptInfo::getAuthenticationError | ( |  | ) | const

If an error during authentication is detected, this method returns the auth error code.

Reimplemented from ConnectPromptInfoBase.

ConnectPromptType ConnectPromptInfo::getConnectPromptType | ( |  | ) | const

Specifies what type of data is being requested/presented to the user: Certificate - can be a single or list of certificates. Proxy - indicates being prompted for proxy credentials. Credentials - indicates being prompted for user credentials (for example, username, password).

Reimplemented from ConnectPromptInfoBase.

const std::list<PromptEntry *>& ConnectPromptInfo::getListPromptEntry | ( |  | ) | const

Retrieve the entire list of PromptEntry objects.

Reimplemented from ConnectPromptInfoBase.

const std::list<tstring>& ConnectPromptInfo::getListPromptNames | ( | std::list< tstring > & | listPromptNames | ) | const

Retrieve a list of any available prompt names.

Reimplemented from ConnectPromptInfoBase.

const tstring& ConnectPromptInfo::getMessage | ( |  | ) | const

Return the string if any, related to the credentials for which the user is being prompted.

Reimplemented from ConnectPromptInfoBase.

PromptEntry* ConnectPromptInfo::getPromptEntry | ( | const tstring & | promptName | ) | const

Retrieve a PromptEntry instance by name. The list of names can be obtained using getListPromptNames method.

See the PromptType enum found in api.h for valid PromptEntry types (except for Prompt_Checkbox which is used by the Preference class).

Reimplemented from ConnectPromptInfoBase.

UserResponseError ConnectPromptInfo::getResponseError | ( |  | ) | const

This method returns whether or not this connect prompt has error occurred

Reimplemented from ConnectPromptInfoBase.

const tstring& ConnectPromptInfo::getSubmitButtonName | ( |  | ) | const

Get the name to be used for the button used to submit user responses (For example, Connect, Submit)

Reimplemented from ConnectPromptInfoBase.

bool ConnectPromptInfo::hasAuthenticationError | ( |  | ) | const

If an error during authentication is detected, this method returns true.

Reimplemented from ConnectPromptInfoBase.

bool ConnectPromptInfo::hasEnrollmentCA | ( |  | ) | const

Indicates that an enrollment Certificate Authority (CA) is available.

Reimplemented from ConnectPromptInfoBase.

bool ConnectPromptInfo::isCanceled | ( |  | ) | const

This method returns whether or not this connect prompt has been marked as canceled by the user.

Reimplemented from ConnectPromptInfoBase.

bool ConnectPromptInfo::isEmpty | ( |  | ) | const

Indicates if this object is "Empty". This means: -The object has no entries and no enrollmentCA (and a detail message) -Has only disabled/invisible entries -Has only entries of Type Prompt_Banner or Prompt_Hidden or Prompt_Header or Prompt_CheckBox returns true if the object is "Empty" false otherwise

Reimplemented from ConnectPromptInfoBase.

void ConnectPromptInfo::setCanceled | ( | bool | bIsCanceled | ) |

Marks the canceled state of this connect prompt.

Reimplemented from ConnectPromptInfoBase.

void ConnectPromptInfo::setResponseError | ( | UserResponseError | err | ) |

Marks the error state of this connect prompt.

Reimplemented from ConnectPromptInfoBase.

bool ConnectPromptInfo::setTunnelGroup | ( | const tstring & | group | ) |

Set the actively selected group. This method will update the value and enabled properties of the contained credential PromptEntry objects.

Reimplemented from ConnectPromptInfoBase.

void ConnectPromptInfo::setUseEnrollmentCA | ( | bool | bUseEnrollmentCA | ) |

Set to true to indicate that we want to retrieve a certificate from the CA.

Reimplemented from ConnectPromptInfoBase.