add interactive shell

This commit is contained in:
Martin Michelsen
2019-01-29 00:17:04 -08:00
parent d0408246d3
commit f3842b49f3
10 changed files with 274 additions and 15 deletions
+5
View File
@@ -34,6 +34,8 @@ struct License {
char gc_password[12]; // GC password
uint32_t privileges; // privilege level
uint64_t ban_end_time; // end time of ban (zero = not banned)
std::string str() const;
} __attribute__((packed));
class LicenseManager {
@@ -49,8 +51,11 @@ public:
const char* password) const;
void ban_until(uint32_t serial_number, uint64_t seconds);
size_t count() const;
void add(std::shared_ptr<License> l);
void remove(uint32_t serial_number);
std::vector<License> snapshot() const;
protected:
void save_locked() const;