You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.5 KiB
C++

// This Source Code Form is subject to the terms of the Mozilla Public
// License, version 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#ifndef _WEECHAT_XMPP_OMEMO_H_
#define _WEECHAT_XMPP_OMEMO_H_
3 years ago
extern const char *OMEMO_ADVICE;
3 years ago
struct t_omemo
{
3 years ago
struct signal_context *context;
3 years ago
struct signal_protocol_store_context *store_context;
3 years ago
struct t_omemo_db *db;
char *db_path;
3 years ago
3 years ago
struct ratchet_identity_key_pair *identity;
3 years ago
uint32_t device_id;
};
struct t_omemo_bundle_req
{
char *id;
char *jid;
char *device;
char *message_text;
};
struct t_omemo_devicelist_req
{
char *id;
struct t_omemo_bundle_req bundle_req;
};
xmpp_stanza_t *omemo__get_bundle(xmpp_ctx_t *context, char *from, char *to,
struct t_omemo *omemo);
3 years ago
void omemo__init(struct t_gui_buffer *buffer, struct t_omemo **omemo,
3 years ago
const char *account_name);
3 years ago
void omemo__handle_devicelist(struct t_omemo *omemo, const char *jid,
xmpp_stanza_t *items);
void omemo__handle_bundle(struct t_omemo *omemo, const char *jid,
uint32_t device_id, xmpp_stanza_t *items);
2 years ago
char *omemo__decode(struct t_account *account, const char *jid,
xmpp_stanza_t *encrypted);
3 years ago
2 years ago
xmpp_stanza_t *omemo__encode(struct t_account *account, const char *jid,
const char *unencrypted);
3 years ago
void omemo__free(struct t_omemo *omemo);
#endif /*WEECHAT_XMPP_OMEMO_H*/