AnyConnect Secure Mobility Client  5.1.1.42
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 ( const PromptEntry &  existingEntry)
inlineexplicit

Deep Copy Constructor

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

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.

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.

PromptType PromptEntry::getPromptType ( ) const

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

const tstring& PromptEntry::getValue ( ) const

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

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.

bool PromptEntry::isEnabled ( ) const

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

bool PromptEntry::isEntryGroup ( ) const

Use this prompt entry for group values

bool PromptEntry::isVisible ( ) const

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

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  }
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

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