![Fortinet FortiGate Voice 4.0 MR1 Administration Manual Download Page 62](http://html1.mh-extra.com/html/fortinet/fortigate-voice-4-0-mr1/fortigate-voice-4-0-mr1_administration-manual_2322091062.webp)
API reference
Using the FortiClient API
FortiClient Endpoint Security Version 4.0 MR1 Administration Guide
56
04-40001-99556-20090626
http://docs.fortinet.com/
•
Feedback
API reference
Table 6: Methods
Connect(bstrTunnelName As String)
Open the named VPN tunnel. This connection
must already be configured in your FortiClient
application.
Disconnect(bstrTunnelName As String)
Close the named VPN tunnel.
GetPolicy
(pbAV As Boolean,
pbAS As Boolean,
pbFW As Boolean,
pbWF As Boolean)
Retrieve security policy settings for
Antivirus
AntiSpam
Firewall
Web Filter
True means feature must be enabled.
GetRemainingKeyLife
(bstrTunnelName As String,
pSecs As Long,
pKBytes As Long)
Retrieve the remaining key life for the named
connection. Whether keylife time (pSecs) or data
(pKBytes) are significant depends on the detailed
settings in the FortiClient application.
MakeSystemPolicyCompliant()
Apply the security policy defined by SetPolicy.
SendXAuthResponse
(tunnelName As String,
userName As String,
password As String,
savePassword As Boolean)
Send XAuth credentials for the named connection:
User name
Password
True if password should be saved.
SetPolicy
(bAV As Boolean,
bAS As Boolean,
bFW As Boolean,
bWF As Boolean)
Set security policy settings for
Antivirus
AntiSpam
Firewall
Web Filter
True means feature must be enabled.
Table 7: Functions
GetActiveTunnel() As String
Retrieve the name of the active connection.
GetTunnelList()
Retrieve the list of all connections configured in the
FortiClient application.
IsConnected
(bstrTunnelName As String)
As Boolean
Return True if the named connection is up.
IsIdle(bstrTunnelName As String)
As Boolean
Return True if the named connection is idle.
Table 8: Events
OnConnect(bstrTunnelName As String)
Connection established.
OnDisconnect(bstrTunnelName As String)
Connection disconnected.
OnIdle(bstrTunnelName As String)
Connection idle.
OnOutOfCompliance(bAV As Boolean, bAS
As Boolean, bFW As Boolean, bWF As
Boolean)
FortiClient has gone out of compliance with
security policy. Arguments correspond to features.
True indicates the feature is out of compliance with
security policy.
OnXAuthRequest(bstrTunnelName As String) The VPN peer on the named connection requests
XAuth authentication.