diff options
Diffstat (limited to 'src/Server/UserListManager.cpp')
-rw-r--r-- | src/Server/UserListManager.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/Server/UserListManager.cpp b/src/Server/UserListManager.cpp index d520c96..a8794fe 100644 --- a/src/Server/UserListManager.cpp +++ b/src/Server/UserListManager.cpp @@ -54,11 +54,11 @@ void UserListManager::configFinished() { application->getRequestManager()->registerPacketType<RequestHandlers::UserListDiffUploadRequestHandler>("UploadUserListDiff"); } -bool UserListManager::existsUserList(const std::string &name) { +bool UserListManager::existsUserList(const Core::String &name) { return application->getStorageManager()->exists("UserList", name); } -boost::shared_ptr<Common::UserLists::UserList> UserListManager::loadUserList(const std::string &name) { +boost::shared_ptr<Common::UserLists::UserList> UserListManager::loadUserList(const Core::String &name) { boost::shared_ptr<Common::XmlData> data = application->getStorageManager()->load("UserList", name); if(!data) @@ -67,31 +67,31 @@ boost::shared_ptr<Common::UserLists::UserList> UserListManager::loadUserList(con return Common::UserLists::Util::deserializeUserList(data.get()); } -void UserListManager::storeUserList(const std::string &name, const Common::UserLists::UserList *list) { +void UserListManager::storeUserList(const Core::String &name, const Common::UserLists::UserList *list) { Common::XmlData data; Common::UserLists::Util::serializeUserList(list, &data); application->getStorageManager()->store("UserList", name, &data); } -void UserListManager::copyUserList(const std::string &fromName, const std::string &toName) { +void UserListManager::copyUserList(const Core::String &fromName, const Core::String &toName) { application->getStorageManager()->copy("UserList", fromName, toName); } -void UserListManager::renameUserList(const std::string &fromName, const std::string &toName) { +void UserListManager::renameUserList(const Core::String &fromName, const Core::String &toName) { application->getStorageManager()->rename("UserList", fromName, toName); } -void UserListManager::removeUserList(const std::string &name) { +void UserListManager::removeUserList(const Core::String &name) { application->getStorageManager()->remove("UserList", name); } -bool UserListManager::existsUserListDiff(const std::string &name) { +bool UserListManager::existsUserListDiff(const Core::String &name) { return application->getStorageManager()->exists("UserListDiff", name); } -boost::shared_ptr<Common::UserLists::UserListDiff> UserListManager::loadUserListDiff(const std::string &name) { +boost::shared_ptr<Common::UserLists::UserListDiff> UserListManager::loadUserListDiff(const Core::String &name) { boost::shared_ptr<Common::XmlData> data = application->getStorageManager()->load("UserListDiff", name); if(!data) @@ -100,22 +100,22 @@ boost::shared_ptr<Common::UserLists::UserListDiff> UserListManager::loadUserList return Common::UserLists::Util::deserializeUserListDiff(data.get()); } -void UserListManager::storeUserListDiff(const std::string &name, const Common::UserLists::UserListDiff *list) { +void UserListManager::storeUserListDiff(const Core::String &name, const Common::UserLists::UserListDiff *list) { Common::XmlData data; Common::UserLists::Util::serializeUserListDiff(list, &data); application->getStorageManager()->store("UserListDiff", name, &data); } -void UserListManager::copyUserListDiff(const std::string &fromName, const std::string &toName) { +void UserListManager::copyUserListDiff(const Core::String &fromName, const Core::String &toName) { application->getStorageManager()->copy("UserListDiff", fromName, toName); } -void UserListManager::renameUserListDiff(const std::string &fromName, const std::string &toName) { +void UserListManager::renameUserListDiff(const Core::String &fromName, const Core::String &toName) { application->getStorageManager()->rename("UserListDiff", fromName, toName); } -void UserListManager::removeUserListDiff(const std::string &name) { +void UserListManager::removeUserListDiff(const Core::String &name) { application->getStorageManager()->remove("UserListDiff", name); } @@ -127,7 +127,7 @@ boost::shared_ptr<Common::UserLists::UserList> UserListManager::getCurrentUserLi for(std::map<unsigned long, Common::UserInfo>::const_iterator user = userList->begin(); user != userList->end(); ++user) { std::map<unsigned long, Common::GroupInfo>::const_iterator group = groupList->find(user->second.getGid()); - std::string groupname; + Core::String groupname; if(group != groupList->end()) { groupname = group->second.getName(); @@ -135,7 +135,7 @@ boost::shared_ptr<Common::UserLists::UserList> UserListManager::getCurrentUserLi else { std::ostringstream stream; stream << user->second.getGid(); - groupname = stream.str(); + groupname = stream.str().c_str(); } Common::UserLists::UserListEntry entry(user->second.getUsername(), groupname); |