Name Type Access Description
authtypes [object] r/w  
auto_detect Camel.ProviderAutoDetectFunc r/w  
description str r/w  
domain str r/w  
extra_conf Camel.ProviderConfEntry r/w  
flags Camel.ProviderFlags r/w  
name str r/w  
object_types [GObject.GType] r/w  
port_entries Camel.ProviderPortEntry r/w  
priv object r/w  
protocol str r/w  
translation_domain str r/w  
url_equal GLib.EqualFunc r/w  
url_flags Camel.ProviderURLFlags r/w  
url_hash GLib.HashFunc r/w  


class get (protocol)
class init ()
class list (load)
class load (path)
  register ()


class Camel.Provider
classmethod get(protocol)
Parameters:protocol (str) – a Camel.Provider protocol name
Returns:a Camel.Provider for protocol, or None
Return type:Camel.Provider

Returns the registered Camel.Provider for protocol, loading it from disk if necessary. If no Camel.Provider can be found for protocol, or the provider module fails to load, the function sets error and returns None.

The returned Camel.Provider is owned by Camel and should not be modified or freed.

classmethod init()

Initialize the Camel provider system by reading in the .urls files in the provider directory and creating a hash table mapping URLs to module names.

A .urls file has the same initial prefix as the shared library it correspond to, and consists of a series of lines containing the URL protocols that that library handles.

TODO: This should be pathed? TODO: This should be plugin-d?

classmethod list(load)
Parameters:load (bool) – whether or not to load in providers that are not already loaded
Returns:a GLib.List of Camel.Provider structs
Return type:[Camel.Provider]

This returns a list of available providers. If load is True, it will first load in all available providers that haven’t yet been loaded.

Free the returned list with g_list_free(). The Camel.Provider structs in the list are owned by Camel and should not be modified or freed.

classmethod load(path)
Parameters:path (str) – the path to a shared library
Returns:True on success, False on failure
Return type:bool

Loads the provider at path, and calls its initialization function, passing session as an argument. The provider should then register itself with session.


Registers a provider.