Browse Source

pEpSQLite - some const members

LIB-12
heck 4 years ago
parent
commit
2b0489f114
  1. 6
      src/pEpSQLite.cc
  2. 6
      src/pEpSQLite.hh

6
src/pEpSQLite.cc

@ -9,7 +9,7 @@ using namespace std;
namespace pEp {
bool pEpSQLite::log_enabled = false;
pEpSQLite::pEpSQLite(std::string db_path) : db_path(db_path)
pEpSQLite::pEpSQLite(const std::string& db_path) : db_path(db_path)
{
pEpLogClass("called with: db_path = " + db_path + "");
}
@ -26,7 +26,7 @@ namespace pEp {
}
}
string pEpSQLite::get_db_path()
string pEpSQLite::get_db_path() const
{
pEpLogClass("called");
return db_path;
@ -41,7 +41,7 @@ namespace pEp {
}
}
bool pEpSQLite::is_open()
bool pEpSQLite::is_open() const
{
if (db == nullptr) {
return false;

6
src/pEpSQLite.hh

@ -19,14 +19,14 @@ namespace pEp {
pEpSQLite() = delete;
// The database file as a constant for the obj lifetime
pEpSQLite(std::string db_path);
std::string get_db_path();
explicit pEpSQLite(const std::string& db_path);
std::string get_db_path() const;
// Creates the database file not existsing
// Will not create any dirs
void create_or_open_db();
void close_db();
bool is_open();
bool is_open() const;
// Delete the database file
void delete_db();

Loading…
Cancel
Save