basic commandline parsing + basic tox setup

This commit is contained in:
2023-01-13 21:11:42 +01:00
parent 04310100b5
commit b7915c55a4
8 changed files with 352 additions and 1 deletions

31
src/tox_client.hpp Normal file
View File

@@ -0,0 +1,31 @@
#pragma once
#include "./command_line.hpp"
#include <tox/tox.h>
#include <ngc_ext.h>
#include <ngc_ft1.h>
#include <string>
struct ToxClient final {
ToxClient(const CommandLine& cl);
void iterate(void);
void setToxProfilePath(const std::string& new_path) { _tox_profile_path = new_path; }
std::string getOwnAddress(void) const;
private:
void saveToxProfile(void);
private:
Tox* _tox {nullptr};
NGC_EXT_CTX* _ext_ctx {nullptr};
NGC_FT1* _ft1_ctx {nullptr};
std::string _tox_profile_path;
bool _tox_profile_dirty {false}; // set in callbacks
};