AnyConnect Secure Mobility Client  4.10.06090
ConnectPromptInfo Class Reference

#include <ConnectPromptInfo.h>

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 tstringgetMessage () const
 
const std::list< tstring > & getListPromptNames (std::list< tstring > &listPromptNames) const
 
PromptEntrygetPromptEntry (const tstring &promptName) const
 
const std::list< PromptEntry * > & getListPromptEntry () const
 
bool hasAuthenticationError () const
 
int getAuthenticationError () const
 
const tstringgetSubmitButtonName () const
 
bool hasEnrollmentCA () const
 
void setUseEnrollmentCA (bool bUseEnrollmentCA)
 
bool setTunnelGroup (const tstring &group)
 
bool isEmpty () const
 
 ConnectPromptInfo (tstring defaultSubmitButtonName)
 
- Public Member Functions inherited from ConnectPromptInfoBase
void setSubmitButtonName (const tstring &buttonName)
 
void setConnectPromptType (ConnectPromptType connectPromptType)
 
bool isCanceled () const
 
void setCanceled (bool bIsCanceled)
 
UserResponseError getResponseError () const
 
void setResponseError (UserResponseError err)
 
void setMessage (const tstring &tstrMessage)
 
void setAuthenticationError (int iAuthError)
 
int getAuthenticationError () const
 
void setAuthenticationErrorMessage (const tstring &authErrorMessage)
 
tstring getAuthenticationErrorMessage () const
 
void addPromptEntry (PromptEntry *promptEntry)
 
void insertPromptEntry (PromptEntry *promptEntry)
 
void removeMatchingPromptEntry (PromptType promptType)
 
void clearPasswordData ()
 
void setHasEnrollmentCA (bool bHasEnrollmentCA)
 
bool useEnrollmentCA () const
 
void setAgentRequest (bool agentRequest)
 
bool isAgentRequest () const
 
bool isAutoSubmit () const
 
void setAutoSubmit (bool bIsAutoSubmit)
 
bool setTunnelGroup (const tstring &group)
 
void reset ()
 
bool valid () const
 
void setButtonState (UIControlStateType state)
 
UIControlStateType getButtonState ()
 
tstring toString () const
 
 ConnectPromptInfoBase (tstring defaultSubmitButtonName)
 
 ConnectPromptInfoBase (const ConnectPromptInfoBase &copyCtor)
 
ConnectPromptInfoBaseoperator= (const ConnectPromptInfoBase &inst)
 
PromptEntrygetFirstPromptEntryOfType (PromptType ptype)
 

Additional Inherited Members

- Protected Member Functions inherited from ConnectPromptInfoBase
ConnectPromptType getConnectPromptType () const
 
unsigned int countPromptEntry () const
 
const tstringgetMessage () const
 
const std::list< tstring > & getListPromptNames (std::list< tstring > &listPromptNames) const
 
PromptEntrygetPromptEntry (const tstring &promptName) const
 
const std::list< PromptEntry * > & getListPromptEntry () const
 
bool hasAuthenticationError () const
 
const tstringgetSubmitButtonName () const
 
bool hasEnrollmentCA () const
 
void setUseEnrollmentCA (bool bUseEnrollmentCA)
 
bool isEmpty () const
 

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

◆ countPromptEntry()

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.

◆ getAuthenticationError()

int ConnectPromptInfo::getAuthenticationError ( ) const

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

◆ getConnectPromptType()

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).

◆ getListPromptEntry()

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

Retrieve the entire list of PromptEntry objects.

◆ getListPromptNames()

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

Retrieve a list of any available prompt names.

◆ getMessage()

const tstring& ConnectPromptInfo::getMessage ( ) const

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

◆ getPromptEntry()

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).

◆ getResponseError()

UserResponseError ConnectPromptInfo::getResponseError ( ) const

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

◆ getSubmitButtonName()

const tstring& ConnectPromptInfo::getSubmitButtonName ( ) const

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

◆ hasAuthenticationError()

bool ConnectPromptInfo::hasAuthenticationError ( ) const

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

◆ hasEnrollmentCA()

bool ConnectPromptInfo::hasEnrollmentCA ( ) const

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

◆ isCanceled()

bool ConnectPromptInfo::isCanceled ( ) const

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

◆ isEmpty()

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

◆ setCanceled()

void ConnectPromptInfo::setCanceled ( bool  bIsCanceled)

Marks the canceled state of this connect prompt.

◆ setResponseError()

void ConnectPromptInfo::setResponseError ( UserResponseError  err)

Marks the error state of this connect prompt.

◆ setTunnelGroup()

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.

◆ setUseEnrollmentCA()

void ConnectPromptInfo::setUseEnrollmentCA ( bool  bUseEnrollmentCA)

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