TpProxy D-Bus core methods: telepathy-glib API Reference Manual

## TpProxy D-Bus core methods TpProxy D-Bus core methods — The D-Bus Introspectable, Peer and Properties interfaces |

## Functions

TpProxyPendingCall * | tp_cli_dbus_introspectable_call_introspect ()
void | (*tp_cli_dbus_introspectable_callback_for_introspect) ()
gboolean | tp_cli_dbus_introspectable_run_introspect ()
TpProxyPendingCall * | tp_cli_dbus_peer_call_get_machine_id ()
TpProxyPendingCall * | tp_cli_dbus_peer_call_ping ()
void | (*tp_cli_dbus_peer_callback_for_get_machine_id) ()
void | (*tp_cli_dbus_peer_callback_for_ping) ()
gboolean | tp_cli_dbus_peer_run_get_machine_id ()
gboolean | tp_cli_dbus_peer_run_ping ()
TpProxyPendingCall * | tp_cli_dbus_properties_call_get ()
TpProxyPendingCall * | tp_cli_dbus_properties_call_get_all ()
TpProxyPendingCall * | tp_cli_dbus_properties_call_set ()
void | (*tp_cli_dbus_properties_callback_for_get) ()
void | (*tp_cli_dbus_properties_callback_for_get_all) ()
void | (*tp_cli_dbus_properties_callback_for_set) ()
gboolean | tp_cli_dbus_properties_run_get ()
gboolean | tp_cli_dbus_properties_run_get_all ()
void | (*tp_cli_dbus_properties_signal_callback_properties_changed) ()
TpProxySignalConnection * | tp_cli_dbus_properties_connect_to_properties_changed ()
gboolean | tp_cli_dbus_properties_run_set ()

## Includes

    #include <telepathy-glib/telepathy-glib-dbus.h>

## Description

All D-Bus objects support the Peer interface, and many support the Introspectable and Properties interfaces.

## Functions

### tp_cli_dbus_introspectable_call_introspect ()

    TpProxyPendingCall *
    tp_cli_dbus_introspectable_call_introspect
                                   (gpointer proxy,
                                    gint timeout_ms,
                                    tp_cli_dbus_introspectable_callback_for_introspect callback,
                                    gpointer user_data,
                                    GDestroyNotify destroy,
                                    GObject *weak_object);

Start a Introspect method call.

(Undocumented)

#### Parameters

proxy | the TpProxy |
timeout_ms | the timeout in milliseconds, or -1 to use the default |
callback | called when the method call succeeds or fails; may be `NULL` to make a "fire and forget" call with no reply tracking |
user_data | user-supplied data passed to the callback; must be `NULL` if `callback` is `NULL` |
destroy | called with the user_data as argument, after the call has succeeded, failed or been cancelled; must be `NULL` if `callback` is `NULL` |
weak_object | If not `NULL`, a GObject which will be weakly referenced; if it is destroyed, this call will automatically be cancelled. Must be `NULL` if `callback` is `NULL` |

#### Returns

a TpProxyPendingCall representing the call in progress. It is borrowed from the object, and will become invalid when the callback is called, the call is cancelled or the TpProxy becomes invalid.

### tp_cli_dbus_introspectable_callback_for_introspect ()

    void
    (*tp_cli_dbus_introspectable_callback_for_introspect)
                                   (TpProxy *proxy,
                                    const gchar *out_XML_Data,
                                    const GError *error,
                                    gpointer user_data,
                                    GObject *weak_object);

Signature of the callback called when a Introspect method call succeeds or fails.

#### Parameters

proxy | the proxy on which the call was made |
out_XML_Data | Used to return an 'out' argument if `error` is `NULL`: (Undocumented) |
error | `NULL` on success, or an error on failure |
user_data | user-supplied data |
weak_object | user-supplied object |

### tp_cli_dbus_introspectable_run_introspect ()

    gboolean
    tp_cli_dbus_introspectable_run_introspect
                                   (gpointer proxy,
                                    gint timeout_ms,
                                    gchar **out_XML_Data,
                                    GError **error,
                                    GMainLoop **loop);

`tp_cli_dbus_introspectable_run_introspect` is deprecated and should not be used in newly-written code.

Call the method Introspect and run the main loop until it returns. Before calling this method, you must add a reference to any borrowed objects you need to keep, and generally ensure that everything is in a consistent state.

(Undocumented)

#### Parameters

