Top | ![]() |
![]() |
![]() |
![]() |
ESourceProxyESourceProxy — ESource extension for network proxy settings |
The ESourceProxy extension defines a network proxy profile.
An ESource instance with this extension can serve as a
Access the extension as follows:
#include <libedataserver/libedataserver.h> ESourceProxy *extension; extension = e_source_get_extension (source, E_SOURCE_EXTENSION_PROXY);
EProxyMethod
e_source_proxy_get_method (ESourceProxy *extension
);
Returns the proxy configuration method for extension
.
The proxy configuration method determines the behavior of
e_source_proxy_lookup()
.
Since: 3.12
void e_source_proxy_set_method (ESourceProxy *extension
,EProxyMethod method
);
Sets the proxy configuration method for extension
.
The proxy configuration method determines the behavior of
e_source_proxy_lookup()
.
Since: 3.12
constgchar * e_source_proxy_get_autoconfig_url (ESourceProxy *extension
);
Returns the URL that provides proxy configuration values. When the
extension
's E_PROXY_METHOD_AUTO
, this URL
is used to look up proxy information for all protocols.
Since: 3.12
gchar * e_source_proxy_dup_autoconfig_url (ESourceProxy *extension
);
Thread-safe variation of e_source_proxy_get_autoconfig_url()
.
Use this function when accessing extension
from multiple threads.
The returned string should be freed with g_free()
Since: 3.12
void e_source_proxy_set_autoconfig_url (ESourceProxy *extension
,const
);gchar *autoconfig_url
Sets the URL that provides proxy configuration values. When the
extension
's E_PROXY_METHOD_AUTO
, this URL
is used to look up proxy information for all protocols.
Since: 3.12
constgchar * const * e_source_proxy_get_ignore_hosts (ESourceProxy *extension
);
Returns a NULL
The returned array is owned by extension
and should not be modified or
freed.
Since: 3.12
gchar ** e_source_proxy_dup_ignore_hosts (ESourceProxy *extension
);
Thread-safe variation of e_source_proxy_get_ignore_hosts()
.
Use this function when accessing extension
from multiple threads.
The returned string array should be freed with g_strfreev()
Since: 3.12
void e_source_proxy_set_ignore_hosts (ESourceProxy *extension
,const
);gchar * const *ignore_hosts
Sets the hosts which are connected to directly, rather than via the proxy (if it is active). The array elements can be hostnames, domains (using an initial wildcard like *.foo.com), IP host addresses (both IPv4 and IPv6) and network addresses with a netmask (something like 192.168.0.0/24).
Since: 3.12
constgchar * e_source_proxy_get_ftp_host (ESourceProxy *extension
);
Returns the machine name to proxy FTP through when extension
's
E_PROXY_METHOD_MANUAL
.
Since: 3.12
gchar * e_source_proxy_dup_ftp_host (ESourceProxy *extension
);
Thread-safe variation of e_source_proxy_get_ftp_host()
.
Use this function when accessing extension
from multiple threads.
The returned string should be freed with g_free()
Since: 3.12
void e_source_proxy_set_ftp_host (ESourceProxy *extension
,const
);gchar *ftp_host
Sets the machine name to proxy FTP through when extension
's
E_PROXY_METHOD_MANUAL
.
Since: 3.12
guint16 e_source_proxy_get_ftp_port (ESourceProxy *extension
);
Returns the port on the machine defined by extension
's E_PROXY_METHOD_MANUAL
.
Since: 3.12
void e_source_proxy_set_ftp_port (ESourceProxy *extension
,);
guint16 ftp_port
Sets the port on the machine defined by extension
's E_PROXY_METHOD_MANUAL
.
Since: 3.12
constgchar * e_source_proxy_get_http_host (ESourceProxy *extension
);
Returns the machine name to proxy HTTP through when extension
's
E_PROXY_METHOD_MANUAL
.
Since: 3.12
gchar * e_source_proxy_dup_http_host (ESourceProxy *extension
);
Thread-safe variation of e_source_proxy_get_http_host()
.
Use this function when accessing extension
from multiple threads.
The returned string should be freed with g_free()
Since: 3.12
void e_source_proxy_set_http_host (ESourceProxy *extension
,const
);gchar *http_host
Sets the machine name to proxy HTTP through when extension
's
E_PROXY_METHOD_MANUAL
.
Since: 3.12
guint16 e_source_proxy_get_http_port (ESourceProxy *extension
);
Returns the port on the machine defined by extension
's E_PROXY_METHOD_MANUAL
.
Since: 3.12
void e_source_proxy_set_http_port (ESourceProxy *extension
,);
guint16 http_port
Sets the port on the machine defined by extension
's E_PROXY_METHOD_MANUAL
.
Since: 3.12
gboolean e_source_proxy_get_http_use_auth (ESourceProxy *extension
);
Returns whether the HTTP proxy server at
The username/password combo is defined by extension
's
E_PROXY_METHOD_MANUAL
.
Since: 3.12
void e_source_proxy_set_http_use_auth (ESourceProxy *extension
,);
gboolean http_use_auth
Sets whether the HTTP proxy server at
The username/password combo is defined by extension
's
E_PROXY_METHOD_MANUAL
.
Since: 3.12
constgchar * e_source_proxy_get_http_auth_user (ESourceProxy *extension
);
Returns the user name to pass as authentication when doing HTTP proxying
and TRUE
Since: 3.12
gchar * e_source_proxy_dup_http_auth_user (ESourceProxy *extension
);
Thread-safe variation of e_source_proxy_get_http_auth_user()
.
Use this function when accessing extension
from multiple threads.
The returned string should be freed with g_free()
Since: 3.12
void e_source_proxy_set_http_auth_user (ESourceProxy *extension
,const
);gchar *http_auth_user
Sets the user name to pass as authentication when doing HTTP proxying
and TRUE
Since: 3.12
constgchar * e_source_proxy_get_http_auth_password (ESourceProxy *extension
);
Returns the password to pass as authentication when doing HTTP proxying
and TRUE
Since: 3.12
gchar * e_source_proxy_dup_http_auth_password (ESourceProxy *extension
);
Thread-safe variation of e_source_proxy_get_http_auth_password()
.
Use this function when accessing extension
from multiple threads.
The returned string should be freed with g_free()
Since: 3.12
void e_source_proxy_set_http_auth_password (ESourceProxy *extension
,const
);gchar *http_auth_password
Sets the password to pass as authentication when doing HTTP proxying
and TRUE
Since: 3.12
constgchar * e_source_proxy_get_https_host (ESourceProxy *extension
);
Returns the machine name to proxy secure HTTP through when extension
's
E_PROXY_METHOD_MANUAL
.
Since: 3.12
gchar * e_source_proxy_dup_https_host (ESourceProxy *extension
);
Threads-safe variation of e_source_proxy_get_https_host()
.
Use this function when accessing extension
from multiple threads.
The returned string should be freed with g_free()
Since: 3.12
void e_source_proxy_set_https_host (ESourceProxy *extension
,const
);gchar *https_host
Sets the machine name to proxy secure HTTP through when extension
's
E_PROXY_METHOD_MANUAL
.
Since: 3.12
guint16 e_source_proxy_get_https_port (ESourceProxy *extension
);
Returns the port on the machine defined by extension
's E_PROXY_METHOD_MANUAL
.
Since: 3.12
void e_source_proxy_set_https_port (ESourceProxy *extension
,);
guint16 https_port
Sets the port on the machine defined by extension
's E_PROXY_METHOD_MANUAL
.
Since: 3.12
constgchar * e_source_proxy_get_socks_host (ESourceProxy *extension
);
Returns the machine name to use as a SOCKS proxy when extension
's
E_PROXY_METHOD_MANUAL
.
Since: 3.12
gchar * e_source_proxy_dup_socks_host (ESourceProxy *extension
);
Thread-safe variation of e_source-proxy_get_socks_host()
extension
from multiple threads.
The returned string should be freed with g_free()
Since: 3.12
void e_source_proxy_set_socks_host (ESourceProxy *extension
,const
);gchar *socks_host
Sets the machine name to use as a SOCKS proxy when extension
's
E_PROXY_METHOD_MANUAL
.
Since: 3.12
guint16 e_source_proxy_get_socks_port (ESourceProxy *extension
);
Returns the port on the machine defined by extension
's E_PROXY_METHOD_MANUAL
.
Since: 3.12
void e_source_proxy_set_socks_port (ESourceProxy *extension
,);
guint16 socks_port
Sets the port on the machine defined by extension
's E_PROXY_METHOD_MANUAL
.
Since: 3.12
gchar ** e_source_proxy_lookup_sync (ESource *source
,const
,gchar *uri,
GCancellable *cancellable);
GError **error
Looks into source
's ESourceProxy extension to determine what proxy,
if any, to use to connect to uri
. The returned proxy URIs are of the
same form described by g_proxy_resolver_lookup()
The proxy extension's
When using E_PROXY_METHOD_DEFAULT
, the function will defer to the
g_proxy_resolver_get_default()
When using E_PROXY_METHOD_MANUAL
, the function will configure a
When using E_PROXY_METHOD_AUTO
, the function will execute a proxy
auto-config (PAC) file at
When using E_PROXY_METHOD_NONE
, the function will only return
direct://
.
If source
does not have an ESourceProxy extension, the function sets
error
to G_IO_ERROR_NOT_SUPPORTED
and returns NULL
Free the returned proxy URIs with g_strfreev()
source |
an ESource |
|
uri |
a URI representing the destination to connect to |
|
cancellable |
optional |
[allow-none] |
error |
return location for a |
Since: 3.12
void e_source_proxy_lookup (ESource *source
,const
,gchar *uri,
GCancellable *cancellable,
GAsyncReadyCallback callback);
gpointer user_data
Asynchronously determines what proxy, if any, to use to connect to uri
.
See e_source_proxy_lookup_sync()
for more details.
When the operation is finished, callback
will be called. You can then
call e_source_proxy_lookup_finish()
to get the result of the operation.
source |
an ESource |
|
uri |
a URI representing the destination to connect to |
|
cancellable |
optional |
[allow-none] |
callback |
a |
[scope async] |
user_data |
data to pass to the callback function. |
[closure] |
Since: 3.12
gchar ** e_source_proxy_lookup_finish (ESource *source
,,
GAsyncResult *result);
GError **error
Finishes the operation started with e_source_proxy_lookup()
.
Free the returned proxy URIs with g_strfreev()
Since: 3.12
#define E_SOURCE_EXTENSION_PROXY "Proxy"
Pass this extension name to e_source_get_extension()
to access
ESourceProxy. This is also used as a group name in key files.
Since: 3.12
struct ESourceProxy { };
Contains only private data that should be read and manipulated using the functions below.
Since: 3.12