The common prefix of the object path for all Account objects.
Const CHANNEL_DISPATCHER_BUS_NAME
CHANNEL_DISPATCHER_BUS_NAME:string
The channel dispatcher's well-known bus name
Const CHANNEL_DISPATCHER_OBJECT_PATH
CHANNEL_DISPATCHER_OBJECT_PATH:string
The channel dispatcher's standard object path
Const CLIENT_BUS_NAME_BASE
CLIENT_BUS_NAME_BASE:string
The common prefix of the well-known bus name for any Telepathy Client.
Const CLIENT_OBJECT_PATH_BASE
CLIENT_OBJECT_PATH_BASE:string
The common prefix of the well-known object path for any Telepathy Client.
Const CM_BUS_NAME_BASE
CM_BUS_NAME_BASE:string
The prefix for a connection manager's bus name, to which the CM's name
(e.g. "gabble") should be appended.
Const CM_OBJECT_PATH_BASE
CM_OBJECT_PATH_BASE:string
The prefix for a connection manager's object path, to which the CM's name
(e.g. "gabble") should be appended.
Const CONN_BUS_NAME_BASE
CONN_BUS_NAME_BASE:string
The prefix for a connection's bus name, to which the CM's name
(e.g. "gabble"), the protocol (e.g. "jabber") and an element or sequence
of elements representing the account should be appended.
Const CONN_OBJECT_PATH_BASE
CONN_OBJECT_PATH_BASE:string
The prefix for a connection's object path, to which the CM's name
(e.g. "gabble"), the protocol (e.g. "jabber") and an element or sequence
of elements representing the account should be appended.
Const DEBUG_OBJECT_PATH
DEBUG_OBJECT_PATH:string
The standard path for objects implementing the Telepathy Debug interface
(#TpSvcDebug).
Const ERROR_PREFIX
ERROR_PREFIX:string
The common prefix of Telepathy errors, as a string constant, without
the trailing '.' character.
An invalid handle type (-1 cast to TpHandleType) used to represent an
unknown handle type.
Const USER_ACTION_TIME_NOT_USER_ACTION
USER_ACTION_TIME_NOT_USER_ACTION:number
The "user action time" used by methods like
tp_account_channel_request_new() to represent channel requests that are
not a result of user action.
See also #TpAccountChannelRequest:user-action-time,
tp_user_action_time_from_x11(), tp_user_action_time_should_present() and
%TP_USER_ACTION_TIME_CURRENT_TIME.
Functions
asvGetBoolean
asvGetBoolean(asv: HashTable<string | number | symbol, string | number | boolean>, key: string): [boolean, boolean]
If a value for key in asv is present and boolean, return it,
and set *valid to %TRUE if valid is not %NULL.
Otherwise return %FALSE, and set *valid to %FALSE if valid is not %NULL.
Parameters
asv: HashTable<string | number | symbol, string | number | boolean>
A GHashTable where the keys are strings and the values are GValues
key: string
The key to look up
Returns [boolean, boolean]
asvGetBoxed
asvGetBoxed(asv: HashTable<string | number | symbol, string | number | boolean>, key: string, type: GType<unknown>): object | null
If a value for key in asv is present and is of the desired type,
return it.
Otherwise return %NULL.
The returned value is not copied, and is only valid as long as the value
for key in asv is not removed or altered. Copy it, for instance with
g_boxed_copy(), if you need to keep it for longer.
Parameters
asv: HashTable<string | number | symbol, string | number | boolean>
A GHashTable where the keys are strings and the values are GValues
The type that the key's value should have, which must be derived from %G_TYPE_BOXED
Returns object | null
asvGetBytes
asvGetBytes(asv: HashTable<string | number | symbol, string | number | boolean>, key: string): Uint8Array | null
If a value for key in asv is present and is an array of bytes
(its GType is %DBUS_TYPE_G_UCHAR_ARRAY), return it.
Otherwise return %NULL.
The returned value is not copied, and is only valid as long as the value
for key in asv is not removed or altered. Copy it with
g_boxed_copy (DBUS_TYPE_G_UCHAR_ARRAY, ...) if you need to keep
it for longer.
Parameters
asv: HashTable<string | number | symbol, string | number | boolean>
A GHashTable where the keys are strings and the values are GValues
key: string
The key to look up
Returns Uint8Array | null
asvGetDouble
asvGetDouble(asv: HashTable<string | number | symbol, string | number | boolean>, key: string): [number, boolean]
If a value for key in asv is present and has any numeric type used by
dbus-glib (guchar, gint, guint, gint64, guint64 or gdouble),
return it as a double, and if valid is not %NULL, set *valid to %TRUE.
Otherwise, return 0.0, and if valid is not %NULL, set *valid to %FALSE.
Parameters
asv: HashTable<string | number | symbol, string | number | boolean>
A GHashTable where the keys are strings and the values are GValues
key: string
The key to look up
Returns [number, boolean]
asvGetInt32
asvGetInt32(asv: HashTable<string | number | symbol, string | number | boolean>, key: string): [number, boolean]
If a value for key in asv is present, has an integer type used by
dbus-glib (guchar, gint, guint, gint64 or guint64) and fits in the
range of a gint32, return it, and if valid is not %NULL, set *valid to
%TRUE.
Otherwise, return 0, and if valid is not %NULL, set *valid to %FALSE.
Parameters
asv: HashTable<string | number | symbol, string | number | boolean>
A GHashTable where the keys are strings and the values are GValues
key: string
The key to look up
Returns [number, boolean]
asvGetInt64
asvGetInt64(asv: HashTable<string | number | symbol, string | number | boolean>, key: string): [number, boolean]
If a value for key in asv is present, has an integer type used by
dbus-glib (guchar, gint, guint, gint64 or guint64) and fits in the
range of a gint64, return it, and if valid is not %NULL, set *valid to
%TRUE.
Otherwise, return 0, and if valid is not %NULL, set *valid to %FALSE.
Parameters
asv: HashTable<string | number | symbol, string | number | boolean>
A GHashTable where the keys are strings and the values are GValues
key: string
The key to look up
Returns [number, boolean]
asvGetObjectPath
asvGetObjectPath(asv: HashTable<string | number | symbol, string | number | boolean>, key: string): string | null
If a value for key in asv is present and is an object path, return it.
Otherwise return %NULL.
The returned value is not copied, and is only valid as long as the value
for key in asv is not removed or altered. Copy it with g_strdup() if you
need to keep it for longer.
Parameters
asv: HashTable<string | number | symbol, string | number | boolean>
A GHashTable where the keys are strings and the values are GValues
key: string
The key to look up
Returns string | null
asvGetString
asvGetString(asv: HashTable<string | number | symbol, string | number | boolean>, key: string): string | null
If a value for key in asv is present and is a string, return it.
Otherwise return %NULL.
The returned value is not copied, and is only valid as long as the value
for key in asv is not removed or altered. Copy it with g_strdup() if you
need to keep it for longer.
Parameters
asv: HashTable<string | number | symbol, string | number | boolean>
A GHashTable where the keys are strings and the values are GValues
key: string
The key to look up
Returns string | null
asvGetStrv
asvGetStrv(asv: HashTable<string | number | symbol, string | number | boolean>, key: string): string[] | null
If a value for key in asv is present and is an array of strings (strv),
return it.
Otherwise return %NULL.
The returned value is not copied, and is only valid as long as the value
for key in asv is not removed or altered. Copy it with g_strdupv() if you
need to keep it for longer.
Parameters
asv: HashTable<string | number | symbol, string | number | boolean>
A GHashTable where the keys are strings and the values are GValues
key: string
The key to look up
Returns string[] | null
asvGetUint32
asvGetUint32(asv: HashTable<string | number | symbol, string | number | boolean>, key: string): [number, boolean]
If a value for key in asv is present, has an integer type used by
dbus-glib (guchar, gint, guint, gint64 or guint64) and fits in the
range of a guint32, return it, and if valid is not %NULL, set *valid to
%TRUE.
Otherwise, return 0, and if valid is not %NULL, set *valid to %FALSE.
Parameters
asv: HashTable<string | number | symbol, string | number | boolean>
A GHashTable where the keys are strings and the values are GValues
key: string
The key to look up
Returns [number, boolean]
asvGetUint64
asvGetUint64(asv: HashTable<string | number | symbol, string | number | boolean>, key: string): [number, boolean]
If a value for key in asv is present, has an integer type used by
dbus-glib (guchar, gint, guint, gint64 or guint64) and is non-negative,
return it, and if valid is not %NULL, set *valid to %TRUE.
Otherwise, return 0, and if valid is not %NULL, set *valid to %FALSE.
Parameters
asv: HashTable<string | number | symbol, string | number | boolean>
A GHashTable where the keys are strings and the values are GValues
some combination of %TP_DBUS_NAME_TYPE_UNIQUE, %TP_DBUS_NAME_TYPE_WELL_KNOWN or %TP_DBUS_NAME_TYPE_BUS_DAEMON (often this will be %TP_DBUS_NAME_TYPE_NOT_BUS_DAEMON or %TP_DBUS_NAME_TYPE_ANY)
Check that the given string is a valid D-Bus interface name. This is
also appropriate to use to check for valid error names.
Since GIO 2.26, g_dbus_is_interface_name() should always return the same
thing, although the GLib function does not raise an error explaining why
the interface name is incorrect.
Parameters
name: string
a possible interface name
Returns boolean
dbusCheckValidMemberName
dbusCheckValidMemberName(name: string): boolean
Check that the given string is a valid D-Bus member (method or signal) name.
Since GIO 2.26, g_dbus_is_member_name() should always return the same
thing, although the GLib function does not raise an error explaining why
the interface name is incorrect.
Parameters
name: string
a possible member name
Returns boolean
dbusCheckValidObjectPath
dbusCheckValidObjectPath(path: string): boolean
Check that the given string is a valid D-Bus object path. Since GLib 2.24,
g_variant_is_object_path() should always return the same thing as this
function, although it doesn't provide an error explaining why the object
path is invalid.
Initialize the class cls to use the D-Bus Properties mixin.
The given struct member, of size sizeof(TpDBusPropertiesMixinClass),
will be used to store property implementation information.
Each property and each interface must have been declared as a member of
a GInterface implemented by cls, using
tp_svc_interface_set_dbus_properties_info().
Before calling this function, the array interfaces must have been
placed in the #TpDBusPropertiesMixinClass structure; if it would be empty,
it may instead be %NULL.
This function should be called from the class_init callback in such a way
that it will only be called once, even if the class is subclassed.
Changed in 0.7.9: TpDBusPropertiesMixinClass::interfaces may now be %NULL,
which means that only interfaces whose properties are set up using
tp_dbus_properties_mixin_implement_interface() will be used.
Changed in 0.7.15: offset may now be 0, in which case the
#TpDBusPropertiesMixinClass can be omitted from cls. It is treated as if
it were present, but with all fields (including
TpDBusPropertiesMixinClass::interfaces) being %NULL, so only interfaces
whose properties are set using
tp_dbus_properties_mixin_implement_interface() will be used.
Emits the PropertiesChanged signal for the provided properties. Depending on
the EmitsChangedSignal annotations in the introspection XML, either the new
value of the property will be included in the signal, or merely the fact
that the property has changed.
For example, the MPRIS specification defines a TrackList interface with two
properties, one of which is annotated with EmitsChangedSignal=true and one
annotated with EmitsChangedSignal=invalidates. The following call would
include the new value of CanEditTracks and list Tracks as invalidated:
Initialize value with the type of the property property_name on
interface_name, and write the value of that property into it as if
by calling the D-Bus method org.freedesktop.DBus.Properties.Get.
If Get would return a D-Bus error, value remains unset and error
is filled in instead.
An implementation of #TpDBusPropertiesMixinGetter which assumes that
the getter_data is the name of a readable #GObject property of an
appropriate type, and uses it for the value of the D-Bus property.
An implementation of #TpDBusPropertiesMixinSetter which assumes that the
setter_data is the name of a writable #GObject property of an appropriate
type, and sets that property to the given value.
The setter_data from the #TpDBusPropertiesMixinPropImpl, which must be a string containing the GObject property's name
Returns boolean
debugDivertMessages
debugDivertMessages(filename: string): void
Open the given file for writing and duplicate its file descriptor to
be used for stdout and stderr. This has the effect of closing the previous
stdout and stderr, and sending all messages that would have gone there
to the given file instead.
By default the file is truncated and hence overwritten each time the
process is executed.
Since version 0.7.14, if the filename is prefixed with '+' then the
file is not truncated and output is added at the end of the file.
Passing %NULL to this function is guaranteed to have no effect. This is
so you can call it with the recommended usage
tp_debug_divert_messages (g_getenv ("MYAPP_LOGFILE"))
and it won't do anything if the environment variable is not set.
This function still works if telepathy-glib was compiled without debug
support.
Parameters
filename: string
A file to which to divert stdout and stderr, or %NULL to do nothing
Returns void
debugSetFlags
debugSetFlags(flagsString: string): void
Set the debug flags indicated by flags_string, in addition to any already
set.
The parsing matches that of g_parse_debug_string().
If telepathy-glib was compiled with --disable-debug (not recommended),
this function has no practical effect, since the debug messages it would
enable were removed at compile time.
Parameters
flagsString: string
The flags to set, comma-separated. If %NULL or empty, no additional flags are set.
Returns void
debugSetPersistent
debugSetPersistent(persistent: boolean): void
Used to enable persistent operation of the connection manager process for
debugging purposes.
Parameters
persistent: boolean
TRUE prevents the connection manager mainloop from exiting, FALSE enables exiting if there are no connections (the default behavior).
Escape an arbitrary string so it follows the rules for a C identifier,
and hence an object path component, interface element component,
bus name component or member name in D-Bus.
Unlike g_strcanon this is a reversible encoding, so it preserves
distinctness.
The escaping consists of replacing all non-alphanumerics, and the first
character if it's a digit, with an underscore and two lower-case hex
digits:
"0123abc_xyz\x01\xff" -> _30123abc_5fxyz_01_ff
i.e. similar to URI encoding, but with _ taking the role of %, and a
smaller allowed set. As a special case, "" is escaped to "_" (just for
completeness, really).
List the available (running or installed) connection managers. Call the
callback when done.
Since 0.7.26, this function will wait for each #TpConnectionManager
to be ready, so all connection managers passed to callback will have
their %TP_CONNECTION_MANAGER_FEATURE_CORE feature prepared, unless an error
occurred while launching that connection manager.
List the available (running or installed) connection managers,
asynchronously, and wait for their %TP_CONNECTION_MANAGER_FEATURE_CORE
feature to be ready.
List the bus names of all the connections that currently exist, together
with the connection manager name and the protocol name for each connection.
Call the callback when done.
The bus names passed to the callback can be used to construct #TpConnection
objects for any connections that are of interest.
callback to be called when listing the connections succeeds or fails; not called if the D-Bus connection fails completely or if the weak_object goes away
Create a new #GSimpleAsyncResult with no operation result, and call
g_simple_async_result_complete_in_idle() on it.
This is like a successful version of g_simple_async_report_error_in_idle(),
suitable for asynchronous functions that (conceptually) either succeed and
return nothing, or raise an error, such as tp_proxy_prepare_async().
The corresponding finish function should not call a function that attempts
to get a result, such as g_simple_async_result_get_op_res_gpointer().
Declare that g_interface implements the given D-Bus interface, with the
given properties. This may only be called once per GInterface, usually from
a section of its base_init function that only runs once.
This is typically only used within generated code; there is normally no
reason to call it manually.
Interpret a Telepathy user action time to decide whether a Handler should
attempt to gain focus. If %TRUE is returned, it would be appropriate to
call gtk_window_present_with_time() using x11_time as input, for instance.
x11_time is used to return a timestamp in the right format for X11,
GDK 2, GDK 3 and Clutter 1.0; it may or may not work with other
toolkits or versions.
Parameters
userActionTime: number
the Telepathy user action time
Returns [boolean, number]
utf8MakeValid
utf8MakeValid(name: string): string
Validate that the provided string is valid UTF8. If not,
replace all invalid bytes with unicode replacement
character (U+FFFD).
This method is a verbatim copy of glib's internal
_g_utf8_make_valid() function, and will be deprecated as
soon as the glib one becomes public.
Free va. This is exactly the same as g_value_array_free(), but does not
provoke deprecation warnings from GLib when used in conjunction with
tp_value_array_build() and tp_value_array_unpack().
The account manager's well-known bus name