proxy | A TpProxy or subclass |
timeout_ms | Timeout in milliseconds, or -1 for default |
out_XML_Data | Used to return an 'out' argument if `TRUE` is returned: (Undocumented) |
error | If not `NULL`, used to return errors if `FALSE` is returned |
loop | If not `NULL`, set before re-entering the main loop, to point to a GMainLoop which can be used to cancel this call with `g_main_loop_quit()`, causing a return of `FALSE` with `error` set to `TP_DBUS_ERROR_CANCELLED` |

#### Returns

TRUE on success, FALSE and sets `error` on error

### tp_cli_dbus_peer_call_get_machine_id ()

    TpProxyPendingCall *
    tp_cli_dbus_peer_call_get_machine_id (gpointer proxy,
                                          gint timeout_ms,
                                          tp_cli_dbus_peer_callback_for_get_machine_id callback,
                                          gpointer user_data,
                                          GDestroyNotify destroy,
                                          GObject *weak_object);

Start a GetMachineId method call.

(Undocumented)

#### Parameters

proxy | the TpProxy |
timeout_ms | the timeout in milliseconds, or -1 to use the default |
callback | called when the method call succeeds or fails; may be `NULL` to make a "fire and forget" call with no reply tracking |
user_data | user-supplied data passed to the callback; must be `NULL` if `callback` is `NULL` |
destroy | called with the user_data as argument, after the call has succeeded, failed or been cancelled; must be `NULL` if `callback` is `NULL` |
weak_object | If not `NULL`, a GObject which will be weakly referenced; if it is destroyed, this call will automatically be cancelled. Must be `NULL` if `callback` is `NULL` |

#### Returns

a TpProxyPendingCall representing the call in progress. It is borrowed from the object, and will become invalid when the callback is called, the call is cancelled or the TpProxy becomes invalid.

### tp_cli_dbus_peer_call_ping ()

    TpProxyPendingCall *
    tp_cli_dbus_peer_call_ping (gpointer proxy,
                                gint timeout_ms,
                                tp_cli_dbus_peer_callback_for_ping callback,
                                gpointer user_data,
                                GDestroyNotify destroy,
                                GObject *weak_object);

Start a Ping method call.

(Undocumented)

#### Parameters

proxy | the TpProxy |
timeout_ms | the timeout in milliseconds, or -1 to use the default |
callback | called when the method call succeeds or fails; may be `NULL` to make a "fire and forget" call with no reply tracking |
user_data | user-supplied data passed to the callback; must be `NULL` if `callback` is `NULL` |
destroy | called with the user_data as argument, after the call has succeeded, failed or been cancelled; must be `NULL` if `callback` is `NULL` |
weak_object | If not `NULL`, a GObject which will be weakly referenced; if it is destroyed, this call will automatically be cancelled. Must be `NULL` if `callback` is `NULL` |

#### Returns

a TpProxyPendingCall representing the call in progress. It is borrowed from the object, and will become invalid when the callback is called, the call is cancelled or the TpProxy becomes invalid.

### tp_cli_dbus_peer_callback_for_get_machine_id ()

    void
    (*tp_cli_dbus_peer_callback_for_get_machine_id)
                                   (TpProxy *proxy,
                                    const gchar *out_Machine_UUID,
                                    const GError *error,
                                    gpointer user_data,
                                    GObject *weak_object);

Signature of the callback called when a GetMachineId method call succeeds or fails.

#### Parameters

proxy | the proxy on which the call was made |
out_Machine_UUID | Used to return an 'out' argument if `error` is `NULL`: (Undocumented) |
error | `NULL` on success, or an error on failure |
user_data | user-supplied data |
weak_object | user-supplied object |

### tp_cli_dbus_peer_callback_for_ping ()

    void
    (*tp_cli_dbus_peer_callback_for_ping) (TpProxy *proxy,
                                           const GError *error,
                                           gpointer user_data,
                                           GObject *weak_object);

Signature of the callback called when a Ping method call succeeds or fails.

#### Parameters

proxy | the proxy on which the call was made |
error | `NULL` on success, or an error on failure |
user_data | user-supplied data |
weak_object | user-supplied object |

### tp_cli_dbus_peer_run_get_machine_id ()

    gboolean
    tp_cli_dbus_peer_run_get_machine_id (gpointer proxy,
                                         gint timeout_ms,
                                         gchar **out_Machine_UUID,
                                         GError **error,
                                         GMainLoop **loop);

`tp_cli_dbus_peer_run_get_machine_id` is deprecated and should not be used in newly-written code.

Call the method GetMachineId and run the main loop until it returns. Before calling this method, you must add a reference to any borrowed objects you need to keep, and generally ensure that everything is in a consistent state.

