class test_t
{
public:
struct data_t
{
int number = 0;
} data;
void set(data_t& test_data) { test_data.number = 32; };
void print(data_t test_data) { printf("%i", test_data.number); };
};
int main()
{
test_t test;
test.set(test.data);
test.print(test.data);
}
static bool notification_user_invalid = false,
notification_mismatch_username = false,
notification_mismatch_passsword = false;
namespace client
{
struct data_t
{
struct authorization_t
{
const char* login = nullptr, *password = nullptr;
size_t login_sz = 64, password_sz = 32;
} authorization;
const char* mac = nullptr, *proc_id = nullptr, *mbios = nullptr;
struct logged_in
{
struct subscribe_t
{
const char* product = nullptr;
int id;
const char* status = nullptr, *expired = nullptr;
};
std::vector<subscribe_t> subscribe;
} authorized;
} data;
class connection_t
{
public:
enum class status_t
{
idle,
connected,
logging_in,
logged_in,
};
void connect();
void send_data();
void receive_data();
void shutdown();
};
class request_t
{
public:
enum class auth_responses_t
{
unknown_user,
};
auth_responses_t authorization();
};
class utilities_t
{
public:
const char* get_mac();
const char* get_proc_id();
const char* get_mbios();
};
connection_t connection;
request_t request;
utilities_t utilities;
};