TelepathyGLib.ConnectionManager¶
- Subclasses:
 None
Methods¶
- Inherited:
 - Structs:
 
class  | 
  | 
class  | 
  | 
class  | 
|
class  | 
|
class  | 
  | 
  | 
|
  | 
|
  | 
|
  | 
|
  | 
Virtual Methods¶
- Inherited:
 
Properties¶
- Inherited:
 
Name  | 
Type  | 
Flags  | 
Short Description  | 
|---|---|---|---|
r/w  | 
Opportunistically introspect the CM when it’s run  | 
||
r  | 
The name of the connection manager, e.g. “gabble” (read-only)  | 
||
r  | 
The name of the connection manager, e.g. “gabble” (read-only)   | 
||
r  | 
Where we got the current information on supported protocols  | 
||
r/w/c  | 
The .manager filename  | 
Signals¶
- Inherited:
 
Name  | 
Short Description  | 
|---|---|
Emitted when the connection manager’s well-known name appears on the bus.  | 
|
Emitted when the connection manager’s well-known name disappears from the bus or when activation fails.  | 
|
Emitted when the connection manager’s capabilities have been discovered.  | 
Fields¶
- Inherited:
 
Name  | 
Type  | 
Access  | 
Description  | 
|---|---|---|---|
always_introspect  | 
r  | 
||
info_source  | 
r  | 
||
name  | 
r  | 
||
parent  | 
r  | 
||
protocols  | 
r  | 
||
reserved_flags  | 
r  | 
||
running  | 
r  | 
Class Details¶
- class TelepathyGLib.ConnectionManager(**kwargs)¶
 - Bases:
 - Abstract:
 No
- Structure:
 
A proxy object for a Telepathy connection manager.
This might represent a connection manager which is currently running (in which case it can be introspected) or not (in which case its capabilities can be read from .manager files in the filesystem). Accordingly, this object never emits
TelepathyGLib.Proxy::invalidatedunless all references to it are discarded.Various fields and methods on this object do not work until %TP_CONNECTION_MANAGER_FEATURE_CORE is prepared. Use
TelepathyGLib.Proxy.prepare_async() to wait for this to happen.Since 0.19.1, accessing the fields of this struct is deprecated, and they are no longer documented here. Use the accessors
TelepathyGLib.ConnectionManager.get_name(),TelepathyGLib.ConnectionManager.is_running(),TelepathyGLib.ConnectionManager.dup_protocols(),TelepathyGLib.ConnectionManager.get_info_source() and theTelepathyGLib.ConnectionManager:always-introspectproperty instead.New in version 0.7.1.
- classmethod check_valid_name(name)¶
 - Parameters:
 name (
str) – a possible connection manager name- Raises:
 - Returns:
 Trueif name is valid- Return type:
 
Check that the given string is a valid connection manager name, i.e. that it consists entirely of ASCII letters, digits and underscores, and starts with a letter.
New in version 0.7.1.
- classmethod check_valid_protocol_name(name)¶
 - Parameters:
 name (
str) – a possible protocol name- Raises:
 - Returns:
 Trueif name is valid- Return type:
 
Check that the given string is a valid protocol name, i.e. that it consists entirely of ASCII letters, digits and hyphen/minus, and starts with a letter.
New in version 0.7.1.
- classmethod init_known_interfaces()¶
 Ensure that the known interfaces for
TelepathyGLib.ConnectionManagerhave been set up. This is done automatically when necessary, but for correct overriding of library interfaces by local extensions, you should call this function before calling tp_proxy_or_subclass_hook_on_interface_add() with first argument %TP_TYPE_CONNECTION_MANAGER.New in version 0.7.32.
- classmethod new(dbus, name, manager_filename)¶
 - Parameters:
 dbus (
TelepathyGLib.DBusDaemon) – Proxy for the D-Bus daemonname (
str) – The connection manager name (such as “gabble”)manager_filename (
strorNone) – TheTelepathyGLib.ConnectionManager:manager-fileproperty, which may (and generally should) beNone.
- Raises:
 - Returns:
 a new reference to a connection manager proxy, or
Noneif error is set.- Return type:
 
Convenience function to create a new connection manager proxy. If its protocol and parameter information are required, you should call
TelepathyGLib.Proxy.prepare_async() on the result.
- dup_protocol_names()¶
 - Returns:
 a #GStrv of protocol names
- Return type:
 [
str]
Returns a list of protocol names supported by this connection manager. These are the internal protocol names used by the Telepathy specification (e.g. “jabber” and “msn”), rather than user-visible names in any particular locale.
If this function is called before the connection manager information has been obtained, the result is always
None. UseTelepathyGLib.Proxy.prepare_async() to wait for this.The result is copied and must be freed by the caller, but it is not necessarily still true after the main loop is re-entered.
New in version 0.7.26.
- dup_protocols()¶
 - Returns:
 a list of
TelepathyGLib.Protocolobjects representing the protocols supported by self, owned by the caller- Return type:
 
Return objects representing all protocols supported by this connection manager.
If this function is called before the connection manager information has been obtained, the result is always
None. UseTelepathyGLib.Proxy.prepare_async() to wait for this.The caller must free the list, for instance with
g_list_free_full (l, g_object_unref).New in version 0.17.6.
- get_info_source()¶
 - Returns:
 the value of the