(Undocumented)

#### Parameters

proxy | A TpProxy or subclass |
timeout_ms | Timeout in milliseconds, or -1 for default |
out_Machine_UUID | Used to return an 'out' argument if `TRUE` is returned: (Undocumented) |
error | If not `NULL`, used to return errors if `FALSE` is returned |
loop | If not `NULL`, set before re-entering the main loop, to point to a GMainLoop which can be used to cancel this call with `g_main_loop_quit()`, causing a return of `FALSE` with `error` set to `TP_DBUS_ERROR_CANCELLED` |

#### Returns

TRUE on success, FALSE and sets `error` on error

### tp_cli_dbus_peer_run_ping ()

    gboolean
    tp_cli_dbus_peer_run_ping (gpointer proxy,
                               gint timeout_ms,
                               GError **error,
                               GMainLoop **loop);

`tp_cli_dbus_peer_run_ping` is deprecated and should not be used in newly-written code.

Call the method Ping and run the main loop until it returns. Before calling this method, you must add a reference to any borrowed objects you need to keep, and generally ensure that everything is in a consistent state.

(Undocumented)

#### Parameters

proxy | A TpProxy or subclass |
timeout_ms | Timeout in milliseconds, or -1 for default |
error | If not `NULL`, used to return errors if `FALSE` is returned |
loop | If not `NULL`, set before re-entering the main loop, to point to a GMainLoop which can be used to cancel this call with `g_main_loop_quit()`, causing a return of `FALSE` with `error` set to `TP_DBUS_ERROR_CANCELLED` |

#### Returns

TRUE on success, FALSE and sets `error` on error

### tp_cli_dbus_properties_call_get ()

    TpProxyPendingCall *
    tp_cli_dbus_properties_call_get (gpointer proxy,
                                     gint timeout_ms,
                                     const gchar *in_Interface_Name,
                                     const gchar *in_Property_Name,
                                     tp_cli_dbus_properties_callback_for_get callback,
                                     gpointer user_data,
                                     GDestroyNotify destroy,
                                     GObject *weak_object);

Start a Get method call.

(Undocumented)

#### Parameters

proxy | the TpProxy |
timeout_ms | the timeout in milliseconds, or -1 to use the default |
in_Interface_Name | Used to pass an 'in' argument: (Undocumented) |
in_Property_Name | Used to pass an 'in' argument: (Undocumented) |
callback | called when the method call succeeds or fails; may be `NULL` to make a "fire and forget" call with no reply tracking |
user_data | user-supplied data passed to the callback; must be `NULL` if `callback` is `NULL` |
destroy | called with the user_data as argument, after the call has succeeded, failed or been cancelled; must be `NULL` if `callback` is `NULL` |
weak_object | If not `NULL`, a GObject which will be weakly referenced; if it is destroyed, this call will automatically be cancelled. Must be `NULL` if `callback` is `NULL` |

#### Returns

a TpProxyPendingCall representing the call in progress. It is borrowed from the object, and will become invalid when the callback is called, the call is cancelled or the TpProxy becomes invalid.

### tp_cli_dbus_properties_call_get_all ()

    TpProxyPendingCall *
    tp_cli_dbus_properties_call_get_all (gpointer proxy,
                                         gint timeout_ms,
                                         const gchar *in_Interface_Name,
                                         tp_cli_dbus_properties_callback_for_get_all callback,
                                         gpointer user_data,
                                         GDestroyNotify destroy,
                                         GObject *weak_object);

Start a GetAll method call.

(Undocumented)

#### Parameters

proxy | the TpProxy |
timeout_ms | the timeout in milliseconds, or -1 to use the default |
in_Interface_Name | Used to pass an 'in' argument: (Undocumented) |
callback | called when the method call succeeds or fails; may be `NULL` to make a "fire and forget" call with no reply tracking |
user_data | user-supplied data passed to the callback; must be `NULL` if `callback` is `NULL` |
destroy | called with the user_data as argument, after the call has succeeded, failed or been cancelled; must be `NULL` if `callback` is `NULL` |
weak_object | If not `NULL`, a GObject which will be weakly referenced; if it is destroyed, this call will automatically be cancelled. Must be `NULL` if `callback` is `NULL` |

#### Returns

a TpProxyPendingCall representing the call in progress. It is borrowed from the object, and will become invalid when the callback is called, the call is cancelled or the TpProxy becomes invalid.

