summaryrefslogtreecommitdiffstats
path: root/src/modules/UserBackendMysql/UserBackendMysql.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/UserBackendMysql/UserBackendMysql.h')
-rw-r--r--src/modules/UserBackendMysql/UserBackendMysql.h22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/modules/UserBackendMysql/UserBackendMysql.h b/src/modules/UserBackendMysql/UserBackendMysql.h
index eadbf3b..52a134a 100644
--- a/src/modules/UserBackendMysql/UserBackendMysql.h
+++ b/src/modules/UserBackendMysql/UserBackendMysql.h
@@ -49,26 +49,28 @@ class UserBackendMysql : public Common::UserBackend, private Core::Configurable
MYSQL *mysql;
+ boost::posix_time::ptime lastUpdate;
+
boost::mutex mutex;
protected:
virtual bool handleConfigEntry(const Core::ConfigEntry &entry, bool);
virtual void configFinished();
- virtual boost::shared_ptr<const std::map<unsigned long, Common::UserInfo> > getUserList() throw(Core::Exception);
- virtual boost::shared_ptr<const Common::UserInfo> getUserInfo(unsigned long uid) throw(Core::Exception);
- virtual boost::shared_ptr<const Common::UserInfo> getUserInfoByName(const std::string &name) throw(Core::Exception);
- virtual boost::shared_ptr<const std::set<unsigned long> > getUserGroupList(unsigned long uid) throw(Core::Exception);
+ virtual boost::shared_ptr<const std::map<unsigned long, Common::UserInfo> > getUserList(boost::posix_time::ptime *timestamp) throw(Core::Exception);
+ virtual boost::shared_ptr<const Common::UserInfo> getUserInfo(unsigned long uid, boost::posix_time::ptime *timestamp) throw(Core::Exception);
+ virtual boost::shared_ptr<const Common::UserInfo> getUserInfoByName(const std::string &name, boost::posix_time::ptime *timestamp) throw(Core::Exception);
+ virtual boost::shared_ptr<const std::set<unsigned long> > getUserGroupList(unsigned long uid, boost::posix_time::ptime *timestamp) throw(Core::Exception);
- virtual boost::shared_ptr<const std::map<unsigned long, Common::GroupInfo> > getGroupList() throw(Core::Exception);
- virtual boost::shared_ptr<const Common::GroupInfo> getGroupInfo(unsigned long gid) throw(Core::Exception);
- virtual boost::shared_ptr<const Common::GroupInfo> getGroupInfoByName(const std::string &name) throw(Core::Exception);
- virtual boost::shared_ptr<const std::set<unsigned long> > getGroupUserList(unsigned long gid) throw(Core::Exception);
+ virtual boost::shared_ptr<const std::map<unsigned long, Common::GroupInfo> > getGroupList(boost::posix_time::ptime *timestamp) throw(Core::Exception);
+ virtual boost::shared_ptr<const Common::GroupInfo> getGroupInfo(unsigned long gid, boost::posix_time::ptime *timestamp) throw(Core::Exception);
+ virtual boost::shared_ptr<const Common::GroupInfo> getGroupInfoByName(const std::string &name, boost::posix_time::ptime *timestamp) throw(Core::Exception);
+ virtual boost::shared_ptr<const std::set<unsigned long> > getGroupUserList(unsigned long gid, boost::posix_time::ptime *timestamp) throw(Core::Exception);
- virtual boost::shared_ptr<const std::multimap<unsigned long, unsigned long> > getFullUserGroupList() throw(Core::Exception);
+ virtual boost::shared_ptr<const std::multimap<unsigned long, unsigned long> > getFullUserGroupList(boost::posix_time::ptime *timestamp) throw(Core::Exception);
public:
- UserBackendMysql(Common::Application *application0) : application(application0), port(0), mysql(0) {
+ UserBackendMysql(Common::Application *application0) : application(application0), port(0), mysql(0), lastUpdate(boost::posix_time::microsec_clock::universal_time()) {
application->getConfigManager()->registerConfigurable(this);
}