/* * UserListManager.h * * Copyright (C) 2009 Matthias Schiffer * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by the * Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License along * with this program. If not, see . */ #ifndef MAD_SERVER_USERLISTMANAGER_H_ #define MAD_SERVER_USERLISTMANAGER_H_ #include "export.h" #include #include #include #include namespace Mad { namespace Common { namespace UserLists { class UserList; class UserListDiff; } } namespace Server { class Application; namespace RequestHandlers { class UserListRequestHandlerGroup; } class MAD_SERVER_EXPORT UserListManager : private boost::noncopyable { private: Application *application; boost::shared_ptr requestHandlerGroup; public: UserListManager(Application *application0); virtual ~UserListManager(); std::set getUserLists(); bool existsUserList(const Core::String &name); boost::shared_ptr loadUserList(const Core::String &name); void storeUserList(const Core::String &name, const Common::UserLists::UserList *list); void copyUserList(const Core::String &fromName, const Core::String &toName); void renameUserList(const Core::String &fromName, const Core::String &toName); void removeUserList(const Core::String &name); std::set getUserListDiffs(); bool existsUserListDiff(const Core::String &name); boost::shared_ptr loadUserListDiff(const Core::String &name); void storeUserListDiff(const Core::String &name, const Common::UserLists::UserListDiff *list); void copyUserListDiff(const Core::String &fromName, const Core::String &toName); void renameUserListDiff(const Core::String &fromName, const Core::String &toName); void removeUserListDiff(const Core::String &name); boost::shared_ptr getCurrentUserList(); }; } } #endif /* MAD_SERVER_USERLISTMANAGER_H_ */