### tp_cli_dbus_properties_call_set ()

    TpProxyPendingCall *
    tp_cli_dbus_properties_call_set (gpointer proxy,
                                     gint timeout_ms,
                                     const gchar *in_Interface_Name,
                                     const gchar *in_Property_Name,
                                     const GValue *in_Value,
                                     tp_cli_dbus_properties_callback_for_set callback,
                                     gpointer user_data,
                                     GDestroyNotify destroy,
                                     GObject *weak_object);

Start a Set method call.

(Undocumented)

#### Parameters

proxy | the TpProxy |
timeout_ms | the timeout in milliseconds, or -1 to use the default |
in_Interface_Name | Used to pass an 'in' argument: (Undocumented) |
in_Property_Name | Used to pass an 'in' argument: (Undocumented) |
in_Value | Used to pass an 'in' argument: (Undocumented) |
callback | called when the method call succeeds or fails; may be `NULL` to make a "fire and forget" call with no reply tracking |
user_data | user-supplied data passed to the callback; must be `NULL` if `callback` is `NULL` |
destroy | called with the user_data as argument, after the call has succeeded, failed or been cancelled; must be `NULL` if `callback` is `NULL` |
weak_object | If not `NULL`, a GObject which will be weakly referenced; if it is destroyed, this call will automatically be cancelled. Must be `NULL` if `callback` is `NULL` |

#### Returns

a TpProxyPendingCall representing the call in progress. It is borrowed from the object, and will become invalid when the callback is called, the call is cancelled or the TpProxy becomes invalid.

### tp_cli_dbus_properties_callback_for_get ()

    void
    (*tp_cli_dbus_properties_callback_for_get)
                                   (TpProxy *proxy,
                                    const GValue *out_Value,
                                    const GError *error,
                                    gpointer user_data,
                                    GObject *weak_object);

Signature of the callback called when a Get method call succeeds or fails.

#### Parameters

proxy | the proxy on which the call was made |
out_Value | Used to return an 'out' argument if `error` is `NULL`: (Undocumented) |
error | `NULL` on success, or an error on failure |
user_data | user-supplied data |
weak_object | user-supplied object |

### tp_cli_dbus_properties_callback_for_get_all ()

    void
    (*tp_cli_dbus_properties_callback_for_get_all)
                                   (TpProxy *proxy,
                                    GHashTable *out_Properties,
                                    const GError *error,
                                    gpointer user_data,
                                    GObject *weak_object);

Signature of the callback called when a GetAll method call succeeds or fails.

#### Parameters

proxy | the proxy on which the call was made |
out_Properties | Used to return an 'out' argument if `error` is `NULL`: (Undocumented) |
error | `NULL` on success, or an error on failure |
user_data | user-supplied data |
weak_object | user-supplied object |

### tp_cli_dbus_properties_callback_for_set ()

    void
    (*tp_cli_dbus_properties_callback_for_set)
                                   (TpProxy *proxy,
                                    const GError *error,
                                    gpointer user_data,
                                    GObject *weak_object);

Signature of the callback called when a Set method call succeeds or fails.

#### Parameters

proxy | the proxy on which the call was made |
error | `NULL` on success, or an error on failure |
user_data | user-supplied data |
weak_object | user-supplied object |

### tp_cli_dbus_properties_run_get ()

    gboolean
    tp_cli_dbus_properties_run_get (gpointer proxy,
                                    gint timeout_ms,
                                    const gchar *in_Interface_Name,
                                    const gchar *in_Property_Name,
                                    GValue **out_Value,
                                    GError **error,
                                    GMainLoop **loop);

`tp_cli_dbus_properties_run_get` is deprecated and should not be used in newly-written code.

Call the method Get and run the main loop until it returns. Before calling this method, you must add a reference to any borrowed objects you need to keep, and generally ensure that everything is in a consistent state.

(Undocumented)

#### Parameters

proxy | A TpProxy or subclass |
timeout_ms | Timeout in milliseconds, or -1 for default |
in_Interface_Name | Used to pass an 'in' argument: (Undocumented) |
in_Property_Name | Used to pass an 'in' argument: (Undocumented) |
out_Value | Used to return an 'out' argument if `TRUE` is returned: (Undocumented) |
error | If not `NULL`, used to return errors if `FALSE` is returned |
loop | If not `NULL`, set before re-entering the main loop, to point to a GMainLoop which can be used to cancel this call with `g_main_loop_quit()`, causing a return of `FALSE` with `error` set to `TP_DBUS_ERROR_CANCELLED` |

#### Returns

TRUE on success, FALSE and sets `error` on error