TelepathyGLib.ConnectionManager:info-sourceproperty- Return type:
 
If protocol and parameter information has been obtained from the connection manager, return
TelepathyGLib.CMInfoSource.LIVE; if it has been obtained from the cache in the .manager file, returnTelepathyGLib.CMInfoSource.FILE. If this information has not yet been obtained, or obtaining it failed, returnTelepathyGLib.CMInfoSource.NONE.This may increase at any time that the main loop is running; the
GObject.Object::notifysignal is emitted.New in version 0.7.26.
- get_name()¶
 - Returns:
 the
TelepathyGLib.ConnectionManager:cm-nameproperty- Return type:
 
Return the internal name of this connection manager in the Telepathy D-Bus API, e.g. “gabble” or “haze”. This is often the name of the binary without the “telepathy-” prefix.
The returned string is valid as long as self is. Copy it with
GLib.strdup() if a longer lifetime is required.New in version 0.7.26.
- get_protocol(protocol)¶
 - Parameters:
 protocol (
str) – the name of a protocol as defined in the Telepathy D-Bus API, e.g. “jabber” or “msn”- Returns:
 a structure representing the protocol
- Return type:
 
Returns a structure representing a protocol, or
Noneif this connection manager does not support the specified protocol.Since 0.11.11, you can get a
GObject.Objectversion with more functionality by callingTelepathyGLib.ConnectionManager.get_protocol_object().If this function is called before the connection manager information has been obtained, the result is always
None. UseTelepathyGLib.Proxy.prepare_async() to wait for this.The result is not necessarily valid after the main loop is re-entered. Since 0.11.3, it can be copied with
TelepathyGLib.ConnectionManagerProtocol.copy() if a permanently-valid copy is needed.New in version 0.7.26.
Deprecated since version 0.19.1: , use
TelepathyGLib.ConnectionManager.get_protocol_object()
- get_protocol_object(protocol)¶
 - Parameters:
 protocol (
str) – the name of a protocol as defined in the Telepathy D-Bus API, e.g. “jabber” or “msn”- Returns:
 an object representing the protocol, or
None- Return type:
 
Returns an object representing a protocol, or
Noneif this connection manager does not support the specified protocol.If this function is called before the connection manager information has been obtained, the result is always
None. UseTelepathyGLib.Proxy.prepare_async() to wait for this.The result should be referenced with
GObject.Object.ref() if it will be kept.New in version 0.11.11.
- has_protocol(protocol)¶
 - Parameters:
 protocol (
str) – the name of a protocol as defined in the Telepathy D-Bus API, e.g. “jabber” or “msn”- Returns:
 Trueif this connection manager supports protocol- Return type:
 
Return whether protocol is supported by this connection manager.
If this function is called before the connection manager information has been obtained, the result is always
False. UseTelepathyGLib.Proxy.prepare_async() to wait for this.New in version 0.7.26.
- is_running()¶
 - Returns:
 whether the connection manager is currently running
- Return type:
 
Return
Trueif this connection manager currently appears to be running. This may change at any time that the main loop is running; theTelepathyGLib.ConnectionManager::activatedandTelepathyGLib.ConnectionManager::exitedsignals are emitted.New in version 0.7.26.
Signal Details¶
- TelepathyGLib.ConnectionManager.signals.activated(connection_manager)¶
 - Signal Name:
 activated- Flags:
 - Parameters:
 connection_manager (
TelepathyGLib.ConnectionManager) – The object which received the signal
Emitted when the connection manager’s well-known name appears on the bus.
- TelepathyGLib.ConnectionManager.signals.exited(connection_manager)¶
 - Signal Name:
 exited- Flags:
 - Parameters:
 connection_manager (
TelepathyGLib.ConnectionManager) – The object which received the signal
Emitted when the connection manager’s well-known name disappears from the bus or when activation fails.
- TelepathyGLib.ConnectionManager.signals.got_info(connection_manager, source)¶
 - Signal Name:
 got-info- Flags:
 - Parameters:
 connection_manager (
TelepathyGLib.ConnectionManager) – The object which received the signalsource (
int) – aTelepathyGLib.CMInfoSource
Emitted when the connection manager’s capabilities have been discovered.
This signal is not very helpful. Using
TelepathyGLib.Proxy.prepare_async() instead is recommended.
Property Details¶
- TelepathyGLib.ConnectionManager.props.always_introspect¶
 - 
If
True, always introspect the connection manager as it comes online, even if we already have its info from a .manager file. DefaultFalse. 
- TelepathyGLib.ConnectionManager.props.cm_name¶
 - 
The name of the connection manager, e.g. “gabble” (read-only).
New in version 0.19.3.
 
- TelepathyGLib.ConnectionManager.props.connection_manager¶
 - 
The name of the connection manager, e.g. “gabble” (read-only).
Deprecated since version ???: Use
TelepathyGLib.ConnectionManager:cm-nameinstead. 
- TelepathyGLib.ConnectionManager.props.info_source¶
 - 
Where we got the current information on supported protocols (a
TelepathyGLib.CMInfoSource).Since 0.7.26, the
GObject.Object::notifysignal is emitted for this property.(Note that this is of type
GObject.TYPE_UINT, not %TP_TYPE_CM_INFO_SOURCE, for historical reasons.)