| AnyConnect Secure Mobility Client 5.1.16.194

Public Member Functions | Static Public Attributes | List of all members
PromptEntry Class Reference

`#include <PromptEntry.h>`

## 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)
Public Member Functions inherited from PromptEntryBase
bool | setValue (const tstring &value)
bool | clearValue ()
const tstring & | getPromptName () const
const tstring & | getPromptLabel () const
bool | isEnabled () const
void | setEnabled (bool bIsEnabled)
bool | isVisible () const
void | setVisible (bool bIsVisible)
void | setEntryGroup (bool bIsEntryGroup)
| PromptEntryBase (tstring PromptName, tstring PromptLabel, PromptType promptType=Prompt_Input, const tstring &DefaultValue=EmptyString, ApiStringMap LabelValues=EmptyLabelValues)
void | setPromptLabel (tstring label)
const tstring & | getValue () const
const tstring & | getTrueValue () const
const std::list< tstring > & | getValueOptions () const
bool | isEntryGroup () const
bool | isReadOnly () const
PromptType | getPromptType () const
size_t | GetGroupAttributesCount ()
PromptEntryBase & | operator= (const PromptEntryBase &existingEntry)
| PromptEntryBase (const PromptEntryBase &existingEntry)
const GroupAttributes & | getGroupAttributes (const tstring &group) const
void | setGroupAttributesMap (const GroupAttributesMap &groupAttributesMap)
const SingleAttributes & | getSingleAttributes () const
void | setSingleAttributes (const SingleAttributes &singleAttributes)

## 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
Static Public Attributes inherited from PromptEntryBase
static const tstring | EmptyString
static const std::list< tstring > | EmptyList
static const ApiStringMap | EmptyLabelValues

## Additional Inherited Members
Public Types inherited from PromptEntryBase
typedef std::map< tstring, GroupAttributes > | GroupAttributesMap

## 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::PromptEntry | ( | const PromptEntry & | existingEntry | ) |
| inline explicit

Deep Copy Constructor

151 :
152 PromptEntryBase(existingEntry)
153 {
154 }
PromptEntryBase
Definition: PromptEntryBase.h:25

## Member Function Documentation

## ◆ getPromptLabel()

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

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

## ◆ getPromptName()

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.

## ◆ getPromptType()

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

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

## ◆ getValue()

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

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

## ◆ getValueOptions()

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.

## ◆ isEnabled()

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

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

## ◆ isEntryGroup()

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

Use this prompt entry for group values

## ◆ isVisible()

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

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

## ◆ operator=()

PromptEntry& PromptEntry::operator= | ( | const PromptEntry & | existingEntry | ) |
| inline

Deep Copy Assignment Operator

160 {
161 if (std::addressof(existingEntry) != this)
162 {
163 PromptEntryBase::operator=(existingEntry);
164 }
165 return *this;
166 }

## ◆ setValue()

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.

## Member Data Documentation

## ◆ Banner

tstring PromptEntry::Banner
| static

Identifies PromptEntry instance containing banner.

## ◆ GroupList

tstring PromptEntry::GroupList
| static

Identifies PromptEntry instance with group list.

## ◆ NetAccess

tstring PromptEntry::NetAccess
| static

Identifies the PromptEntry displaying the network access state.

## ◆ Password

tstring PromptEntry::Password
| static

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

## ◆ Pin

tstring PromptEntry::Pin
| static

Identifies PromptEntry PIN

## ◆ SecondaryPassword

tstring PromptEntry::SecondaryPassword
| static

Identifies PromptEntry instance requesting secondary password.

## ◆ SecondaryUsername

tstring PromptEntry::SecondaryUsername
| static

Identifies PromptEntry instance requesting secondary username.

## ◆ Username

tstring PromptEntry::Username
| static

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

## ◆ VerifyPin

tstring PromptEntry::VerifyPin
| static

Identifies PromptEntry Verify PIN