Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unified state #78

Draft
wants to merge 25 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
09282b2
Created the State class and started wrapping functions
mpretty-cyro Dec 15, 2023
f33d342
[WIP] Working on the State 'send' hook
mpretty-cyro Dec 18, 2023
1a1e3b6
Progress on the state object
mpretty-cyro Jan 30, 2024
c616fd0
Merge remote-tracking branch 'upstream/dev' into unified-state
mpretty-cyro Jan 30, 2024
4fe1e44
Added current_hashes, made send hook more generic
mpretty-cyro Feb 2, 2024
e582ca9
Moved the C API for USER_PROFILE entirely into the state object
mpretty-cyro Feb 2, 2024
3f1f6d2
Updated the Contact C API to run via the state object
mpretty-cyro Feb 5, 2024
5a305f0
Updated to Immutable/Mutable access approach, reverted unneeded changes
mpretty-cyro Feb 14, 2024
9fa587d
Updated GroupInfo C API, added create_group function, tweaks to send …
mpretty-cyro Feb 15, 2024
1e35370
Updated the GroupMembers C API to be state based
mpretty-cyro Feb 15, 2024
faff844
Updated group keys C API to run via state, some renaming for clarity
mpretty-cyro Feb 19, 2024
f7ee549
Fixed a few bugs and added some missing comments
mpretty-cyro Feb 21, 2024
bfadd65
Fixed a signature generation issue when updating keys
mpretty-cyro Feb 22, 2024
aab569a
Fixed an issue where the timestamp passed to 'store' could be incorrect
mpretty-cyro Feb 22, 2024
5ea15f3
Added a 'add_group_members' function to handle key rotation internally
mpretty-cyro Feb 23, 2024
729ad3c
Tweak the C API for the add_group_members function
mpretty-cyro Feb 23, 2024
edda5cf
Added more unit tests, fixed a few bugs
mpretty-cyro Feb 26, 2024
8e213cc
Added unit tests for complicated state group functions
mpretty-cyro Feb 26, 2024
4220979
Fixed a request handling bug
mpretty-cyro Feb 27, 2024
702a703
Fixed a couple of bugs and formatting
mpretty-cyro Feb 27, 2024
c2f8a40
Expose an error string so iOS can catch and handle it
mpretty-cyro Feb 27, 2024
1f4ba98
Fixed a couple of bugs with error handling
mpretty-cyro Feb 28, 2024
de5d182
Attempt to fix CI build errors
mpretty-cyro Feb 28, 2024
209b4b4
Moved the 'state' stuff from it's own lib into 'config'
mpretty-cyro Feb 29, 2024
d77458c
PR comment fixes, ran the formatter, test fixes
mpretty-cyro Feb 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/build*/
/compile_commands.json
/.cache/
/.vscode/
/.vscode/
.DS_Store
12 changes: 12 additions & 0 deletions include/session/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,22 @@
extern "C" {
#endif

#include <stddef.h>
#include <stdint.h>

typedef int64_t seqno_t;

/// Struct containing a list of C strings. Typically where this is returned by this API it must be
/// freed (via `free()`) when done with it.
///
/// When returned as a pointer by a libsession-util function this is allocated in such a way that
/// just the outer session_string_list can be free()d to free both the list *and* the inner `value`
/// and pointed-at values.
typedef struct session_string_list {
char** value; // array of null-terminated C strings
size_t len; // length of `value`
} session_string_list;

#ifdef __cplusplus
}
#endif
Loading