### tp_cli_dbus_properties_run_get_all ()

    gboolean
    tp_cli_dbus_properties_run_get_all (gpointer proxy,
                                        gint timeout_ms,
                                        const gchar *in_Interface_Name,
                                        GHashTable **out_Properties,
                                        GError **error,
                                        GMainLoop **loop);

`tp_cli_dbus_properties_run_get_all` is deprecated and should not be used in newly-written code.

Call the method GetAll and run the main loop until it returns. Before calling this method, you must add a reference to any borrowed objects you need to keep, and generally ensure that everything is in a consistent state.

(Undocumented)

#### Parameters

proxy | A TpProxy or subclass |
timeout_ms | Timeout in milliseconds, or -1 for default |
in_Interface_Name | Used to pass an 'in' argument: (Undocumented) |
out_Properties | Used to return an 'out' argument if `TRUE` is returned: (Undocumented) |
error | If not `NULL`, used to return errors if `FALSE` is returned |
loop | If not `NULL`, set before re-entering the main loop, to point to a GMainLoop which can be used to cancel this call with `g_main_loop_quit()`, causing a return of `FALSE` with `error` set to `TP_DBUS_ERROR_CANCELLED` |

#### Returns

TRUE on success, FALSE and sets `error` on error

### tp_cli_dbus_properties_signal_callback_properties_changed ()

    void
    (*tp_cli_dbus_properties_signal_callback_properties_changed)
                                   (TpProxy *proxy,
                                    const gchar *arg_Interface_Name,
                                    GHashTable *arg_Changed_Properties,
                                    const gchar **arg_Invalidated_Properties,
                                    gpointer user_data,
                                    GObject *weak_object);

Represents the signature of a callback for the signal PropertiesChanged.

#### Parameters

proxy | The proxy on which `tp_cli_dbus_properties_connect_to_properties_changed()` was called |
arg_Interface_Name | . | [Undocumented]
arg_Changed_Properties | . | [Undocumented]
arg_Invalidated_Properties | . | [Undocumented]
user_data | User-supplied data |
weak_object | User-supplied weakly referenced object |

### tp_cli_dbus_properties_connect_to_properties_changed ()

    TpProxySignalConnection *
    tp_cli_dbus_properties_connect_to_properties_changed
                                   (gpointer proxy,
                                    tp_cli_dbus_properties_signal_callback_properties_changed callback,
                                    gpointer user_data,
                                    GDestroyNotify destroy,
                                    GObject *weak_object,
                                    GError **error);

Connect a handler to the signal PropertiesChanged.

(Undocumented)

#### Parameters

proxy | A TpProxy or subclass |
callback | Callback to be called when the signal is received |
user_data | User-supplied data for the callback |
destroy | Destructor for the user-supplied data, which will be called when this signal is disconnected, or before this function returns `NULL` |
weak_object | A GObject which will be weakly referenced; if it is destroyed, this callback will automatically be disconnected |
error | If not `NULL`, used to raise an error if `NULL` is returned |

#### Returns

a TpProxySignalConnection containing all of the above, which can be used to disconnect the signal; or `NULL` if the proxy does not have the desired interface or has become invalid.

### tp_cli_dbus_properties_run_set ()

    gboolean
    tp_cli_dbus_properties_run_set (gpointer proxy,
                                    gint timeout_ms,
                                    const gchar *in_Interface_Name,
                                    const gchar *in_Property_Name,
                                    const GValue *in_Value,
                                    GError **error,
                                    GMainLoop **loop);

`tp_cli_dbus_properties_run_set` is deprecated and should not be used in newly-written code.

Call the method Set and run the main loop until it returns. Before calling this method, you must add a reference to any borrowed objects you need to keep, and generally ensure that everything is in a consistent state.

(Undocumented)

#### Parameters

proxy | A TpProxy or subclass |
timeout_ms | Timeout in milliseconds, or -1 for default |
in_Interface_Name | Used to pass an 'in' argument: (Undocumented) |
in_Property_Name | Used to pass an 'in' argument: (Undocumented) |
in_Value | Used to pass an 'in' argument: (Undocumented) |
error | If not `NULL`, used to return errors if `FALSE` is returned |
loop | If not `NULL`, set before re-entering the main loop, to point to a GMainLoop which can be used to cancel this call with `g_main_loop_quit()`, causing a return of `FALSE` with `error` set to `TP_DBUS_ERROR_CANCELLED` |

#### Returns

TRUE on success, FALSE and sets `error` on error

## See Also

TpProxy