This repository has been archived on 2023-01-13. You can view files and clone it, but cannot push or open issues or pull requests.
NGC_HS1/ngc_ft1.cpp

32 lines
915 B
C++

#include "./ngc_ft1.h"
#include "ngc_ext_common.hpp"
struct NGC_FT1 {
NGC_FT1_options options;
};
bool NGC_FT1_init(NGC_EXT_CTX* ngc_ext_ctx, const struct NGC_FT1_options* options) {
ngc_ext_ctx->ngc_ft1_ctx = new NGC_FT1;
ngc_ext_ctx->ngc_ft1_ctx->options = *options;
ngc_ext_ctx->callbacks[FT1_REQUEST] = nullptr;
ngc_ext_ctx->callbacks[FT1_INIT] = nullptr;
ngc_ext_ctx->callbacks[FT1_INIT_ACK] = nullptr;
ngc_ext_ctx->callbacks[FT1_DATA] = nullptr;
ngc_ext_ctx->callbacks[FT1_DATA_ACK] = nullptr;
ngc_ext_ctx->callbacks[FT1_DATA_FIN] = nullptr;
ngc_ext_ctx->callbacks[FT1_DATA_FIN_ACK] = nullptr;
//ngc_ext_ctx->callbacks[HS1_REQUEST_LAST_IDS] = _handle_HS1_REQUEST_LAST_IDS;
//ngc_ext_ctx->callbacks[HS1_RESPONSE_LAST_IDS] = _handle_HS1_RESPONSE_LAST_IDS;
return true;
}
void NGC_FT1_kill(NGC_EXT_CTX* ngc_ext_ctx) {
delete ngc_ext_ctx->ngc_ft1_ctx;
ngc_ext_ctx->ngc_ft1_ctx = nullptr;
}