| AnyConnect Secure Mobility Client 5.0.00556

- Main Page
- Related Pages
- Classes
- Files

- File List
- File Members

# include/api.h

Go to the documentation of this file.

    00001 /**************************************************************************
    00002 *   Copyright (c) 2008, 2022 Cisco Systems, Inc.
    00003 *   All Rights Reserved. Cisco Highly Confidential.
    00004 ***************************************************************************
    00005 *
    00006 *   File: api.h
    00007 *   Date: 01/2008
    00008 *
    00009 ***************************************************************************
    00010 *   VPN GUI API module interface types
    00011 ***************************************************************************/
    00012 #ifndef _APISTDHEADER_
    00013 #define _APISTDHEADER_
    00014
    00015 /**
    00016  * @file
    00017  * This file contains some basic compiler definitions as well as common enums.
    00018  */
    00019
    00020 //Not compatible with MIDL
    00021 #if !defined(__midl)
    00022 #ifdef _WIN32
    00023     #pragma warning(disable:4251 4786)
    00024
    00025     #ifndef UNICODE
    00026         #define UNICODE
    00027     #endif // UNICODE
    00028
    00029     #ifndef _UNICODE
    00030         #define _UNICODE
    00031     #endif // _UNICODE
    00032
    00033     #ifndef tstring
    00034 /** std::wstring */
    00035         #define tstring std::wstring    /**< my wstring description */
    00036     #endif // tstring
    00037
    00038 #else // non-windows
    00039
    00040     #ifndef tstring
    00041         #define tstring std::string
    00042     #endif // tstring
    00043
    00044 #endif // _WIN32
    00045
    00046 #ifdef _UNICODE
    00047     #define tostream std::wostream
    00048 #else
    00049     #define tostream std::ostream
    00050 #endif /* UNICODE */
    00051
    00052
    00053 //used when including implementation files directly in an EXE.
    00054 #ifdef _NOEXPORTDLL
    00055     #define VPN_VPNAPI
    00056 #else
    00057     #ifdef _WIN32
    00058         #ifdef VPN_APIEXPORTS //api
    00059             #define VPN_VPNAPI __declspec(dllexport)
    00060         #else
    00061             #define VPN_VPNAPI __declspec(dllimport)
    00062         #endif
    00063     #else
    00064         #ifdef VPN_APIEXPORTS
    00065             #define VPN_VPNAPI  __attribute__((visibility("default")))
    00066         #else
    00067             #define VPN_VPNAPI
    00068         #endif
    00069     #endif //_WIN32
    00070 #endif //NOEXPORTDLL
    00071
    00072 #ifndef OUT
    00073 #define OUT
    00074 #endif
    00075
    00076 #ifndef IN
    00077 #define IN
    00078 #endif
    00079
    00080 #ifdef __cplusplus //only include if C++ is being used,
    00081                    //C code also includes api.h for COM proxy of enumerators.
    00082 #include <string>
    00083 #include <map>
    00084 #include <list>
    00085
    00086 typedef std::map<tstring, tstring> ApiStringMap;
    00087 typedef std::map<tstring, std::list<tstring> > ApiStringListMap;
    00088
    00089 #endif //__cplusplus
    00090 #endif //#if !defined(__midl)
    00091
    00092
    00093 /***** PUT ONLY SHARED ENUMS EXPOSED TO USERS OF API FROM THIS POINT UNTIL END *****\
    00094 ********* make sure to add the [v1_enum] inside a __midl define to new enums ********
    00095 \******************** This is also compiled with IDL compiler **********************/
    00096
    00097 #include "GlobalEnums.h"
    00098 /**
    00099  * MessageType
    00100  * presents a level of severity associated with messages that are
    00101  * sent to the API.  The severity can be useful for deciding how a message is
    00102  * to be shown.  A UI might decide based on type to show a message as
    00103  * a modal dialog versus a message written to the status area for an existing UI.
    00104  */
    00105 #if defined(__midl)
    00106 [v1_enum] /*serialize as 32 bits*/
    00107 #endif
    00108 enum MessageType
    00109 {
    00110     MsgType_Error,      /**< Issue usually requiring user to acknowledge */
    00111     MsgType_Alert,      /**< Warning message that needs to be shown to user. */
    00112     MsgType_Warn,       /**< Less severe, not required to be shown to user */
    00113     MsgType_Info,       /**< General message providing status, progress, etc. */
    00114     MsgType_Status,     /**< Can be used to indicate unexpected tunnel status change. */
    00115     MsgType_UrlError    /**< Error message that provides additional information by opening browser. */
    00116 };
    00117
    00118
    00119 /**
    00120  * Identifies the type of token that was used successfully when SDI
    00121  * Authentication is in use.
    00122  */
    00123 #if defined(__midl)
    00124 [v1_enum] /*serialize as 32 bits*/
    00125 #endif
    00126 enum SDITokenType
    00127 {
    00128     SDITT_NONE,
    00129     SDITT_HARDWARE,
    00130     SDITT_SOFTWARE
    00131 };
    00132
    00133 /**
    00134  * Provides the current state of the VPN tunnel.
    00135  */
    00136 #if defined(__midl)
    00137 [v1_enum] /*serialize as 32 bits*/
    00138 #endif
    00139 enum VPNState
    00140 {
    00141     CONNECTED     = STATE_CONNECTED,        /**< VPN is active */
    00142     DISCONNECTED  = STATE_DISCONNECTED,     /**< VPN is inactive */
    00143     CONNECTING    = STATE_CONNECTING,       /**< VPN is being established */
    00144     DISCONNECTING = STATE_DISCONNECTING,    /**< VPN is being terminated */
    00145     RECONNECTING  = STATE_RECONNECTING,     /**< VPN is being re-connected.  This state
    00146                                                  can occur due to network or other
    00147                                                  temporary problems.  The state
    00148                                                  indicates that the VPN is temporarily
    00149                                                  unavailable and indicates the
    00150                                                  connection is being re-established. */
    00151     PAUSING       = STATE_PAUSING,          /**< VPN is being paused. */
    00152     PAUSED        = STATE_PAUSED,           /**< VPN is paused. */
    00153     SSOPOLLING    = STATE_SSOPOLLING,       /**< API is doing auth-poll, VPN is disconnected. */
    00154     UNKNOWN       = ~0
    00155 };
    00156
    00157 /**
    00158  * Provides the current sub-state of the VPN tunnel.
    00159  */
    00160 #if defined(__midl)
    00161 [v1_enum] /*serialize as 32 bits*/
    00162 #endif
    00163 enum VPNSubState
    00164 {
    00165     VPNSS_NORMAL                            = VCSS_NORMAL,
    00166     VPNSS_INDEFINITE_DELAY                  = VCSS_INDEFINITE_DELAY,
    00167     VPNSS_SESSION_EXPIRING                  = VCSS_SESSION_EXPIRING,
    00168     VPNSS_MT_DISCONNECTED_DISABLED          = VCSS_MT_DISCONNECTED_DISABLED,
    00169     VPNSS_MT_DISCONNECTED_TRUSTED_NW        = VCSS_MT_DISCONNECTED_TRUSTED_NW,
    00170     VPNSS_MT_DISCONNECTED_USER_TUNNEL_ACTIVE= VCSS_MT_DISCONNECTED_USER_TUNNEL_ACTIVE,
    00171     VPNSS_MT_DISCONNECTED_LAUNCH_FAILED     = VCSS_MT_DISCONNECTED_LAUNCH_FAILED,
    00172     VPNSS_MT_DISCONNECTED_CONNECT_FAILED    = VCSS_MT_DISCONNECTED_CONNECT_FAILED,
    00173     VPNSS_MT_DISCONNECTED_BAD_VPN_CONFIG    = VCSS_MT_DISCONNECTED_BAD_VPN_CONFIG,
    00174     VPNSS_MT_DISCONNECTED_SW_UP_PENDING     = VCSS_MT_DISCONNECTED_SW_UP_PENDING,
    00175     VPNSS_MTU_ADJUSTMENT_PENDING            = VCSS_MTU_ADJUSTMENT_PENDING
    00176 };
    00177
    00178 /**
    00179  * WMHint
    00180  * provides a hint for the GUI to either minimize or un-minimize.
    00181  */
    00182 #if defined(__midl)
    00183 [v1_enum] /*serialize as 32 bits*/
    00184 #endif
    00185 enum WMHint
    00186 {
    00187     MINIMIZE,       /**< hint to minimize GUI */
    00188     OPEN,           /**< hint to un-minimize GUI */
    00189     QUIT,           /**< hint that GUI should close.  @see WMHintReason */
    00190     REFRESHHOSTNAMES,/**< hint to refresh the list of secure gateways */
    00191     REFRESHPREFS,   /**< hint to refresh the preferences */
    00192     SHOWCONNECTING,  /**< hint to display "connecting" status */
    00193     CLOSECREDENTIALPOPUP, /**< hint to close the credentials popup */
    00194 };
    00195
    00196
    00197 /**
    00198  * WMHintReason
    00199  * provides a reason indicator for the #WMHint
    00200  */
    00201 #if defined(__midl)
    00202 [v1_enum] /*serialize as 32 bits*/
    00203 #endif
    00204 enum WMHintReason
    00205 {
    00206     SECONDGUISTART, /**< Indicates a second GUI has been launched.  This
    00207                          indicator is used to suggest that the GUI
    00208                          already running be OPENed and that the first one
    00209                          should exit. */
    00210     PROXYREQUEST,   /**< Proxy credential request can be for web-launch or
    00211                          standalone-initiated connections. */
    00212     SERVICEFAILURE, /**< This tag is used when the VPN service
    00213                          is no longer available. */
    00214     DISCONNECT,     /**< Any disconnect notices should be seen by the user. */
    00215     SERVICESTOPPED, /**< This tag will be used in cases where the VPN service
    00216                          has been stopped. */
    00217     CONNECT,        /**< Tag indicating an action to be taken due to connect,
    00218                          for example a request to minimize the UI. */
    00219     REASONUNKNOWN   /**< */
    00220 };
    00221
    00222 /**
    00223  * provides an indication of the type of credential data being requested.
    00224  */
    00225 #if defined(__midl)
    00226 [v1_enum] /*serialize as 32 bits*/
    00227 #endif
    00228 enum ConnectPromptType
    00229 {
    00230     CERTIFICATE,    /**< Indicates a certificate-only type of connection and
    00231                          would not normally be sent to client unless a
    00232                          post-authentication banner is to be displayed. */
    00233     CREDENTIALS,    /**< Indicates that the user is to be prompted for authentication
    00234                          credentials */
    00235     PROXY,          /**< Indicates that the user is to be prompted for
    00236                          proxy-authentication credentials */
    00237     MANUAL_PKCS12_IMPORT, /**< Indicates that the user is to be prompted for passwords related
    00238                               to PKCS12 import*/
    00239     STATUS,         /**< Indicates that status messages are to be displayed to
    00240                          the user*/
    00241     SINGLESIGNON,   /**< Indicates an embedded browser based single sign-on authentication method is requested. */
    00242     SINGLELOGOUT,   /**< Indicates an embedded browser based single sign-on authentication logout is requested. */
    00243     LEGACY_SINGLESIGNON,   /**< (deprecated) Indicates a browser based single sign-on authentication method is requested. */
    00244 };
    00245
    00246
    00247 /**
    00248  * Indicates the prompt or credential type.
    00249  */
    00250 #if defined(__midl)
    00251 [v1_enum] /*serialize as 32 bits*/
    00252 #endif
    00253 enum PromptType { Prompt_Input,     /**< label and value. */
    00254                   Prompt_Password,  /**< label and value, indicates user
    00255                                          response should be masked. */
    00256                   Prompt_Banner,    /**< value (the banner) with no label set. */
    00257                   Prompt_Combo,     /**< list with choices options. */
    00258                   Prompt_Header,    /**< label intended as header and with
    00259                                          value. */
    00260                   Prompt_Hidden,    /**< hidden value, should be ignored and
    00261                                          left unchanged in response. */
    00262                   Prompt_CheckBox,  /**< label and value (contrained to true or false) */
    00263                   Prompt_SSO        /**< single sign-on authentication token prompt */
    00264 };
    00265
    00266 #if defined(__midl)
    00267 [v1_enum] /*serialize as 32 bits*/
    00268 #endif
    00269
    00270 /*
    00271  * ***************** !!! ATTENTION !!! ***********************************
    00272  * *
    00273  * * When updating this preference enum, you must ensure that the enum in
    00274  * * vpn/Api/jni/java/Preference.java is also updated.
    00275  * *
    00276  * ***************** !!! ATTENTION !!! ***********************************
    00277  */
    00278 enum PreferenceId
    00279 {
    00280     ServiceDisable,             /**< This preference disable the VPN service.
    00281                                  If more than one profile exists and any one
    00282                                  profile has VPN enabled, then it will be
    00283                                  enabled.  False is the default. */
    00284     CertificateStoreOverride,/**< This preference will trigger an alternate
    00285                                  authentication sequence in the API. The
    00286                                  preference is only settable by an
    00287                                  administrator. */
    00288     CertificateStore,       /**< This preference indicates which Windows certificate
    00289                                  store AnyConnect should look in for client certificates.
    00290                                  The options are All, Machine and User with a default of All.
    00291                                  The preference is only settable by an administrator. */
    00292     CertificateStoreMac,    /**< This preference indicates which macOS keychain
    00293                                  AnyConnect should look in for client certificates.
    00294                                  The options are All, System and Login with a default of All.
    00295                                  The preference is only settable by an administrator. */
    00296     CertificateStoreLinux,  /**< This preference indicates which Linux certificate
    00297                                  store AnyConnect should look in for client certificates.
    00298                                  The options are All, Machine and User with a default of All.
    00299                                  The preference is only settable by an administrator. */
    00300     ShowPreConnectMessage,  /**< The ShowPreConnectMessage preference gives the
    00301                                  administrator the ability to display an AnyConnect
    00302                                  startup banner message. The message will appear
    00303                                  only once per AnyConnect program start. The
    00304                                  preference is only settable by an
    00305                                  administrator. */
    00306     AutoConnectOnStart,     /**< This preference allows the user to select
    00307                                  whether to establish a connection automatically
    00308                                  on startup or not. */
    00309     MinimizeOnConnect,      /**< This preference allows the user to select if
    00310                                  the GUI should minimize when the connection is
    00311                                  established */
    00312     LocalLanAccess,         /**< This preference will provide a mechanism where
    00313                                  the user can disable access to their Local LAN. */
    00314     DisableCaptivePortalDetection, /**<This preference will provide a mechanism where
    00315                                    the user can disable captive portal detection.*/
    00316     AutoReconnect,          /**< First control of the reconnect behavior. If the
    00317                                  client becomes disconnected for any reason, a
    00318                                  reconnect attempt is made.   */
    00319     AutoReconnectBehavior,  /**< Second control of the reconnect behavior. When
    00320                                  coming out of suspend/hibernate/standby mode.
    00321                                  Options are disconnect on suspend and reconnect
    00322                                  after suspend. */
    00323     SuspendOnConnectedStandby,  /**< This setting allows to control whether the VPN tunnel
    00324                                      is suspended when the system enters the Connected Standby
    00325                                      mode. It applies only to Windows 8 and above. */
    00326     UseStartBeforeLogon,    /**< This preference allows an administrator to
    00327                                  control the use of the Start Before Logon
    00328                                  feature. The preference can be set to true (on)
    00329                                  or false (off). */
    00330     AutoUpdate,             /**< Once the Downloader has loaded the profile, it
    00331                                  can check the AutoUpdate preference to see if
    00332                                  updates are either disabled or enabled */
    00333     RSASecurIDIntegration,  /**< This preference will enable the administrator
    00334                                  and possibly end user to select the preferred
    00335                                  method of managing their SDI PIN and PASSCODE
    00336                                  interactions. Options are Automatic (default),
    00337                                  SoftwareTokens and HardwareTokens. */
    00338     WindowsLogonEnforcement,/**< This preference allows an administrator to
    00339                                  control if more than one user may be logged into
    00340                                  the client PC during the VPN connection (Windows
    00341                                  only). */
    00342     WindowsVPNEstablishment,/**< This preference allows an administrator to
    00343                                  control whether or not remote users may initiate
    00344                                  a VPN connection (Windows only). */
    00345     LinuxLogonEnforcement,  /**< This preference allows an administrator to
    00346                                  control if more than one user may be logged into
    00347                                  the client PC during the VPN connection (Linux
    00348                                  only). */
    00349     LinuxVPNEstablishment,  /**< This preference allows an administrator to
    00350                                  control whether or not remote users may initiate
    00351                                  a VPN connection (Linux only). */
    00352     ProxySettings,          /**< This preference allows an administrator to
    00353                                  control how user's proxy setups are handled.*/
    00354     AllowLocalProxyConnections, /**< This preference allows the administrator to control
    00355                                  whether to allow establishing a connection through
    00356                                  a local proxy. */
    00357     PPPExclusion,           /**< This preference allows an administrator to control
    00358                                  the policy used to exclude routes to
    00359                                  PPP servers when connecting over L2TP or PPTP.
    00360                                  Options are Automatic (default), Disable,
    00361                                  and Override. */
    00362     PPPExclusionServerIP,   /**< When PPPExclusion is set to Manual,
    00363                                  the value of this preference allows an
    00364                                  end user to specify the address of a
    00365                                  PPP server that should be excluded
    00366                                  from tunnel traffic. */
    00367     AutomaticVPNPolicy,     /**< This preference allows an administrator to
    00368                                  define a policy to automatically manage when a
    00369                                  VPN connection should be started or stopped. */
    00370     TrustedNetworkPolicy,   /**< This preference allows an administrator to
    00371                                  define a policy for users in trusted networks.
    00372                                  The options are: Disconnect or DoNothing. */
    00373     UntrustedNetworkPolicy, /**< This preference allows an administrator to
    00374                                  define a policy for users in untrusted networks.
    00375                                  The options are: Connect or DoNothing. */
    00376     TrustedDNSDomains,      /**< This preference defines a list of comma
    00377                                  separated DNS suffixes that a network interface
    00378                                  in a trusted network might have. */
    00379     TrustedDNSServers,      /**< This preference defines a list of comma
    00380                                  separated DNS servers that a network interface
    00381                                  in a trusted network might have. */
    00382     TrustedHttpsServerList,  /**< This preference defines a list of comma separated
    00383                                   https servers reachable only via a trusted network.*/
    00384     AlwaysOn,               /**< This preference governs VPN reestablishment after
    00385                                  interruptions */
    00386     ConnectFailurePolicy,   /**< This preference gives the network administrator
    00387                                  the ability to dictate the network access allowed
    00388                                  by the client endpoint device following a VPN
    00389                                  connection establishment failure. It is a component
    00390                                  of AlwaysOn */
    00391     AllowCaptivePortalRemediation, /**< This preference gives the network administrator
    00392                                     the ability to dictate the network access
    00393                                     allowed by the client endpoint device following
    00394                                     a VPN connection establishment failure it is a
    00395                                     component of AlwaysOn */
    00396     CaptivePortalRemediationTimeout, /**< This preference allows the network administrator
    00397                                      the ability to impose a time limit for captive portal
    00398                                      remediation when the ConnectFailurePolicy value is Closed
    00399                                      It is a component of AlwaysOn */
    00400     ApplyLastVPNLocalResourceRules, /**< This preference gives the network administrator
    00401                                        the ability to allow split routes and firewall rules
    00402                                        to be applied following a VPN connection establishment
    00403                                        failure when the ConnectFailurePolicy value is Closed
    00404                                        It is a component of AlwaysOn */
    00405     AllowVPNDisconnect,     /**< During Always On, this specifies that the user is allowed to
    00406                                  disconnect the VPN session. */
    00407     AllowedHosts,           /**< During Always On, user has access to the specified hosts
    00408                                  when VPN is disconnected. */
    00409     EnableScripting,        /**< This preference allows an administrator to
    00410                                  enable scripting (on connect or on
    00411                                  disconnect). */
    00412     TerminateScriptOnNextEvent,   /**< This preference dictates whether or not
    00413                                        AnyConnect will terminate a running script
    00414                                        process if a transition to another
    00415                                        scriptable event occurs. */
    00416     EnablePostSBLOnConnectScript, /**< This preference is used to control whether
    00417                                        or not the OnConnect script will be launched
    00418                                        from the desktop GUI when a tunnel has been
    00419                                        established via SBL. */
    00420     AutomaticCertSelection,   /**< This preference dictates whether or not to disable
    00421                                    the default automatic certificate selection for user
    00422                                    certificates. If disabled, a certificate selection dialog is
    00423                                    displayed. This only applies if the GUI is enabled
    00424                                    and not SBL. This only applies to Windows (not WinMobile). */
    00425     RetainVpnOnLogoff,        /**< First control of the logoff behavior. This preference allows
    00426                                    an administrator to control if the VPN is terminated or retained
    00427                                    after user logs off.*/
    00428     UserEnforcement,          /**< Second control of the logoff behavior. When the VPN connection has
    00429                                    been retained after user logged off. Controls what user can log in
    00430                                    and keep the VPN connection. Options are same user only and any user. */
    00431     DeviceLockRequired,           /**< This preference indicates whether or not
    00432                                        a Windows Mobile device must be configured
    00433                                        with a password or PIN prior to establishing
    00434                                        a VPN connection. This configuration is
    00435                                        only valid on Windows Mobile devices that
    00436                                        use the Microsoft Default Local
    00437                                        Authentication Provider (LAP). */
    00438     DeviceLockMaximumTimeoutMinutes,   /**< When set to a non-negative number,
    00439                                             this preference specifies the maximum
    00440                                             number of minutes a device can be
    00441                                             inactive before device lock takes
    00442                                             into effect. (WM5/WM5AKU2+) */
    00443     DeviceLockMinimumPasswordLength,   /**< When set to a non-negative number,
    00444                                             this preference specifies that any
    00445                                             PIN/password used for device lock
    00446                                             must be equal to or longer than
    00447                                             the specified value, in characters.
    00448                                             This setting must be pushed down to
    00449                                             the mobile device by syncing with
    00450                                             an Exchange server before it can be
    00451                                             enforced. (WM5AKU2+) */
    00452     DeviceLockPasswordComplexity,      /**< This preference checks whether or
    00453                                             not the password belongs to one of
    00454                                             three subtypes: alpha, pin, strong */
    00455     EnableAutomaticServerSelection,    /**< Automatic server selection will
    00456                                             automatically select the optimal
    00457                                             secure gateway for the endpoint */
    00458     AutoServerSelectionImprovement,    /**< During a reconnection attempt after
    00459                                             a system resume, this setting
    00460                                             specifies the minimum  estimated
    00461                                             performance improvement required to
    00462                                             justify transitioning a user to a new server
    00463                                             This value represents percentage in 0..100 */
    00464     AutoServerSelectionSuspendTime,    /**< During a reconnection attempt after
    00465                                             a system resume, this specifies the
    00466                                             minimum time a user must have been
    00467                                             suspended in order to justify a new
    00468                                             server selection calculation. Unit is hours */
    00469     AuthenticationTimeout,             /**< Time, in seconds, that the client waits
    00470                                             for authentication to be completed.*/
    00471     SafeWordSofTokenIntegration,  /**< This preference will enable the administrator and possibly
    00472                                        the end user to enable SafeWord SofToken integration.
    00473                                        Options are Enabled (true) and Disabled (false - default). */
    00474     AllowIPsecOverSSL,                      /**< if 'true' then tunneling of IPSEC over SSL
    00475                                             is made possible with help from the ASA.
    00476                                         */
    00477     ClearSmartcardPin,                 /**< This preference controls whether the smartcard pin
    00478                                             will be cleared on a successful connection*/
    00479     IPProtocolSupport,                 /**< This preference controls which protocol(s) will be
    00480                                             allowed for the connection*/
    00481     CaptivePortalRemediationBrowserFailover, /**< This preference is applicable to enhanced captive portal
    00482                                                   remediation and specifies whether the user is allowed to
    00483                                                   opt for an external browser for remediation, as opposed to
    00484                                                   the AnyConnect browser. */
    00485     AllowManualHostInput,              /**< This preference specifies whether the user
    00486                                             is allowed to type a new hostname in the VPN
    00487                                             edit box. */
    00488     BlockUntrustedServers,             /**< This preference specifies whether the user wants
    00489                                             to allow for connections to secure gateways with
    00490                                             certificate errors. */
    00491     PublicProxyServerAddress,          /**< This preference specifies the public proxy server
    00492                                             address to be used. This number is in the format
    00493                                             ServerAddr:ServerPort (ex. 101.89.85.444:8080)
    00494                                             or just the FQDN. */
    00495     CertificatePinning,                /**< This preference specifies whether Certificate Pinning
    00496                                             check should be performed during server certificate
    00497                                             verification. */
    00498     UnknownPreference
    00499 };
    00500
    00501
    00502 /**
    00503  * Indicates the scope of the preferences contained in a PreferenceInfo object
    00504  */
    00505 #if defined(__midl)
    00506 [v1_enum] /*serialize as 32 bits*/
    00507 #endif
    00508 enum PreferenceScope
    00509 {
    00510     User,               /**< Indicates that the preferences were set by a user */
    00511     Global,             /**< Indicates that the preferences are global */
    00512     UserAndGlobal       /**< Indicates that we have both user and global preferences */
    00513 };
    00514
    00515 /**
    00516  * Indicates the client mode of operation. Unlike tunneling mode or other
    00517  * mutually exclusive modes, client operating modes are independent settings,
    00518  * several of which can be turned on simultaneously.
    00519  */
    00520 #if defined(__midl)
    00521 [v1_enum] /*serialize as 32 bits*/
    00522 #endif
    00523 enum OperatingMode
    00524 {
    00525     FIPS                     = (1 << 0), /**< Indicates that the client is
    00526                                               running in FIPS mode. */
    00527     StartBeforeLogon         = (1 << 1), /**< Indicates that the client is
    00528                                               running in Start Before Login
    00529                                               mode. */
    00530     GUI                      = (1 << 2), /**< Indicates that the client is
    00531                                               a GUI client. */
    00532     TrustedNetworkDetection  = (1 << 3), /**< Indicates that a Trusted Network
    00533                                               Detection policy is enabled for
    00534                                               the client. */
    00535     AlwaysOnVpn              = (1 << 4), /**< Indicates that the Always On
    00536                                               policy is enabled for the client. */
    00537     NetworkIssue             = (1 << 5), /**< For user notifications only.
    00538                                               Indication by API to the UI that
    00539                                               there is a network condition. */
    00540     Quarantined              = (1 << 6), /**< Indicates that the VPN session is being
    00541                                               Quarantined by the secure gateway. */
    00542     AutomaticHeadendSelection= (1 << 7), /**< Indicates that Automatic Headend
    00543                                               is enabled. */
    00544     DisconnectAllowed        = (1 << 8), /**< Indicates that the user is allowed
    00545                                               to disconnect the VPN based on
    00546                                               policy. */
    00547     VPNDisabled              = (1 << 9), /**< Indicates that the VPN service is
    00548                                               to be marked as disabled. */
    00549     SCEPMode                 = (1 << 10), /**< Indicates that the client is
    00550                                                performing a SCEP cert enrollment. */
    00551     OnTrustedNetwork         = (1 << 11), /**< Indicates that at last check, the
    00552                                                client detected that it was on
    00553                                                a trusted network. */
    00554     ManualHostInputAllowed   = (1 << 12), /**< Indicates that the user is allowed
    00555                                                to add a new host by typing its name
    00556                                                in the VPN edit box. */
    00557     ErrorSuppressed          = (1 << 13), /**< Indicates a connection error has
    00558                                                been returned fronm the agent, but
    00559                                                was suppressed to warning to
    00560                                                prevent popup dialog in the UI. */
    00561     StrictMode               = (1 << 14), /**< Indicates that the client is
    00562                                                running in strict certificate trust mode. */
    00563     CLI                      = (1 << 15), /**< Indicates that the client is
    00564                                                a CLI client. */
    00565     Management               = (1 << 16)  /**< Indicates that the client is strictly
    00566                                                used for initiating a management tunnel. */
    00567 };
    00568
    00569 /**
    00570  * Indicates the last error seen by the API in this connection attempt.
    00571  */
    00572 #if defined(__midl)
    00573 [v1_enum] /*serialize as 32 bits*/
    00574 #endif
    00575 enum VPNError
    00576 {
    00577     VPNSuccess = 0,                      /**< No error has occurred. */
    00578     VPNError_Generic_FatalError = 1,     /**< An error of unknown type has
    00579                                               occured */
    00580
    00581     VPNError_Connection_Error = 100,     /**< An unknown connection error has
    00582                                               occured, such as bad hostname, bad
    00583                                               group, etc. */
    00584     VPNError_Connection_InvalidGroupURL, /**< Invalid Group URL specified in the
    00585                                               server address */
    00586
    00587     VPNError_Network_Error = 200,        /**< An unknown network error has
    00588                                               occured, such as DNS resolution
    00589                                               error, unable to open socket,
    00590                                               routing error, captive portal,
    00591                                               etc. */
    00592
    00593     VPNError_Authentication_Error = 300, /**< An unknown user authenication
    00594                                               error has occured. */
    00595
    00596     VPNError_Authentication_DAP_Terminate, /**< Access Denied: Your system does
    00597                                                 not meet policy requirements (DAP). */
    00598
    00599     VPNError_ClientCertificate_UnknownError = 400, /**< An unknown client
    00600                                                         certificate error has
    00601                                                         occured. */
    00602     VPNError_ClientCertificate_Missing,  /**< A client certificate is required
    00603                                               but no client certificate has been
    00604                                               found on the system. */
    00605     VPNError_ClientCertificate_Expired,  /**< The client certificate has expired */
    00606     VPNError_ClientCertificate_NotYetValid, /**< The client certificate is not
    00607                                                  yet valid. */
    00608
    00609     VPNError_ServerCertificate_UnknownError = 500, /**< An unknown error has
    00610                                                         occured when validating
    00611                                                         the server certificate. */
    00612     VPNError_ServerCertificate_Expired,    /**< The server certificate has
    00613                                                 expired. */
    00614     VPNError_ServerCertificate_NotYetValid /**< The server certificate is not
    00615                                                 yet valid. */
    00616 };
    00617
    00618 enum CertAuthMode
    00619 {
    00620     CertAuth_Automatic, /**< Will try each available certificate in succession
    00621                              until authentication is obtained or we run out of
    00622                              available certificates */
    00623     CertAuth_Disabled,  /**< Will disable Certificate Based Authentication */
    00624     CertAuth_Manual     /**< Will only use preconfigured certificate to attempt
    00625                              Certificate Based Authentication */
    00626 };
    00627
    00628 enum CertificateType
    00629 {
    00630     CertificateType_Client,
    00631     CertificateType_SystemTrusted,
    00632     CertificateType_Server
    00633 };
    00634
    00635 enum CertConfirmReason
    00636 {
    00637     CertConfirmReason_Unspecified,
    00638     CertConfirmReason_NameMismatch,
    00639     CertConfirmReason_Expired,
    00640     CertConfirmReason_NotValidYet,
    00641     CertConfirmReason_UntrustedSource,
    00642     CertConfirmReason_InvalidUse,
    00643     CertConfirmReason_Revoked,
    00644     CertConfirmReason_Malformed,
    00645     CertConfirmReason_NotFipsCompliant,
    00646     CertConfirmReason_InvalidateDate,
    00647     CertConfirmReason_SignatureAlgorithm,
    00648     CertConfirmReason_KeySize
    00649 };
    00650
    00651 enum UserResponseError
    00652 {
    00653     UserResponseError_None,
    00654     UserResponseError_Unspecified,
    00655     UserResponseError_BadServerCert,
    00656     UserResponseError_SsoNavigation,
    00657     UserResponseError_SsoGettingCookie,
    00658     UserResponseError_SsoTimeout,
    00659     UserResponseError_SsoMissingDependency,
    00660     UserResponseError_SsoClientCertRequest,
    00661     UserResponseError_SsoAborted,
    00662 };
    00663
    00664 #if defined(__midl)
    00665 [v1_enum] /*serialize as 32 bits*/
    00666 #endif
    00667 enum ClientType
    00668 {
    00669     ClientType_GUI,
    00670     ClientType_GUI_SBL,
    00671     ClientType_CLI,
    00672     ClientType_MGMT
    00673 };
    00674
    00675 #endif // _APISTDHEADER_