lets c++
This commit is contained in:
parent
c2f5653938
commit
3832906ebb
@ -1,18 +1,23 @@
|
|||||||
#include "./ngc_hs1.h"
|
#include "./ngc_hs1.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <cstdint>
|
||||||
|
#include <new>
|
||||||
|
#include <unordered_map>
|
||||||
|
|
||||||
|
struct _GroupID {
|
||||||
|
}
|
||||||
|
|
||||||
struct NGC_HS1 {
|
struct NGC_HS1 {
|
||||||
void* temp;
|
void* temp;
|
||||||
|
|
||||||
NGC_HS1_options options;
|
NGC_HS1_options options;
|
||||||
|
|
||||||
// key - key - value store
|
// key - key - key - value store
|
||||||
// peer pubkey - msg_id - message(type + text)
|
// group pubkey - peer pubkey - msg_id - message(type + text)
|
||||||
};
|
};
|
||||||
|
|
||||||
NGC_HS1* NGC_HS1_new(const struct NGC_HS1_options* options) {
|
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;
|
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) {
|
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*/) {
|
void NGC_HS1_iterate(Tox *tox, NGC_HS1* ngc_hs1_ctx/*, void *user_data*/) {
|
@ -4,7 +4,7 @@
|
|||||||
// this is a c header
|
// this is a c header
|
||||||
|
|
||||||
// outline:
|
// outline:
|
||||||
//
|
// i am disgusting
|
||||||
|
|
||||||
//#include <stdbool.h>
|
//#include <stdbool.h>
|
||||||
//#include <stddef.h>
|
//#include <stddef.h>
|
||||||
@ -82,6 +82,9 @@ void NGC_HS1_record_own_message(
|
|||||||
// ========== receive message ==========
|
// ========== receive message ==========
|
||||||
|
|
||||||
// shim (same interface)
|
// 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 ==========
|
// ========== receive request ==========
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user