AnyConnect Secure Mobility Client COM API 4.7.03052

VpnApi.idl

00001 /**************************************************************************
00002 *       Copyright (c) 2008, Cisco Systems, All Rights Reserved
00003 ***************************************************************************
00004 *  
00005 *  File:    VpnApi.idl -- interface definition of the AnyConnect 
00006 *                         VPN API COM wrapper.
00007 *  Author:  Vincent E. Parla
00008 *  Date:    07/14/2008
00009 *
00010 **************************************************************************/
00011 
00012 /** @defgroup COM_API COM API 
00013 * This is the interface definition of the AnyConnect Secure Mobility VPN API COM wrapper.
00014 * Users of the COM API will #import vpnapi.dll to obtain the interface, method
00015 * and enumerator defintions.  
00016 * The .idl file is included in documentation for reference purposes only.
00017 *
00018 * NOTE: This interface specification is not immutable and can be broken by future versions.
00019 *       It is expected that your code will be recompiled / refactored to match the version
00020 *       of client installed on the system.
00021 *
00022 *  @{
00023 */
00024 import "oaidl.idl";
00025 import "ocidl.idl";
00026 import "api.h";                 /*obtain the api enumerators to embed in the type library*/
00027 import "VpnApiStringEnums.h";   /*obtain the string table enumerators to embed in the type library*/
00028 import "RegValueUpgradeCodes.h";/*obtain the upgrade code enumerator to embed in the type library*/
00029 
00030 cpp_quote("#ifdef __cplusplus")
00031 cpp_quote("    using namespace VpnApiStringEnums;")
00032 cpp_quote("#endif //__cplusplus")
00033 
00034     interface IVpnApiEvents;        //forward declaration of the IVpnApiEvents callback interface.
00035     interface IVpnStats;            //forward declaration of the IVpnStats interface.
00036     interface IConnectPromptInfo;   //forward declaration of the IConnectPromptInfo interface.
00037     interface IPromptEntry;         //forward declaration of the IPromptEntry interface.
00038     interface IPreferenceInfo;      //forward declaration of the IPreferenceInfo interface.
00039     interface IPreference;          //forward declaration of the IPreference interface.
00040 
00041     interface IStringCollection;    //forward declaration of the string collection utility interface
00042     interface IInterfaceCollection; //forward declaration of the interface collection utilty interface.
00043 
00044     /**
00045     * interface IVpnApi
00046     * Cisco AnyConnect Secure Mobility Client VPN API IDispatch interface specification.  This is the VPN API COM Server instantiated by the user via CoCreateInstance.
00047     */
00048     [
00049         object,
00050         uuid(027E04AD-347B-4E63-9E10-00BACB3970C8),
00051         oleautomation,
00052         nonextensible,
00053         dual,
00054         helpstring("Cisco AnyConnect Secure Mobility Client VPN API IVpnApi Interface specification.  This is the VPN API COM Server instantiated by the user via CoCreateInstance."),
00055         pointer_default(unique)
00056     ]
00057     interface IVpnApi : IDispatch
00058     {
00059         [id(1), helpstring("method Register. This is a convenience method for attaching one or more callback interface(s) without using the IConnectionPoint interface directly.")] 
00060         HRESULT Register([in] IVpnApiEvents * pVpnApiEvents, [out, retval] DWORD * pdwCookie);
00061         
00062         [id(2), helpstring("method Unregister. This is a convenience method for detaching a callback interface without using the IConnectionPoint interface directly.")] 
00063         HRESULT Unregister([in] DWORD dwCookie);
00064 
00065         [id(3), helpstring("method Attach. This is the first method that is called to configure the VPN API engine.  An event callback IVpnApiEvents is assumed to be already associated, prior to calling this method.  Languages like C# would use this method after wiring up the events.")]
00066         HRESULT Attach([in, defaultvalue(ClientType_GUI)] enum ClientType clientType,
00067                        [in, defaultvalue(-1)/*true*/] VARIANT_BOOL bRequestFullCapabilities,
00068                        [in, defaultvalue(-1)/*true*/] VARIANT_BOOL bSuppressAutoConnect);
00069        
00070         [id(4), helpstring("method Detach. This is the last method that is called to terminate the VPN API engine. Languages like C# would use this method after wiring up the events.")] 
00071         HRESULT Detach();
00072 
00073         [id(5), helpstring("method RegisterAndAttach. This method combines Register and Attach into a single convenience method.  This supports only one IVpnApiEvents instance per IVpnApi instance.  Languages that handle connection points under the covers, like C#, would not use this method, but would instead simply use Attach().")]
00074         HRESULT RegisterAndAttach([in] IVpnApiEvents * pVpnApiEvents, 
00075                                   [in, defaultvalue(ClientType_GUI)] enum ClientType clientType,
00076                                   [in, defaultvalue(-1)/*true*/] VARIANT_BOOL bRequestFullCapabilities,
00077                                   [in, defaultvalue(-1)/*true*/] VARIANT_BOOL bSuppressAutoConnect);
00078        
00079         [id(6), helpstring("method UnregisterAndDetach. This method combines Unregister and Detach into a single convenience method.  This supports only one IVpnApiEvents instance per IVpnApi instance. Languages that handle connection points under the covers, like C#, would not use this method, but would instead simply use Detach().")] 
00080         HRESULT UnregisterAndDetach();
00081  
00082         [id(7), propput, helpstring("property EnableConsumerDrivenEventModel.  Call this before attaching, to enable a consumer-driven event model.  This enables the IVpnApiEvents::VpnEventAvailableNotification.  It's required to always enable this as the old event model is deprecated.")] 
00083         HRESULT EnableConsumerDrivenEventModel([in] VARIANT_BOOL bEnable);
00084 
00085         [id(8), helpstring("method ProcessEvents. Use this method if the consumer-driven event model is configured and an IVpnApiEvents::VpnEventAvailableNotification was fired.")] 
00086         HRESULT ProcessEvents();
00087 
00088         [id (9), propget, helpstring("property HasFullCapabilities.  Indicates whether this instance of the VPN API engine is the master instance.")] 
00089         HRESULT HasFullCapabilities([out, retval] VARIANT_BOOL* pbHasFullCapabilities);
00090         
00091         [id(10), propget, helpstring("property IsConnected.  Indicates that there is a VPN connection.")]
00092         HRESULT IsConnected([out, retval] VARIANT_BOOL* pbIsConnected);
00093 
00094         [id(11), propget, helpstring("property IsVPNServiceAvailable.  Indicates that the VPN Service is active. (This is also delivered to the IVpnApiEvents callback.)")]
00095         HRESULT IsVPNServiceAvailable([out, retval] VARIANT_BOOL* pbIsVPNServiceAvailable);
00096         
00097         [id(12), propget, helpstring("property HostNames.  Obtains a collection of hostname strings from the profile.")] 
00098         HRESULT HostNames([out, retval] IStringCollection** ppIStringCollection);
00099 
00100         [id(13), propget, helpstring("property DefaultHostName.  Obtains the default hostname from the profile or the last hostname from a previous connection.")] 
00101         HRESULT DefaultHostName([out, retval] BSTR* pstrGetDefaultHostName);
00102         
00103         [id(14), helpstring("method ConnectVpn.  Connects to the secure gateway using a hostname or ip address.")] 
00104         HRESULT ConnectVpn([in] BSTR strHostNameOrAddress);
00105         
00106         [id(15), helpstring("method DisconnectVpn.  Disconnects from the secure gateway VPN session")] 
00107         HRESULT DisconnectVpn();
00108 
00109         [id(16), helpstring("method GetState.  Causes the VPN API engine to invoke the IVpnApiEvents::VpnStateNotification method to deliver the current state.")] 
00110         HRESULT GetState();
00111 
00112         [id(17), helpstring("method ResetStats.  Resets the the internal stat counters back to initial values.")] 
00113         HRESULT ResetStats();
00114 
00115         [id(18), helpstring("method StartStats.  Starts the automatic stats notification mechanism.  This results in IVpnApiEvents::VpnStatsNotification being fired periodically.")]
00116         HRESULT StartStats();
00117 
00118         [id(19), helpstring("method StopStats.  Stops the automatic stats notification mechanism.")] 
00119         HRESULT StopStats();
00120 
00121         [id(20), helpstring("method UserSubmit.  The caller must release the IConnectPromptInfo object, obtained from IVpnApiEvents::VpnUserPromptNotification, prior to calling this method.")] 
00122         HRESULT UserSubmit();
00123 
00124         [id(21), propget, helpstring("property Preferences.  Obtains a collection of IPreference interface instances.")] 
00125         HRESULT Preferences([out, retval] IPreferenceInfo** ppPreferenceInfo);
00126   
00127         [id(22), helpstring("method SavePreferences.  The caller must release the IPreferenceInfo object prior to calling this method.")] 
00128         HRESULT SavePreferences();
00129 
00130         [id(23), propput, helpstring("property BannerResponse.  Call this with the user response to the banner.")] 
00131         HRESULT BannerResponse([in] VARIANT_BOOL bResponse);
00132 
00133         [id(24), propget, helpstring("property OperatingMode.  Indicates if an operating mode is enabled.")] 
00134         HRESULT IsOperatingMode([in] enum OperatingMode eOperatingMode, [out, retval] VARIANT_BOOL* pbIsEnabled);
00135 
00136         [id(25), helpstring("method GetStats.  Causes the VPN API engine to invoke the IVpnApiEvents::VpnStatsNotification method to deliver the current stats.")] 
00137         HRESULT GetStats();
00138 
00139         [id(26), propget, helpstring("property LastVpnError.  Indicates the last error seen while establishing VPN.")] 
00140         HRESULT LastVpnError([out, retval] enum VPNError* peLastVpnError);
00141 
00142         [id(27), propput, helpstring("property CertBlockedResponse.  Call this with the user response to the CertBlockedCB.")]
00143         HRESULT CertBlockedResponse([in] VARIANT_BOOL bUnblock);
00144 
00145         [id(28), propput, helpstring("property CertWarningResponse.  Call this with the user response to the CertWarningCB.")]
00146         HRESULT CertWarningResponse([in] VARIANT_BOOL bConnect, [in] VARIANT_BOOL bImport);
00147 
00148         [id(99), propget, helpstring("property VpnStatsTranslatedLabel.  Allows for pre-fetching translated labels for various VPN statistics prior to obtaining an IVpnStats interface")] 
00149         HRESULT VpnStatsTranslatedLabel([in] enum VPNStatsTag eVPNStatsTag, [out, retval] BSTR* pstrTranslatedLabel);
00150 
00151         
00152         //methods used to obtain the registry key and value to query to determine when a vpn software upgrade is completed.
00153         //
00154         [id(998), propget, helpstring("property UpgradeRegistryKeyName.  returns the name of the registry key to monitor for core software upgrade completions.")]
00155         HRESULT UpgradeRegistryKeyName([out, retval] BSTR* pstrUpgradeRegistryKeyName);
00156         [id(999), propget, helpstring("property UpgradeRegistryValueName.  returns the name of the registry value to query for core software upgrade completions when the key change is notified.")]
00157         HRESULT UpgradeRegistryValueName([out, retval] BSTR* pstrUpgradeRegistryValueName);
00158     };
00159 
00160     /**
00161     * interface IVpnApiEvents
00162     * Cisco AnyConnect Secure Mobility Client VPN API Event Callback IDispatch interface specification.  This is the VPN API COM Event Callback interface that a developer implements and passes to the COM Server using the Attach, RegisterAndAttach, or indirectly via connection points in languages such as C#.
00163     */
00164     [
00165         object,
00166         uuid(5D446DC1-A494-4D3D-B5AD-0ADACB3B3EE3),
00167         oleautomation,
00168         nonextensible,
00169         dual,
00170         helpstring("Cisco AnyConnect Secure Mobility Client VPN API IVpnApiEvents callback Interface specification.  A user of the VpnApi COM Server provides this interface to receive event notifications."),
00171         pointer_default(unique)
00172     ]
00173     interface IVpnApiEvents : IDispatch
00174     { 
00175         [id(1000), helpstring("method VpnStatsNotification.  Callback containing a IVpnStats object to be queried for stats.")] 
00176         HRESULT VpnStatsNotification([in] IVpnStats * pVpnStats);
00177 
00178         [id(1001), helpstring("method VpnStateNotification.  Callback containing the state of the VPN session")]
00179         HRESULT VpnStateNotification([in] enum VPNState eState, [in] enum VPNSubState eSubState, [in] BSTR strState);
00180 
00181         [id(1002), helpstring("method VpnBannerNotification.  Callback containing a Banner notification string.")]
00182         HRESULT VpnBannerNotification([in] BSTR strBannerMessage);
00183 
00184         [id(1003), helpstring("method VpnStateNotification.  Callback containing a notice pertaining to the VPN session")]
00185         HRESULT VpnNoticeNotification([in] BSTR strNoticeMessage, [in] enum MessageType eMessageType);
00186 
00187         [id(1004), helpstring("method VpnExitNotification.  Callback containing a notice indicating to shutdown the VPN API release to COM component.")]
00188         HRESULT VpnExitNotification([in] BSTR strExitMessage, [in] long exitCode);
00189 
00190         [id(1005), helpstring("method VpnServiceReadyNotification.  Callback indicating the VPN Service is online")] /*this could be a prop_put*/
00191         HRESULT VpnServiceReadyNotification();
00192 
00193         [id(1006), helpstring("method VpnUserPromptNotification.  Callback indicating the VPN Service is online")] /*this could be a prop_put*/
00194         HRESULT VpnUserPromptNotification([in] IConnectPromptInfo * pConnectPromptInfo);
00195 
00196         [id(1007), helpstring("method VpnWMHintNotification.  Callback containing UI behavior hint and reason.")]
00197         HRESULT VpnWMHintNotification([in] enum WMHint eHint, [in] enum WMHintReason eReason);
00198 
00199         [id(1008), helpstring("method VpnWebLaunchHostNotification.  Callback containing the Active Host pertaining to the VPN session")]
00200         HRESULT VpnWebLaunchHostNotification([in] BSTR strActiveHost);
00201 
00202         [id(1009), helpstring("method VpnEventAvailableNotification.  Callback indicating an API Event is available to consume.  This notification is sent only if configured to use the consumer-driven event model.  A COM user then calls IVpnApi::ProcessEvents.")]/*this could be a prop_put*/
00203         HRESULT VpnEventAvailableNotification();
00204 
00205         [id(1010), helpstring("method VpnCertBlockedNotification.  Callback indicating strUntrustedServer is an untrusted server.")]
00206         HRESULT VpnCertBlockedNotification([in] BSTR strUntrustedServer);
00207 
00208         [id(1011), helpstring("method VpnCertWarningNotification.  Callback indicating strUntrustedServer is an untrusted server because of the certificate errors in pCertErrors.")]
00209         HRESULT VpnCertWarningNotification([in] BSTR strUntrustedServer, [in] IStringCollection *pCertErrors, [in] VARIANT_BOOL bImportAllowed);
00210     };
00211 
00212     /**
00213     * interface IVpnStats
00214     * Cisco AnyConnect Secure Mobility Client VPN API Statistics IDispatch interface specification.  This is a non-creatable interface that is passed to via an Event Callback method and represents a VPN Statistics object.
00215     */
00216     [
00217         object,
00218         uuid(42B1B1F3-5E1E-4d5d-9C59-2E484C726CE6),
00219         oleautomation,
00220         nonextensible,
00221         dual,
00222         helpstring("Cisco AnyConnect Secure Mobility Client VPN API IVpnStats Interface specification."),
00223         pointer_default(unique)
00224     ]
00225     interface IVpnStats : IDispatch
00226     { 
00227         [id(100), propget, helpstring("property SecureRoutes.  Obtains a collection of IRouteInfo interface instances.")] 
00228         HRESULT SecureRoutes([out, retval] IInterfaceCollection** ppSecureRouteInfoCollection);
00229         
00230         [id(101), propget, helpstring("property NonsecureRoutes.  Obtains a collection of IRouteInfo interface instances.")] 
00231         HRESULT NonsecureRoutes([out, retval] IInterfaceCollection** ppNonsecureRouteInfoCollection);
00232         
00233         [id(102), propget, helpstring("property ProtocolInfo.  Obtains a collection of IProtocolInfo interface instances.")] 
00234         HRESULT ProtocolInfo([out, retval] IInterfaceCollection** ppProtocolInfoCollection);
00235         
00236         [id(103), propget, helpstring("property FirewallInfo.  Obtains a collection of IFirewallInfo interface instances.")] 
00237         HRESULT FirewallInfo([out, retval] IInterfaceCollection** ppFirewallInfoCollection);
00238         
00239         [id(DISPID_VALUE), propget, helpstring("property StatValue.  Obtains the value for various VPN statistics associated IVpnStats interface. (NOTE: This is functionally the same as GetVpnStatsTranslatedLabel.)")] 
00240         HRESULT StatValue([in] enum VPNStatsTag eVPNStatsTag, [out,retval] BSTR* pstrStatValue);
00241 
00242         [id(104), propget, helpstring("property TranslatedLabel.  Obtains the translated labels for various VPN statistics associated IVpnStats interface. (NOTE: This is functionally the same as GetVpnStatsTranslatedLabel.)")] 
00243         HRESULT TranslatedLabel([in] enum VPNStatsTag eVPNStatsTag, [out,retval] BSTR* pstrTranslatedLabel);
00244     };
00245 
00246     /**
00247     * interface IConnectPromptInfo
00248     * Cisco AnyConnect Secure Mobility Client VPN API Connection Prompt IDispatch interface specification.  This is a non-creatable interface that is passed to via an Event Callback method and represents a VPN Connect Prompt Information object.
00249     */
00250     [
00251         object,
00252         uuid(811A60FE-D3E0-4fe6-B627-30723A93554C),
00253         oleautomation,
00254         nonextensible,
00255         dual,
00256         helpstring("Cisco AnyConnect Secure Mobility Client VPN API IConnectPromptInfo Interface specification."),
00257         pointer_default(unique)
00258     ]
00259     interface IConnectPromptInfo : IDispatch
00260     { 
00261         [id(200), propget, helpstring("property ConnectPromptType.  The type of prompt entry.")] 
00262         HRESULT ConnectPromptType([out, retval] enum ConnectPromptType* peConnectPromptType);
00263 
00264         [id(201), propget, helpstring("property CountPromptEntry.  The number of prompt entries in the collection.")] 
00265         HRESULT CountPromptEntry([out, retval] unsigned long* pulEntryCount);
00266         
00267         [id(202), propget, helpstring("property Message.  Provides a message associated with the credentials being entered.")] 
00268         HRESULT Message([out, retval] BSTR* pMessage);
00269         
00270         [id(203), propget, helpstring("property PromptNames.  Obtains a collection of prompt name strings if available.")] 
00271         HRESULT PromptNames([out, retval] IStringCollection** ppPromptNamesCollection);
00272 
00273         [id(DISPID_VALUE), propget, helpstring("property PromptEntry. Obtains a prompt entry based on a tag value provided.")]
00274         HRESULT PromptEntry([in] BSTR strPromptName, [out, retval] IPromptEntry ** ppPromptEntry);
00275 
00276         [id(205), propget, helpstring("property PromptEntries.  Obtains a collection of prompt entries.")] 
00277         HRESULT PromptEntries([out, retval] IInterfaceCollection** ppPromptEntriesCollection);
00278 
00279         [id(206), propget, helpstring("property HasAuthenticationError.  Indicates whether an authentication error has occurred.")]
00280         HRESULT HasAuthenticationError([out, retval] VARIANT_BOOL* pbAuthErr);
00281         
00282         [id(207), propget, helpstring("property SubmitButtonName. Provides the name to be used for the Submit Button.")] 
00283         HRESULT SubmitButtonName([out, retval] BSTR* pstrSubmitButton);
00284         
00285         [id(208), propget, helpstring("property HasEnrollmentCA. Indicates an Enrollment CA is available.")] 
00286         HRESULT HasEnrollmentCA([out, retval] VARIANT_BOOL* pbCAAvailable);
00287         
00288         [id(209), propput, helpstring("property UseEnrollmentCA.  Inform the VPN API to use the Enrollement CA.")] 
00289         HRESULT UseEnrollmentCA([in] VARIANT_BOOL bUseCA);
00290         
00291         [id(210), propput, helpstring("property TunnelGroup.  Allows the setting of the currently selected Tunnel group")] 
00292         HRESULT TunnelGroup([in] BSTR strSelectedTunnelGroup);
00293 
00294         [id(211), propget, helpstring("property IsCanceled.  Indicates if the user has canceled the prompt.")] 
00295         HRESULT IsCanceled([out, retval] VARIANT_BOOL* pbIsCanceled);
00296 
00297         [id(212), propput, helpstring("property Canceled.  Inform the VPNAPI that the user has canceled the prompt.")] 
00298         HRESULT Canceled([in] VARIANT_BOOL bIsCanceled);
00299     };
00300 
00301     /**
00302     * interface IVpnStats
00303     * Cisco AnyConnect Secure Mobility Client VPN API Prompt Entry IDispatch interface specification.  This is a non-creatable interface that is contains Prompt Entry information.
00304     */
00305     [
00306         object,
00307         uuid(548A1F06-AECE-4506-8ABB-5E3D3A99B67B),
00308         oleautomation,
00309         nonextensible,
00310         dual,
00311         helpstring("Cisco AnyConnect Secure Mobility Client VPN API IPromptEntry Interface specification."),
00312         pointer_default(unique)
00313     ]
00314     interface IPromptEntry : IDispatch
00315     { 
00316         [id(301), propget, helpstring("property Value. Gets the current value for the prompt entry.")] 
00317         HRESULT Value([out, retval] BSTR* pstrValue);
00318 
00319         [id(301), propput, helpstring("property Value.  Sets a value explicitly for a prompt entry.")] 
00320         HRESULT Value([in] BSTR strValue);
00321 
00322         [id(302), propget, helpstring("property PromptName.  This is the non-translated prompt.")] 
00323         HRESULT PromptName([out, retval] BSTR* pstrPromptName);
00324 
00325         [id(303), propget, helpstring("property PromptLabel.  This is the translated prompt.")] 
00326         HRESULT PromptLabel([out, retval] BSTR* pstrPromptLabel);
00327 
00328         [id(304), propget, helpstring("property PromptType.  Obtains the type of prompt (for example, password), etc.")] 
00329         HRESULT PromptType([out, retval] enum PromptType* pPromptType);
00330 
00331         [id(305), propget, helpstring("property IsEnabled.  Indicates whether this should be user editable.")] 
00332         HRESULT IsEnabled([out, retval] VARIANT_BOOL* pbIsEnabled);
00333 
00334         [id(306), propget, helpstring("property IsVisible.  Indicates whether this should be displayed to the user.")] 
00335         HRESULT IsVisible([out, retval] VARIANT_BOOL* pbIsVisible);
00336 
00337         [id(307), propget, helpstring("property ValueOptions.  Obtains a collection of value option strings.")] 
00338         HRESULT ValueOptions([out, retval] IStringCollection** ppValueOptionsCollection);
00339 
00340         [id(308), propget, helpstring("property IsEntryGroup")] 
00341         HRESULT IsEntryGroup([out, retval] VARIANT_BOOL* pbIsEntryGroup);
00342     };
00343 
00344     /**
00345     * interface IRouteInfo
00346     * Cisco AnyConnect Secure Mobility Client VPN API Route Information IDispatch interface specification.  This is a non-creatable interface that represents a Route Information object.
00347     */
00348     [
00349         object,
00350         uuid(02E2AE5E-A8C8-458e-92B0-B72B322B623C),
00351         oleautomation,
00352         nonextensible,
00353         dual,
00354         helpstring("Cisco AnyConnect Secure Mobility Client VPN API IRouteInfo Interface specification."),
00355         pointer_default(unique)
00356     ]
00357     interface IRouteInfo : IDispatch
00358     { 
00359         [id(401), propget, helpstring("property Network route")] 
00360         HRESULT Network([out, retval] BSTR* pstrNetwork);
00361 
00362         [id(402), propget, helpstring("property Subnet for the route.")] 
00363         HRESULT Subnet([out, retval] BSTR* pstrSubnet);
00364     };
00365 
00366     /**
00367     * interface IProtocolInfo
00368     * Cisco AnyConnect Secure Mobility Client VPN API Protocol Information IDispatch interface specification.  This is a non-creatable interface that represents a Protocol Information object.
00369     */
00370     [
00371         object,
00372         uuid(A0D63CA4-68E6-44e8-8738-19D6E4BC82BE),
00373         oleautomation,
00374         nonextensible,
00375         dual,
00376         helpstring("Cisco AnyConnect Secure Mobility Client VPN API IProtocolInfo Interface specification."),
00377         pointer_default(unique)
00378     ]
00379     interface IProtocolInfo : IDispatch
00380     { 
00381         [id(501), propget, helpstring("property ProtocolLabel.  Obtain a protocol label string from the enumerated type.")] 
00382         HRESULT ProtocolLabel([in] enum ProtocolInfoTag eProtocolInfoTag, 
00383                               [out, retval] BSTR* pstrProtocolLabel);
00384 
00385         [id(DISPID_VALUE), propget, helpstring("property ProtocolValue.  Obtain a protocol value string from the enumerated type.")] 
00386         HRESULT ProtocolValue([in] enum ProtocolInfoTag eProtocolInfoTag, 
00387                               [out, retval] BSTR* pstrProtocolValue);
00388 
00389         [id(503), propget, helpstring("property IsActive.  Indicates if the protocol is active.")] 
00390         HRESULT IsActive([out, retval] VARIANT_BOOL * pbIsActive);
00391     };
00392 
00393     /**
00394     * interface IFirewallInfo
00395     * Cisco AnyConnect Secure Mobility Client VPN API Firewall Information IDispatch interface specification.  This is a non-creatable interface that represents a Firweall Information object containing firewall rule information.
00396     */
00397     [
00398         object,
00399         uuid(F71DC93F-C07D-44a3-95B4-864177AE0F7E),
00400         oleautomation,
00401         nonextensible,
00402         dual,
00403         helpstring("Cisco AnyConnect Secure Mobility Client VPN API IFirewallInfo Interface specification."),
00404         pointer_default(unique)
00405     ]
00406     interface IFirewallInfo : IDispatch
00407     { 
00408         [id(541), propget, helpstring("property Permission of a firewall rule")] 
00409         HRESULT Permission([out, retval] BSTR* pstrPermission);
00410 
00411         [id(542), propget, helpstring("property Protocol for a firewall rule.")] 
00412         HRESULT Protocol([out, retval] BSTR* pstrProtocol);
00413 
00414         [id(543), propget, helpstring("property Interface for a firewall rule.")] 
00415         HRESULT Interface([out, retval] BSTR* pstrInterface);
00416 
00417         [id(544), propget, helpstring("property Source Port Range for a firewall rule.")] 
00418         HRESULT SrcPortRange([out, retval] BSTR* pstrSrcPortRange);
00419 
00420         [id(545), propget, helpstring("property Destination Port Range for a firewall rule.")] 
00421         HRESULT DstPortRange([out, retval] BSTR* pstrDstPortRange);
00422 
00423         [id(546), propget, helpstring("property Destination Address for a firewall rule.")] 
00424         HRESULT DstAddr([out, retval] BSTR* pstrDstAddr);
00425     };
00426 
00427 
00428     /**
00429     * interface IPreferenceInfo
00430     * Cisco AnyConnect Secure Mobility Client VPN API User Preference Information IDispatch interface specification.  This is a non-creatable interface that represents a User Preference Information object.
00431     */
00432     [
00433         object,
00434         uuid(3E73BCCD-C4E4-4842-AB58-9F973E7D226F),
00435         oleautomation,
00436         nonextensible,
00437         dual,
00438         helpstring("Cisco AnyConnect Secure Mobility Client VPN API IPreferenceInfo Interface specification."),
00439         pointer_default(unique)
00440     ]
00441     interface IPreferenceInfo : IDispatch
00442     {
00443         [id(601), propget, helpstring("property CountPreferences.  The number of preferences available.")]
00444         HRESULT CountPreferences([out, retval] unsigned long * pulCountPreferences);
00445   
00446         [id(DISPID_VALUE), propget, helpstring("property Preference.  Gets the instance of an IPreference interface associated with the preference tag.")]
00447         HRESULT Preference([in] enum PreferenceId ePreferenceId, [out, retval] IPreference** ppPreference);
00448 
00449         [id(603), propget, helpstring("property Preferences.  Obtains a collection of IPreference interface instances.")] 
00450         HRESULT Preferences([out, retval] IInterfaceCollection** ppPreferencesCollection);
00451 
00452         [id(604), propget, helpstring("property PreferenceHeading.  The heading string for preferences.")]
00453         HRESULT PreferenceHeading([out, retval] BSTR * pstrPreferenceHeading);
00454     };
00455 
00456     /**
00457     * interface IPreference
00458     * Cisco AnyConnect Secure Mobility Client VPN API Usser Preference IDispatch interface specification.  This is a non-creatable interface that represents a User Preference object.
00459     */
00460     [
00461         object,
00462         uuid(01F3D78C-AC49-48d1-8782-0EB481961341),
00463         oleautomation,
00464         nonextensible,
00465         dual,
00466         helpstring("Cisco AnyConnect Secure Mobility Client VPN API IPreference Interface specification."),
00467         pointer_default(unique)
00468     ]
00469     interface IPreference : IDispatch
00470     {
00471         [id(701), propget, helpstring("property PreferenceValue. Gets the current value for the preference entry.")] 
00472         HRESULT PreferenceValue([out, retval] BSTR* pstrPreferenceValue);
00473 
00474         [id(701), propput, helpstring("property PreferenceValue. Sets the value explicitly for a preference entry.")] 
00475         HRESULT PreferenceValue([in] BSTR strPreferenceValue);
00476         
00477         [id(703), propget, helpstring("property PreferenceId. Gets the preference identifier enumeration value for the preference entry.")] 
00478         HRESULT PreferenceId([out, retval] enum PreferenceId * pPreferenceId);
00479 
00480         [id(704), propget, helpstring("property Children.  Obtains a collection of IPreference interface instances that are sub-entries of this preference.")] 
00481         HRESULT Children([out, retval] IInterfaceCollection** ppChildPreferencesCollection);
00482 
00483         [id(705), propget, helpstring("property PromptEntry. Obtains a prompt entry instance associated with this preference.")]
00484         HRESULT PromptEntry([out, retval] IPromptEntry ** ppPromptEntry);
00485     };
00486 
00487 
00488     //Collection interfaces//
00489 
00490     /**
00491     * interface IStringCollection
00492     * Cisco AnyConnect Secure Mobility Client VPN API String Collection IDispatch interface specification.  This is a non-creatable interface that represents a Collection of Strings.
00493     */
00494     [
00495         object,
00496         uuid(6292ECAC-42CD-43ea-A96C-0C072772B4BE),
00497         oleautomation,
00498         nonextensible,
00499         dual,
00500         helpstring("Cisco AnyConnect Secure Mobility Client VPN API Utility String Collection Interface specification."),
00501         pointer_default(unique)
00502     ]
00503     interface IStringCollection : IDispatch
00504     {
00505         [id(DISPID_NEWENUM), propget, helpstring("method _NewEnum.  Obtains a new String Collection enumerator interface.")]
00506         HRESULT _NewEnum([out, retval] IUnknown** ppUnk);
00507 
00508         [id(DISPID_VALUE), propget, helpstring("property Item.  Obtains a string object in the collection.  NOTE: collections are 1's based indexing.")]
00509         HRESULT Item([in] long nIndex, [out, retval] BSTR* pString);
00510 
00511         [id(1), propget, helpstring("property Count.  Obtains the count of the number of objects in the collection.")] 
00512         HRESULT Count([out, retval] long * pCount);
00513     };
00514 
00515     /**
00516     * interface IStringCollection
00517     * Cisco AnyConnect Secure Mobility Client VPN API Interface Collection IDispatch interface specification.  This is a non-creatable interface that represents a Collection of Interface instances of objects.
00518     */
00519     [
00520         object,
00521         uuid(E0854B5E-16D3-46b5-8767-420EB1F48041),
00522         oleautomation,
00523         nonextensible,
00524         dual,
00525         helpstring("Cisco AnyConnect Secure Mobility Client VPN API Utility IUnknown Collection Interface specification."),
00526         pointer_default(unique)
00527     ]
00528     interface IInterfaceCollection : IDispatch
00529     {
00530         [id(DISPID_NEWENUM), propget, helpstring("property _NewEnum.  Obtains a new Interface Collection enumerator interface.")]
00531         HRESULT _NewEnum([out, retval] IUnknown** ppUnk);
00532 
00533         [id(DISPID_VALUE), propget, helpstring("property Item.  Obtains an IUnknown interface for an object in the collection.  The user would then QI for the actual interface they wanted to obtain.  NOTE: collections are 1's based indexing.")]
00534         HRESULT Item([in] long nIndex, [out, retval] IUnknown** ppInterface);
00535 
00536         [id(1), propget, helpstring("property Count.  Obtains the count of the number of objects in the collection.")] 
00537         HRESULT Count([out, retval] long * pCount);
00538     };
00539 
00540 /////////////////////////////////////// VPN API Type Library //////////////////////////////////////
00541 [
00542     uuid(C15C09AE-FCCE-9221-FFA2-7465FEAAE55A),
00543     version(1.0),
00544     helpstring("Cisco AnyConnect Secure Mobility Client VPN API 1.0 Type Library")
00545 ]
00546 library VpnApiLib
00547 {
00548     importlib("stdole32.tlb");
00549     importlib("stdole2.tlb");
00550 
00551     [
00552         uuid(C15C0F4F-DDFB-4591-AD53-C9A71C9C15C0),
00553         helpstring("VpnApi Class")
00554     ]
00555     coclass VpnApi
00556     {
00557         [default] interface IVpnApi;
00558         [default, source] dispinterface IVpnApiEvents;
00559     };
00560 
00561     interface IRouteInfo;
00562     interface IProtocolInfo;
00563     interface IFirewallInfo;
00564     enum RegValueUpgradeCodesTag;
00565 }
00566 
00567 /** @} */