]> git.stg.codes - stg.git/blobdiff - projects/stargazer/admins_impl.cpp
Simplified admins API
[stg.git] / projects / stargazer / admins_impl.cpp
index 53775717700899a1c332179a336d19e4d2069175..a780fcb316b80c7145b09e73b1c91f0218378c19 100644 (file)
@@ -50,7 +50,7 @@ ADMINS_IMPL::ADMINS_IMPL(STORE * st)
       handle(0)
 {
 pthread_mutex_init(&mutex, NULL);
-ReadAdmins();
+Read();
 }
 //-----------------------------------------------------------------------------
 int ADMINS_IMPL::Add(const string & login, const ADMIN * admin)
@@ -174,7 +174,7 @@ WriteServLog("%s Administrator \'%s\' changed.",
 return 0;
 }
 //-----------------------------------------------------------------------------
-int ADMINS_IMPL::ReadAdmins()
+int ADMINS_IMPL::Read()
 {
 STG_LOCKER lock(&mutex, __FILE__, __LINE__);
 vector<string> adminsList;
@@ -210,7 +210,7 @@ while (ai != data.end())
     }
 }
 //-----------------------------------------------------------------------------
-bool ADMINS_IMPL::FindAdmin(const string & l, ADMIN ** admin)
+bool ADMINS_IMPL::Find(const string & l, ADMIN ** admin)
 {
 assert(admin != NULL && "Pointer to admin is not null");
 
@@ -234,7 +234,7 @@ if (ai != data.end())
 return true;
 }
 //-----------------------------------------------------------------------------
-bool ADMINS_IMPL::AdminExists(const string & login) const
+bool ADMINS_IMPL::Exists(const string & login) const
 {
 STG_LOCKER lock(&mutex, __FILE__, __LINE__);
 if (data.empty())
@@ -252,7 +252,7 @@ if (ai != data.end())
 return false;
 }
 //-----------------------------------------------------------------------------
-bool ADMINS_IMPL::AdminCorrect(const string & login, const std::string & password, ADMIN ** admin)
+bool ADMINS_IMPL::Correct(const string & login, const std::string & password, ADMIN ** admin)
 {
 STG_LOCKER lock(&mutex, __FILE__, __LINE__);
 if (data.empty())