Top | ![]() |
![]() |
![]() |
![]() |
TpSimpleApproverTpSimpleApprover — a subclass of TpBaseClient implementing a simple Approver |
TpSimpleApprover implements TpSvcDBusProperties, TpSvcClient, TpSvcClientObserver, TpSvcClientApprover, TpSvcClientHandler and TpSvcClientInterfaceRequests.
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.
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.
approver |
a TpSimpleApprover instance |
|
account |
a TpAccount having |
|
connection |
a TpConnection having |
|
channels |
a GList of TpChannel,
all having |
[element-type TelepathyGLib.Channel] |
dispatch_operation |
a TpChannelDispatchOperation or |
[allow-none] |
context |
a TpAddDispatchOperationContext representing the context of this D-Bus call |
|
user_data |
arbitrary user-supplied data passed to |
Since: 0.11.5
TpBaseClient * tp_simple_approver_new (TpDBusDaemon *dbus
,const gchar *name
,gboolean uniquify
,TpSimpleApproverAddDispatchOperationImpl callback
,gpointer user_data
,GDestroyNotify destroy
);
tp_simple_approver_new
is deprecated and should not be used in newly-written code.
New code should use tp_simple_approver_new_with_am()
instead.
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.
dbus |
a TpDBusDaemon object, may not be |
|
name |
the name of the Approver (see “name” for details) |
|
uniquify |
the value of the “uniquify-name” property |
|
callback |
the function called when AddDispatchOperation is called |
|
user_data |
arbitrary user-supplied data passed to |
|
destroy |
called with |
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.
account_manager |
an account manager, which may not be |
|
name |
the name of the Approver (see “name” for details) |
|
uniquify |
the value of the “uniquify-name” property |
|
callback |
the function called when AddDispatchOperation is called |
|
user_data |
arbitrary user-supplied data passed to |
|
destroy |
called with |
Since: 0.11.14
TpBaseClient * tp_simple_approver_new_with_factory (TpSimpleClientFactory *factory
,const gchar *name
,gboolean uniquify
,TpSimpleApproverAddDispatchOperationImpl callback
,gpointer user_data
,GDestroyNotify destroy
);
Convenient function to create a new TpSimpleApprover instance with a specified TpSimpleClientFactory.
factory |
an TpSimpleClientFactory, which may not be |
|
name |
the name of the Approver (see “name” for details) |
|
uniquify |
the value of the “uniquify-name” property |
|
callback |
the function called when AddDispatchOperation is called |
|
user_data |
arbitrary user-supplied data passed to |
|
destroy |
called with |
Since: 0.15.5
“callback”
property “callback” gpointer
The TpSimpleApproverAddDispatchOperationImpl callback implementing the AddDispatchOperation D-Bus method.
This property can't be NULL
.
Flags: Write / Construct Only
Since: 0.11.5
“destroy”
property “destroy” gpointer
The GDestroyNotify function called to free “user-data” when the TpSimpleApprover is destroyed.
Flags: Write / Construct Only
Since: 0.11.5
“user-data”
property “user-data” gpointer
The user-data pointer passed to “callback”.
Flags: Write / Construct Only
Since: 0.11.5