From f21b4362c69452602cb692886b10c414af5208e5 Mon Sep 17 00:00:00 2001 From: Relintai Date: Wed, 7 Jul 2021 12:20:05 +0200 Subject: [PATCH] Added a user module and a (simple for now) User class. --- modules/users/SCsub | 12 ++++++++++++ modules/users/detect.py | 27 +++++++++++++++++++++++++++ modules/users/user.cpp | 9 +++++++++ modules/users/user.h | 22 ++++++++++++++++++++++ 4 files changed, 70 insertions(+) create mode 100644 modules/users/SCsub create mode 100644 modules/users/detect.py create mode 100644 modules/users/user.cpp create mode 100644 modules/users/user.h diff --git a/modules/users/SCsub b/modules/users/SCsub new file mode 100644 index 0000000..33e2978 --- /dev/null +++ b/modules/users/SCsub @@ -0,0 +1,12 @@ +#!/usr/bin/env python + +Import("env_mod") +Import("env") + +env_mod.core_sources = [] + +env_mod.add_source_files(env_mod.core_sources, "*.cpp") + +# Build it all as a library +lib = env_mod.add_library("users", env_mod.core_sources) +env.Prepend(LIBS=[lib]) diff --git a/modules/users/detect.py b/modules/users/detect.py new file mode 100644 index 0000000..d35fcab --- /dev/null +++ b/modules/users/detect.py @@ -0,0 +1,27 @@ +import os +import platform +import sys + + +def is_active(): + return True + + +def get_name(): + return "users" + + +def can_build(): + return True + + +def get_opts(): + return [] + +def get_flags(): + + return [] + + +def configure(env): + pass diff --git a/modules/users/user.cpp b/modules/users/user.cpp new file mode 100644 index 0000000..1b78b04 --- /dev/null +++ b/modules/users/user.cpp @@ -0,0 +1,9 @@ +#include "user.h" + +User::User() : + Object() { + +} + +User::~User() { +} diff --git a/modules/users/user.h b/modules/users/user.h new file mode 100644 index 0000000..b51bb36 --- /dev/null +++ b/modules/users/user.h @@ -0,0 +1,22 @@ +#ifndef USER_H +#define USER_H + +#include "core/object.h" + +#include + +class User : public Object { +public: + int id; + std::string name; + std::string email; + int rank; + std::string pre_salt; + std::string post_salt; + std::string password_hash; + + User(); + ~User(); +}; + +#endif \ No newline at end of file