Browse Source

ListMangerDummy - some const for the methods

LIB-12
heck 9 months ago
parent
commit
e741064461
2 changed files with 11 additions and 10 deletions
  1. +4
    -4
      src/listmanager_dummy.cc
  2. +7
    -6
      src/listmanager_dummy.hh

+ 4
- 4
src/listmanager_dummy.cc View File

@ -76,14 +76,14 @@ namespace pEp {
}
// public
void ListManagerDummy::close_db()
void ListManagerDummy::close_db() const
{
pEpLogClass("called");
db.close_db();
}
// public
void ListManagerDummy::delete_db()
void ListManagerDummy::delete_db() const
{
pEpLogClass("called");
try {
@ -188,7 +188,7 @@ namespace pEp {
}
// public
std::string ListManagerDummy::moderator(std::string list_address)
std::string ListManagerDummy::moderator(const std::string& list_address)
{
pEpLogClass("called");
ensure_db_initialized();
@ -216,7 +216,7 @@ namespace pEp {
}
// public
std::vector<std::string> ListManagerDummy::members(std::string list_address)
std::vector<std::string> ListManagerDummy::members(const std::string& list_address)
{
pEpLogClass("called");
ensure_db_initialized();


+ 7
- 6
src/listmanager_dummy.hh View File

@ -12,19 +12,20 @@
namespace pEp {
class ListManagerDummy {
public:
ListManagerDummy(const std::string& db_path);
ListManagerDummy() = delete;
explicit ListManagerDummy(const std::string& db_path);
// Update
void list_add(const std::string& addr_list, const std::string& addr_mgr);
void list_add(const std::string& addr_list, const std::string& addr_mgr) ;
void list_delete(const std::string& addr_list);
void member_add(const std::string& addr_list, const std::string& addr_member);
void member_remove(const std::string& addr_list, const std::string& addr_member);
// Query
std::vector<std::string> lists();
std::string moderator(std::string list_address);
std::vector<std::string> members(std::string list_address);
std::string moderator(const std::string& list_address);
std::vector<std::string> members(const std::string& list_address);
// db
void close_db();
void delete_db();
void close_db() const;
void delete_db() const;
// Logging
static bool log_enabled;
Adapter::pEpLog::pEpLogger logger{"ListManagerDummy", log_enabled};


Loading…
Cancel
Save