diff options
author | dec05eba <0xdec05eba@gmail.com> | 2018-05-14 00:20:11 +0200 |
---|---|---|
committer | dec05eba <0xdec05eba@gmail.com> | 2018-05-14 00:27:29 +0200 |
commit | 9af086151e6d9d3fe88f9e3e21797812a3e701ba (patch) | |
tree | a11889f81b8f929c11dccbd2c1c3b3cd74fbb740 /src/Group.cpp | |
parent | ebff7aeafded4dd9d245dbcfc80d9c8d83fe1242 (diff) |
Replace files with sqlite
Using sqlite because sqlite has transactions, storing/loading from files
automatically, unloading data that is not accessed often.
Removed cosmetic data (node name, username). They can be added using
addData by the application that uses odhtdb instead.
Database callback functions can now be called with stored data using
database.loadNode function.
TODO: Add local user storage (with password) back, it has been temorary
disabled
Diffstat (limited to 'src/Group.cpp')
-rw-r--r-- | src/Group.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/Group.cpp b/src/Group.cpp index 4210142..9db3e4e 100644 --- a/src/Group.cpp +++ b/src/Group.cpp @@ -6,12 +6,9 @@ using namespace std; namespace odhtdb { - Group::Group(const string &_name, uint8_t _id[GROUP_ID_LENGTH], const Permission &_permission) : - name(_name), + Group::Group(uint8_t _id[GROUP_ID_LENGTH], const Permission &_permission) : permission(_permission) { - if(name.size() > 255) - throw GroupNameTooLongException(name); memcpy(id, _id, GROUP_ID_LENGTH); } @@ -37,11 +34,6 @@ namespace odhtdb } return false; } - - const string& Group::getName() const - { - return name; - } DataView Group::getId() const { |