Commit 044418f5 authored by Benjamin Berg's avatar Benjamin Berg

Add new API to allow automatic server side deletion of client

If gclue_client_proxy_create_full is called with the corresponding flag
set, then the newly created GClueClientProxy will be set up so that
DeleteClient is automatically called on the server when the object is
destroyed.

See #102
parent b3fe46d4
......@@ -58,6 +58,9 @@ gclue_client_complete_stop
gclue_client_proxy_create
gclue_client_proxy_create_finish
gclue_client_proxy_create_sync
gclue_client_proxy_create_full
gclue_client_proxy_create_full_finish
gclue_client_proxy_create_full_sync
gclue_client_proxy_new
gclue_client_proxy_new_finish
gclue_client_proxy_new_sync
......@@ -85,6 +88,9 @@ GClueClientProxyPrivate
GClueAccuracyLevel
GCLUE_TYPE_ACCURACY_LEVEL
gclue_accuracy_level_get_type
GClueClientProxyCreateFlags
GCLUE_TYPE_CLIENT_PROXY_CREATE_FLAGS
gclue_client_proxy_create_flags_get_type
<SUBSECTION Private>
gclue_accuracy_level_build_string_from_mask
gclue_accuracy_level_get_string
......
This diff is collapsed.
......@@ -42,6 +42,20 @@ GClueClient * gclue_client_proxy_create_sync (const char *desktop_id
GCancellable *cancellable,
GError **error);
void gclue_client_proxy_create_full (const char *desktop_id,
GClueAccuracyLevel accuracy_level,
GClueClientProxyCreateFlags flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
GClueClient * gclue_client_proxy_create_full_finish (GAsyncResult *result,
GError **error);
GClueClient * gclue_client_proxy_create_full_sync (const char *desktop_id,
GClueAccuracyLevel accuracy_level,
GClueClientProxyCreateFlags flags,
GCancellable *cancellable,
GError **error);
G_END_DECLS
#endif /* #ifndef __GCLUE_HELPERS_H__*/
......@@ -49,6 +49,18 @@ typedef enum {/*< underscore_name=gclue_accuracy_level>*/
const char *gclue_accuracy_level_get_string (GClueAccuracyLevel val);
/**
* GClueClientProxyCreateFlags:
* @GCLUE_CLIENT_PROXY_CREATE_NONE: Empty set of create flags
* @GCLUE_CLIENT_PROXY_CREATE_AUTO_DELETE:
* Automatically delete the client from the server when the #GClueClient is
* destroyed. This flag should usually be set.
**/
typedef enum {/*< underscore_name=gclue_client_proxy_create_flags>*/
GCLUE_CLIENT_PROXY_CREATE_NONE = 0,
GCLUE_CLIENT_PROXY_CREATE_AUTO_DELETE = 1 << 0,
} GClueClientProxyCreateFlags;
G_END_DECLS
#endif /* GCLUE_ENUMS_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment