| AnyConnect Secure Mobility Client 5.1.8.122

- Main Page
- Related Pages
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Attributes

# PromptEntry Class Reference

`#include <PromptEntry.h>`

List of all members.

## Public Member Functions
const tstring & | getValue () const
bool | setValue (const tstring &value)
const tstring & | getPromptName () const
const tstring & | getPromptLabel () const
PromptType | getPromptType () const
bool | isEnabled () const
bool | isVisible () const
const std::list< tstring > & | getValueOptions () const
bool | isEntryGroup () const
bool | isReadOnly () const
| PromptEntry (tstring PromptName, tstring PromptLabel, PromptType promptType=Prompt_Input, const tstring &DefaultValue=EmptyString, ApiStringMap LabelValues=EmptyLabelValues)
| PromptEntry (const PromptEntry &existingEntry)
PromptEntry & | operator= (const PromptEntry &existingEntry)
## Static Public Attributes
static tstring | Username
static tstring | Password
static tstring | SecondaryUsername
static tstring | SecondaryPassword
static tstring | GroupList
static tstring | Banner
static tstring | Pin
static tstring | VerifyPin
static tstring | NetAccess

## Detailed Description

When Authentication requires a user to enter credentials or view a banner in conjunction with their VPN activation, one or more PromptEntry objects are created. Each PromptEntry typically contains a label and value. The value can be set with a default value that the user can then change.

PromptEntry instances are collected into a list and delivered in a single instance of the ConnectPromptInfo class.

When the selections or values are complete (using setValue method) for all the PromptEntry instances, simply call the API method ClientIfc::UserSubmit to alert the API that it can process the responses and proceed with VPN establishment.

An example of accessing individual PromptEntry and their values can be found in ClientImpl::setUserData

## Constructor & Destructor Documentation

PromptEntry::PromptEntry | ( | const PromptEntry & | existingEntry | ) | `[inline, explicit]`

Deep Copy Constructor

                :
                PromptEntryBase(existingEntry)
            {
            }

## Member Function Documentation

const tstring& PromptEntry::getPromptLabel | ( |  | ) | const

Set/get the label associated with this prompt entry. This value is translated if a translation is available.

Reimplemented from PromptEntryBase.

const tstring& PromptEntry::getPromptName | ( |  | ) | const

The fixed name associated with this prompt entry. This represents a non-translated fixed entity, whereas the label is a translated entry.

Reimplemented from PromptEntryBase.

PromptType PromptEntry::getPromptType | ( |  | ) | const

Return the type of prompt entry. See the enum PromptType for the possible types.

Reimplemented from PromptEntryBase.

const tstring& PromptEntry::getValue | ( |  | ) | const

use this method to get the current value set in the prompt entry.

Reimplemented from PromptEntryBase.

const std::list<tstring>& PromptEntry::getValueOptions | ( |  | ) | const

If a prompt entry has a list of possible selection, (like Prompt_Combo and Prompt_Checkbox in PromptType enum in api.h), that list is available via this method. For example, a checkbox type prompt would return "true" and "false" as options. The values returned could for example, be displayed in a combo box selection.

Reimplemented from PromptEntryBase.

bool PromptEntry::isEnabled | ( |  | ) | const

Get the enabled state of this prompt entry which indicates if it can be edited.

Reimplemented from PromptEntryBase.

bool PromptEntry::isEntryGroup | ( |  | ) | const

Use this prompt entry for group values

Reimplemented from PromptEntryBase.

bool PromptEntry::isVisible | ( |  | ) | const

Get the visible state of this prompt entry which indicates if it should be displayed.

Reimplemented from PromptEntryBase.

PromptEntry& PromptEntry::operator= | ( | const PromptEntry & | existingEntry | ) | `[inline]`

Deep Copy Assignment Operator

            {
                if (std::addressof(existingEntry) != this)
                {
                    PromptEntryBase::operator=(existingEntry);
                }
                return *this;
            }

bool PromptEntry::setValue | ( | const tstring & | value | ) |

use this method to set the user selection. If a default value is present, it's value will be used unless this method in invoked. Returns true if the value is successfully set.

Reimplemented from PromptEntryBase.

## Member Data Documentation

tstring PromptEntry::Banner`[static]`

Identifies PromptEntry instance containing banner.

tstring PromptEntry::GroupList`[static]`

Identifies PromptEntry instance with group list.

tstring PromptEntry::NetAccess`[static]`

Identifies the PromptEntry displaying the network access state.

tstring PromptEntry::Password`[static]`

Identifies PromptEntry instance requesting a password. See getPromptName() method and example in ClientImpl::setUserData()

tstring PromptEntry::Pin`[static]`

Identifies PromptEntry PIN

tstring PromptEntry::SecondaryPassword`[static]`

Identifies PromptEntry instance requesting secondary password.

tstring PromptEntry::SecondaryUsername`[static]`

Identifies PromptEntry instance requesting secondary username.

tstring PromptEntry::Username`[static]`

Identifies the PromptEntry instance requesting a username. See getPromptName() method and example in ClientImpl::setUserData()

tstring PromptEntry::VerifyPin`[static]`

Identifies PromptEntry Verify PIN