Top | ![]() |
![]() |
![]() |
![]() |
gboolean | e_oauth2_services_is_supported () |
EOAuth2Services * | e_oauth2_services_new () |
void | e_oauth2_services_add () |
void | e_oauth2_services_remove () |
GSList * | e_oauth2_services_list () |
EOAuth2Service * | e_oauth2_services_find () |
EOAuth2Service * | e_oauth2_services_guess () |
gboolean | e_oauth2_services_is_oauth2_alias () |
gboolean | e_oauth2_services_is_oauth2_alias_static () |
The extensible object, which holds all known OAuth2 services. Each
EOAuth2Service extends this object and adds itself to it with
e_oauth2_services_add()
. The services can be later searched for
with e_oauth2_services_find()
, which returns the service suitable
for the given protocol and/or host name.
gboolean
e_oauth2_services_is_supported (void
);
TRUE
, when evolution-data-server had been compiled
with OAuth2 authentication enabled, FALSE
otherwise.
Since: 3.28
EOAuth2Services *
e_oauth2_services_new (void
);
Creates a new EOAuth2Services instance.
Since: 3.28
void e_oauth2_services_add (EOAuth2Services *services
,EOAuth2Service *service
);
Adds the service
to the list of known OAuth2 services into services
.
It also adds a reference to service
.
Since: 3.28
void e_oauth2_services_remove (EOAuth2Services *services
,EOAuth2Service *service
);
Removes the service
from the list of known services in services
.
The function does nothing, if the service
had not been added.
Since: 3.28
GSList *
e_oauth2_services_list (EOAuth2Services *services
);
Lists all currently known services, which had been added
with e_oauth2_services_add()
. Free the returned GSList with
g_slist_remove_full (known_services, g_object_unref);
when no longer needed.
a newly allocated GSList with all currently known EOAuth2Service referenced instances.
[transfer full][element-type EOAuth2Service]
Since: 3.28
EOAuth2Service * e_oauth2_services_find (EOAuth2Services *services
,ESource *source
);
Searches the list of currently known OAuth2 services for the one which
can be used with the given source
.
The returned EOAuth2Service is referenced for thread safety, if found.
a referenced EOAuth2Service, which can be used
with given source
, or NULL
, when none was found.
[transfer full][nullable]
Since: 3.28
EOAuth2Service * e_oauth2_services_guess (EOAuth2Services *services
,const gchar *protocol
,const gchar *hostname
);
Searches the list of currently known OAuth2 services for the one which
can be used with the given protocol
and/or hostname
.
Any of protocol
and hostname
can be NULL
, but not both.
It's up to each EOAuth2Service to decide, which of the arguments
are important and whether all or only any of them can be required.
The returned EOAuth2Service is referenced for thread safety, if found.
services |
||
protocol |
a protocol to search the service for, like "imap", or |
[nullable] |
hostname |
a host name to search the service for, like "server.example.com", or |
[nullable] |
a referenced EOAuth2Service, which can be used
with given constraints, or NULL
, when none was found.
[transfer full][nullable]
Since: 3.28
gboolean e_oauth2_services_is_oauth2_alias (EOAuth2Services *services
,const gchar *auth_method
);
Since: 3.28
gboolean
e_oauth2_services_is_oauth2_alias_static
(const gchar *auth_method
);
This is the same as e_oauth2_services_is_oauth2_alias()
, except
it creates its own EOAuth2Services instance and frees it at the end.
The EOAuth2Services is implemented as a singleton, thus it won't be
much trouble, as long as there is something else having created one
instance.
Since: 3.28
struct EOAuth2Services;
Contains only private data that should be read and manipulated using the functions below.
Since: 3.28