diff --git a/ngc_hs1.c b/ngc_hs1.cpp similarity index 82% rename from ngc_hs1.c rename to ngc_hs1.cpp index 9bf51ac..de6ea77 100644 --- a/ngc_hs1.c +++ b/ngc_hs1.cpp @@ -1,18 +1,23 @@ #include "./ngc_hs1.h" -#include +#include +#include +#include + +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*/) { diff --git a/ngc_hs1.h b/ngc_hs1.h index 8f942f9..57cf31b 100644 --- a/ngc_hs1.h +++ b/ngc_hs1.h @@ -4,7 +4,7 @@ // this is a c header // outline: -// +// i am disgusting //#include //#include @@ -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 ==========