diff options
Diffstat (limited to 'src/Server/UserListManager.cpp')
-rw-r--r-- | src/Server/UserListManager.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/Server/UserListManager.cpp b/src/Server/UserListManager.cpp index 04ba7d2..8e524a0 100644 --- a/src/Server/UserListManager.cpp +++ b/src/Server/UserListManager.cpp @@ -34,24 +34,20 @@ namespace Mad { namespace Server { UserListManager::UserListManager(Application *application0) : application(application0), requestHandlerGroup(new RequestHandlers::UserListRequestHandlerGroup(application)) { - application->getConfigManager()->registerConfigurable(this); + application->getRequestManager()->registerRequestHandlerGroup(requestHandlerGroup); + application->getRequestManager()->registerPacketType<RequestHandlers::UserListUploadRequestHandler>("UploadUserList"); + application->getRequestManager()->registerPacketType<RequestHandlers::UserListDiffUploadRequestHandler>("UploadUserListDiff"); } UserListManager::~UserListManager() { application->getRequestManager()->unregisterPacketType("UploadUserList"); application->getRequestManager()->unregisterPacketType("UploadUserListDiff"); application->getRequestManager()->unregisterRequestHandlerGroup(requestHandlerGroup); - application->getConfigManager()->unregisterConfigurable(this); } -void UserListManager::configure() { - userLists = application->getStorageManager()->list("UserList"); - userListDiffs = application->getStorageManager()->list("UserListDiff"); - - application->getRequestManager()->registerRequestHandlerGroup(requestHandlerGroup); - application->getRequestManager()->registerPacketType<RequestHandlers::UserListUploadRequestHandler>("UploadUserList"); - application->getRequestManager()->registerPacketType<RequestHandlers::UserListDiffUploadRequestHandler>("UploadUserListDiff"); +std::set<Core::String> UserListManager::getUserLists() { + return application->getStorageManager()->list("UserList"); } bool UserListManager::existsUserList(const Core::String &name) { @@ -87,6 +83,10 @@ void UserListManager::removeUserList(const Core::String &name) { } +std::set<Core::String> UserListManager::getUserListDiffs() { + return application->getStorageManager()->list("UserListDiff"); +} + bool UserListManager::existsUserListDiff(const Core::String &name) { return application->getStorageManager()->exists("UserListDiff", name); } |