wip more refactoring
This commit is contained in:
61
ngc_ft1.h
Normal file
61
ngc_ft1.h
Normal file
@ -0,0 +1,61 @@
|
||||
#ifndef C_NGC_FT1_H
|
||||
#define C_NGC_FT1_H
|
||||
|
||||
// this is a c header
|
||||
|
||||
#include <tox/tox.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
// copy from tox.h:
|
||||
#ifndef TOX_DEFINED
|
||||
#define TOX_DEFINED
|
||||
typedef struct Tox Tox;
|
||||
#endif /* TOX_DEFINED */
|
||||
|
||||
|
||||
|
||||
|
||||
// ========== struct / typedef ==========
|
||||
|
||||
typedef struct NGC_FT1 NGC_FT1;
|
||||
|
||||
struct NGC_FT1_options {
|
||||
int tmp;
|
||||
};
|
||||
|
||||
// ========== init / kill ==========
|
||||
// (see tox api)
|
||||
bool NGC_FT1_init(NGC_EXT_CTX* ngc_ext_ctx, const struct NGC_FT1_options* options);
|
||||
void NGC_FT1_kill(NGC_EXT_CTX* ngc_ext_ctx);
|
||||
|
||||
// ========== iterate ==========
|
||||
void NGC_FT1_iterate(Tox *tox, NGC_FT1* ngc_hs1_ctx/*, void *user_data*/);
|
||||
|
||||
// ========== peer online/offline ==========
|
||||
|
||||
//void NGC_FT1_peer_online(Tox* tox, NGC_FT1* ngc_hs1_ctx, uint32_t group_number, uint32_t peer_number, bool online);
|
||||
|
||||
// "callback"
|
||||
void NGC_FT1_handle_group_custom_packet(
|
||||
Tox* tox,
|
||||
NGC_FT1* ngc_hs1_ctx,
|
||||
|
||||
uint32_t group_number,
|
||||
uint32_t peer_number,
|
||||
|
||||
const uint8_t *data,
|
||||
size_t length
|
||||
//void *user_data
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // C_NGC_FT1_H
|
||||
|
Reference in New Issue
Block a user