cap_server_time: update doodads for AV2
This commit is contained in:
parent
41fb059881
commit
d821282260
2 changed files with 9 additions and 17 deletions
|
@ -46,7 +46,7 @@ mapi_cap_list_av2 cap_account_tag_cap_list[] = {
|
||||||
{ 0, NULL, NULL, NULL },
|
{ 0, NULL, NULL, NULL },
|
||||||
};
|
};
|
||||||
static const char cap_account_tag_desc[] =
|
static const char cap_account_tag_desc[] =
|
||||||
"Provides the account-tag capability";
|
"Provides the account-tag client capability";
|
||||||
|
|
||||||
static void
|
static void
|
||||||
cap_account_tag_process(hook_data *data)
|
cap_account_tag_process(hook_data *data)
|
||||||
|
|
|
@ -35,13 +35,18 @@
|
||||||
#include "inline/stringops.h"
|
#include "inline/stringops.h"
|
||||||
|
|
||||||
static void cap_server_time_process(hook_data *);
|
static void cap_server_time_process(hook_data *);
|
||||||
|
unsigned int CLICAP_SERVER_TIME = 0;
|
||||||
|
|
||||||
mapi_hfn_list_av1 cap_server_time_hfnlist[] = {
|
mapi_hfn_list_av1 cap_server_time_hfnlist[] = {
|
||||||
{ "outbound_msgbuf", (hookfn) cap_server_time_process },
|
{ "outbound_msgbuf", (hookfn) cap_server_time_process },
|
||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
|
mapi_cap_list_av2 cap_server_time_cap_list[] = {
|
||||||
unsigned int CLICAP_SERVER_TIME = 0;
|
{ MAPI_CAP_CLIENT, "server-time", NULL, &CLICAP_SERVER_TIME },
|
||||||
|
{ 0, NULL, NULL, NULL }
|
||||||
|
};
|
||||||
|
static const char cap_server_time_desc[] =
|
||||||
|
"Provides the server-time client capability";
|
||||||
|
|
||||||
static void
|
static void
|
||||||
cap_server_time_process(hook_data *data)
|
cap_server_time_process(hook_data *data)
|
||||||
|
@ -55,17 +60,4 @@ cap_server_time_process(hook_data *data)
|
||||||
msgbuf_append_tag(msgbuf, "time", buf, CLICAP_SERVER_TIME);
|
msgbuf_append_tag(msgbuf, "time", buf, CLICAP_SERVER_TIME);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
DECLARE_MODULE_AV2(cap_server_time, NULL, NULL, NULL, NULL, cap_server_time_hfnlist, cap_server_time_cap_list, NULL, cap_server_time_desc);
|
||||||
_modinit(void)
|
|
||||||
{
|
|
||||||
CLICAP_SERVER_TIME = capability_put(cli_capindex, "server-time", NULL);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
_moddeinit(void)
|
|
||||||
{
|
|
||||||
capability_orphan(cli_capindex, "server-time");
|
|
||||||
}
|
|
||||||
|
|
||||||
DECLARE_MODULE_AV2(cap_server_time, _modinit, _moddeinit, NULL, NULL, cap_server_time_hfnlist, NULL, NULL, NULL);
|
|
||||||
|
|
Loading…
Reference in a new issue