weechat-xmpp/omemo.h

37 lines
1023 B
C
Raw Normal View History

2021-07-02 18:46:58 +00:00
// 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_
2021-07-22 05:58:45 +00:00
extern const char *OMEMO_ADVICE;
2021-07-07 17:27:06 +00:00
struct t_omemo
{
2021-07-25 08:15:12 +00:00
struct signal_context *context;
2021-07-27 21:27:03 +00:00
struct signal_protocol_store_context *store_context;
struct {
struct MDB_env *env;
struct MDB_dbi *dbi;
} db;
2021-07-07 17:27:06 +00:00
2021-07-25 18:28:34 +00:00
struct ratchet_identity_key_pair *identity;
2021-07-07 17:27:06 +00:00
uint32_t device_id;
};
2021-07-25 08:15:12 +00:00
void omemo__init(struct t_gui_buffer *buffer, struct t_omemo **omemo,
2021-07-27 21:27:03 +00:00
const char *account_name);
2021-07-25 18:28:34 +00:00
void omemo__serialize(struct t_omemo *omemo, char **device,
char **identity, size_t *identity_len);
void omemo__deserialize(struct t_omemo *omemo, const char *device,
const char *identity, size_t identity_len);
2021-07-07 17:27:06 +00:00
void omemo__free(struct t_omemo *omemo);
2021-07-02 18:46:58 +00:00
#endif /*WEECHAT_XMPP_OMEMO_H*/