| telepathy-glib API Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Implemented Interfaces | Properties | ||||
TpSimpleApproverTpSimpleApprover — a subclass of TpBaseClient implementing a simple Approver |
#include <telepathy-glib/simple-approver.h>
TpSimpleApprover;
void (*TpSimpleApproverAddDispatchOperationImpl)
(TpSimpleApprover *approver,
TpAccount *account,
TpConnection *connection,
GList *channels,
TpChannelDispatchOperation *dispatch_operation,
TpAddDispatchOperationContext *context,
gpointer user_data);
TpBaseClient * tp_simple_approver_new (TpDBusDaemon *dbus,
const gchar *name,
gboolean uniquify,
TpSimpleApproverAddDispatchOperationImpl callback,
gpointer user_data,
GDestroyNotify destroy);
TpBaseClient * tp_simple_approver_new_with_am (TpAccountManager *account_manager,
const gchar *name,
gboolean uniquify,
TpSimpleApproverAddDispatchOperationImpl callback,
gpointer user_data,
GDestroyNotify destroy);
TpSimpleApprover implements TpSvcDBusProperties, TpSvcClient, TpSvcClientObserver, TpSvcClientApprover, TpSvcClientHandler and TpSvcClientInterfaceRequests.
"callback" gpointer : Write / Construct Only "destroy" gpointer : Write / Construct Only "user-data" gpointer : Write / Construct Only
This class makes it easier to construct a TpSvcClient implementing the TpSvcClientApprover interface.
A typical simple approver would look liks this:
1 |
See examples/client/text-approver.c for a complete example.
typedef struct _TpSimpleApprover TpSimpleApprover;
Data structure representing a simple Approver implementation.
Since 0.11.5
void (*TpSimpleApproverAddDispatchOperationImpl) (TpSimpleApprover *approver,TpAccount *account,TpConnection *connection,GList *channels,TpChannelDispatchOperation *dispatch_operation,TpAddDispatchOperationContext *context,gpointer user_data);
Signature of the implementation of the AddDispatchOperation method.
This function must call either tp_add_dispatch_operation_context_accept(),
tp_add_dispatch_operation_context_delay() or
tp_add_dispatch_operation_context_fail() on context before it returns.
|
a TpSimpleApprover instance |
|
a TpAccount having TP_ACCOUNT_FEATURE_CORE prepared if possible
|
|
a TpConnection having TP_CONNECTION_FEATURE_CORE prepared
if possible
|
|
a GList of TpChannel,
all having TP_CHANNEL_FEATURE_CORE prepared. [element-type TelepathyGLib.Channel]
|
|
a TpChannelDispatchOperation or NULL;
the dispatch_operation is not guaranteed to be prepared. [allow-none]
|
|
a TpAddDispatchOperationContext representing the context of this D-Bus call |
|
arbitrary user-supplied data passed to tp_simple_approver_new()
|
Since 0.11.5
TpBaseClient * tp_simple_approver_new (TpDBusDaemon *dbus,const gchar *name,gboolean uniquify,TpSimpleApproverAddDispatchOperationImpl callback,gpointer user_data,GDestroyNotify destroy);
Convenient function to create a new TpSimpleApprover instance.
If dbus is not the result of tp_dbus_daemon_dup(), you should call
tp_simple_approver_new_with_am() instead, so that TpAccount,
TpConnection and TpContact instances can be shared between modules.
|
a TpDBusDaemon object, may not be NULL
|
|
the name of the Approver (see "name" for details) |
|
the value of the "uniquify-name" property |
|
the function called when AddDispatchOperation is called |
|
arbitrary user-supplied data passed to callback
|
|
called with user_data as its argument when the TpSimpleApprover
is destroyed
|
Returns : |
a new TpSimpleApprover. [type TelepathyGLib.SimpleApprover] |
Since 0.11.5
TpBaseClient * tp_simple_approver_new_with_am (TpAccountManager *account_manager,const gchar *name,gboolean uniquify,TpSimpleApproverAddDispatchOperationImpl callback,gpointer user_data,GDestroyNotify destroy);
Convenient function to create a new TpSimpleApprover instance with a specified TpAccountManager.
It is not necessary to prepare any features on account_manager before
calling this function.
|
an account manager, which may not be NULL
|
|
the name of the Approver (see "name" for details) |
|
the value of the "uniquify-name" property |
|
the function called when AddDispatchOperation is called |
|
arbitrary user-supplied data passed to callback
|
|
called with user_data as its argument when the TpSimpleApprover
is destroyed
|
Returns : |
a new TpSimpleApprover. [type TelepathyGLib.SimpleApprover] |
Since 0.11.14
"callback" property"callback" gpointer : Write / Construct Only
The TpSimpleApproverAddDispatchOperationImpl callback implementing the AddDispatchOperation D-Bus method.
This property can't be NULL.
Since 0.11.5
"destroy" property"destroy" gpointer : Write / Construct Only
The GDestroyNotify function called to free "user-data" when the TpSimpleApprover is destroyed.
Since 0.11.5
"user-data" property"user-data" gpointer : Write / Construct Only
The user-data pointer passed to "callback".
Since 0.11.5