Session
Object Hierarchy:
Description:
Namespace: Camel
Package: camel-1.2
Content:
Properties:
- public JunkFilter junk_filter { get; set; }
- public MainContext main_context { owned get; }
- public NetworkMonitor network_monitor { owned get; set; }
- public bool online { get; set construct; }
- public string user_cache_dir { owned get; set construct; }
- public string user_data_dir { owned get; set construct; }
Creation methods:
- protected Session ()
Methods:
- public virtual Service add_service (string uid, string protocol, ProviderType type) throws Error
Instantiates a new Service for this.
- public virtual bool addressbook_contains_sync (string book_uid, string email_address, Cancellable? cancellable = null) throws Error
Look up in an address book
book_uid
for an addressemail_address
and returns whether any such contact exists. - public async bool authenticate (Service service, string? mechanism, int io_priority, Cancellable? cancellable = null) throws Error
Asynchronously authenticates
service
, which may involve repeated calls to authenticate or authenticate_sync. - public virtual bool authenticate_sync (Service service, string? mechanism, Cancellable? cancellable = null) throws Error
Authenticates
service
, which may involve repeated calls to authenticate or authenticate_sync. - public virtual bool forget_password (Service service, string item) throws Error
This function is used by a Service to tell the application that the authentication information it provided via get_password was rejected by the service.
- public async bool forward_to (Folder folder, MimeMessage message, string address, int io_priority, Cancellable? cancellable = null) throws Error
Asynchronously forwards
message
infolder
to the email address(s) given byaddress
. - public virtual bool forward_to_sync (Folder folder, MimeMessage message, string address, Cancellable? cancellable = null) throws Error
Forwards
message
infolder
to the email address(es ) given byaddress
. - public virtual unowned FilterDriver get_filter_driver (string type, Folder? for_folder) throws Error
The optional
for_folder
can be used to determine which filters to add and which not. - public unowned JunkFilter? get_junk_filter ()
Returns the JunkFilter instance used to classify messages as junk or not junk during filtering.
- public unowned HashTable<string,string> get_junk_headers ()
- public virtual bool get_oauth2_access_token_sync (Service service, out string? out_access_token, out int out_expires_in, Cancellable? cancellable = null) throws Error
Obtains the OAuth 2.0 access token for
service
along with its expiry in seconds from the current time (or 0 if unknown). - public bool get_online ()
- public virtual string get_password (Service service, string prompt, string item, uint32 flags) throws Error
This function is used by a Service to ask the application and the user for a password or other authentication data.
- public virtual bool get_recipient_certificates_sync (uint32 flags, GenericArray<string> recipients, out SList<string> out_certificates, Cancellable? cancellable = null) throws Error
Searches for S/MIME certificates or PGP keys for the given
recipients
, which are returned as base64 encoded strings inout_certificates
. - public unowned string get_user_cache_dir ()
Returns the base directory under which to store user-specific mail cache.
- public unowned string get_user_data_dir ()
Returns the base directory under which to store user-specific mail data.
- public uint idle_add (int priority, owned SourceFunc function)
Adds a function to be called whenever there are no higher priority events pending.
- public List<Service> list_services ()
Returns a list of all Service objects previously added using add_service.
- public virtual bool lookup_addressbook (string name)
Looks up for the
name
in address books. - public MainContext ref_main_context ()
Returns the MainContext on which event sources for this are to be attached.
- public NetworkMonitor ref_network_monitor ()
References a NetworkMonitor instance, which had been previously set by set_network_monitor.
- public Service? ref_service (string uid)
Looks up a Service by its unique identifier string.
- public Service? ref_service_by_url (URL url, ProviderType type)
- public virtual void remove_service (Service service)
Removes a Service previously added by add_service.
- public void remove_services ()
Removes all Service instances added by add_service.
- public void set_junk_filter (JunkFilter? junk_filter)
Installs the JunkFilter instance used to classify messages as junk or not junk during filtering.
- public void set_junk_headers (string[] headers, string[] values)
- public void set_network_monitor (NetworkMonitor? network_monitor)
Sets a network monitor instance for the this .
- public void set_online (bool online)
Sets the online status of this to
online
. - public void submit_job (string description, owned SessionCallback callback)
This function provides a simple mechanism for providers to initiate low-priority background jobs.
- public virtual CertTrust trust_prompt (Service service, TlsCertificate certificate, TlsCertificateFlags errors)
Prompts the user whether to accept
certificate
forservice
.
Signals:
- public virtual signal void job_finished (Cancellable? cancellable, Error error)
- public virtual signal void job_started (Cancellable? cancellable = null)
- public virtual signal void user_alert (Service service, SessionAlertType type, string message)
This purpose of this signal is to propagate a server-issued alert message from
service
to a user interface.
Inherited Members:
All known members inherited from class GLib.Object