libsignal-protocol-c  master
session_builder.h
1 #ifndef SESSION_BUILDER_H
2 #define SESSION_BUILDER_H
3 
4 #include <stdint.h>
5 #include "signal_protocol_types.h"
6 
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
10 
11 /*
12  * Session builder is responsible for setting up encrypted sessions.
13  * Once a session has been established, session_cipher
14  * can be used to encrypt/decrypt messages in that session.
15  *
16  * Sessions are built from one these different possible vectors:
17  * - A session_pre_key_bundle retrieved from a server
18  * - A pre_key_signal_message received from a client
19  *
20  * Sessions are constructed per Signal Protocol address
21  * (recipient name + device ID tuple). Remote logical users are identified by
22  * their recipient name, and each logical recipient can have multiple
23  * physical devices.
24  */
25 
40 int session_builder_create(session_builder **builder,
41  signal_protocol_store_context *store, const signal_protocol_address *remote_address,
42  signal_context *global_context);
43 
52 int session_builder_process_pre_key_bundle(session_builder *builder, session_pre_key_bundle *bundle);
53 
54 void session_builder_free(session_builder *builder);
55 
56 #ifdef __cplusplus
57 }
58 #endif
59 
60 #endif /* SESSION_BUILDER_H */
Definition: session_builder.c:14
Definition: signal_protocol.c:25
Definition: signal_protocol_internal.h:23
Definition: session_pre_key.c:26
Definition: signal_protocol_types.h:39