This commit is contained in:
Green Sky 2022-09-28 20:40:49 +02:00
parent c2f5653938
commit 3832906ebb
No known key found for this signature in database
2 changed files with 14 additions and 6 deletions

View File

@ -1,18 +1,23 @@
#include "./ngc_hs1.h"
#include <stdlib.h>
#include <cstdint>
#include <new>
#include <unordered_map>
struct _GroupID {
}
struct NGC_HS1 {
void* temp;
NGC_HS1_options options;
// key - key - value store
// peer pubkey - msg_id - message(type + text)
// key - key - key - value store
// group pubkey - peer pubkey - msg_id - message(type + text)
};
NGC_HS1* NGC_HS1_new(const struct NGC_HS1_options* options) {
NGC_HS1* context = malloc(sizeof(NGC_HS1));
NGC_HS1* context = new NGC_HS1;
context->options = *options;
@ -20,7 +25,7 @@ NGC_HS1* NGC_HS1_new(const struct NGC_HS1_options* options) {
}
void NGC_HS1_kill(NGC_HS1* ngc_hs1_ctx) {
free(ngc_hs1_ctx);
delete ngc_hs1_ctx;
}
void NGC_HS1_iterate(Tox *tox, NGC_HS1* ngc_hs1_ctx/*, void *user_data*/) {

View File

@ -4,7 +4,7 @@
// this is a c header
// outline:
//
// i am disgusting
//#include <stdbool.h>
//#include <stddef.h>
@ -82,6 +82,9 @@ void NGC_HS1_record_own_message(
// ========== receive message ==========
// shim (same interface)
//typedef void tox_group_message_cb(Tox *tox, uint32_t group_number, uint32_t peer_id, Tox_Message_Type type,
//const uint8_t *message, size_t length, uint32_t message_id, void *user_data);
// ========== receive request ==========