diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-02-14 08:43:29 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-02-14 08:43:29 +0100 |
commit | 28da956a12882c4f4c0a66cd8934a95ae9246bd4 (patch) | |
tree | 78f8a1d84513ee0b3d7f3eb45a51cf13abce38a0 /WindowServer/WSClientConnection.cpp | |
parent | aa7947c88928be64b651be622527e5fe20beca46 (diff) | |
download | serenity-28da956a12882c4f4c0a66cd8934a95ae9246bd4.zip |
WindowServer: Refactor WSClientConnection to have one function per request.
This is a lot nicer than the big switch full of code. This stuff has a bit
of a "please generate me instead" vibe to it, but I need to mess around with
it some more to figure out what the needs are.
This patch also unbreaks global cursor tracking, which was forgotten in the
big messaging refactoring.
Diffstat (limited to 'WindowServer/WSClientConnection.cpp')
-rw-r--r-- | WindowServer/WSClientConnection.cpp | 531 |
1 files changed, 299 insertions, 232 deletions
diff --git a/WindowServer/WSClientConnection.cpp b/WindowServer/WSClientConnection.cpp index ff780e73e3..e674b5ede5 100644 --- a/WindowServer/WSClientConnection.cpp +++ b/WindowServer/WSClientConnection.cpp @@ -49,7 +49,7 @@ WSClientConnection::~WSClientConnection() void WSClientConnection::on_message(WSMessage& message) { if (message.is_client_request()) { - handle_client_request(static_cast<WSAPIClientRequest&>(message)); + on_request(static_cast<WSAPIClientRequest&>(message)); return; } @@ -61,255 +61,322 @@ void WSClientConnection::on_message(WSMessage& message) } } -void WSClientConnection::handle_client_request(WSAPIClientRequest& request) +void WSClientConnection::handle_request(WSAPICreateMenubarRequest& request) { - switch (request.type()) { - case WSMessage::APICreateMenubarRequest: { - int menubar_id = m_next_menubar_id++; - auto menubar = make<WSMenuBar>(menubar_id, *WSMessageLoop::process_from_client_id(request.client_id())); - m_menubars.set(menubar_id, move(menubar)); - GUI_ServerMessage response; - response.type = GUI_ServerMessage::Type::DidCreateMenubar; - response.menu.menubar_id = menubar_id; - WSMessageLoop::the().post_message_to_client(request.client_id(), response); - break; - } - case WSMessage::APIDestroyMenubarRequest: { - int menubar_id = static_cast<WSAPIDestroyMenubarRequest&>(request).menubar_id(); - auto it = m_menubars.find(menubar_id); - if (it == m_menubars.end()) { - ASSERT_NOT_REACHED(); - // FIXME: Send an error. - return; - } - auto& menubar = *(*it).value; - WSWindowManager::the().close_menubar(menubar); - m_menubars.remove(it); - GUI_ServerMessage response; - response.type = GUI_ServerMessage::Type::DidDestroyMenubar; - response.menu.menubar_id = menubar_id; - WSMessageLoop::the().post_message_to_client(request.client_id(), response); - break; - } - case WSMessage::APICreateMenuRequest: { - int menu_id = m_next_menu_id++; - auto menu = make<WSMenu>(*WSMessageLoop::process_from_client_id(request.client_id()), menu_id, static_cast<WSAPICreateMenuRequest&>(request).text()); - m_menus.set(menu_id, move(menu)); - GUI_ServerMessage response; - response.type = GUI_ServerMessage::Type::DidCreateMenu; - response.menu.menu_id = menu_id; - WSMessageLoop::the().post_message_to_client(request.client_id(), response); - break; + int menubar_id = m_next_menubar_id++; + auto menubar = make<WSMenuBar>(menubar_id, *WSMessageLoop::process_from_client_id(request.client_id())); + m_menubars.set(menubar_id, move(menubar)); + GUI_ServerMessage response; + response.type = GUI_ServerMessage::Type::DidCreateMenubar; + response.menu.menubar_id = menubar_id; + WSMessageLoop::the().post_message_to_client(request.client_id(), response); +} + +void WSClientConnection::handle_request(WSAPIDestroyMenubarRequest& request) +{ + int menubar_id = request.menubar_id(); + auto it = m_menubars.find(menubar_id); + if (it == m_menubars.end()) { + ASSERT_NOT_REACHED(); + // FIXME: Send an error. + return; } - case WSMessage::APIDestroyMenuRequest: { - int menu_id = static_cast<WSAPIDestroyMenuRequest&>(request).menu_id(); - auto it = m_menus.find(menu_id); - if (it == m_menus.end()) { - ASSERT_NOT_REACHED(); - // FIXME: Send an error. - return; - } - auto& menu = *(*it).value; - WSWindowManager::the().close_menu(menu); - m_menus.remove(it); - GUI_ServerMessage response; - response.type = GUI_ServerMessage::Type::DidDestroyMenu; - response.menu.menu_id = menu_id; - WSMessageLoop::the().post_message_to_client(request.client_id(), response); - break; + auto& menubar = *(*it).value; + WSWindowManager::the().close_menubar(menubar); + m_menubars.remove(it); + GUI_ServerMessage response; + response.type = GUI_ServerMessage::Type::DidDestroyMenubar; + response.menu.menubar_id = menubar_id; + WSMessageLoop::the().post_message_to_client(request.client_id(), response); +} + +void WSClientConnection::handle_request(WSAPICreateMenuRequest& request) +{ + int menu_id = m_next_menu_id++; + auto menu = make<WSMenu>(*WSMessageLoop::process_from_client_id(request.client_id()), menu_id, request.text()); + m_menus.set(menu_id, move(menu)); + GUI_ServerMessage response; + response.type = GUI_ServerMessage::Type::DidCreateMenu; + response.menu.menu_id = menu_id; + WSMessageLoop::the().post_message_to_client(request.client_id(), response); +} + +void WSClientConnection::handle_request(WSAPIDestroyMenuRequest& request) +{ + int menu_id = static_cast<WSAPIDestroyMenuRequest&>(request).menu_id(); + auto it = m_menus.find(menu_id); + if (it == m_menus.end()) { + ASSERT_NOT_REACHED(); + // FIXME: Send an error. + return; } - case WSMessage::APISetApplicationMenubarRequest: { - int menubar_id = static_cast<WSAPISetApplicationMenubarRequest&>(request).menubar_id(); - auto it = m_menubars.find(menubar_id); - if (it == m_menubars.end()) { - ASSERT_NOT_REACHED(); - // FIXME: Send an error. - return; - } - auto& menubar = *(*it).value; - m_app_menubar = menubar.make_weak_ptr(); - WSWindowManager::the().notify_client_changed_app_menubar(*this); - GUI_ServerMessage response; - response.type = GUI_ServerMessage::Type::DidSetApplicationMenubar; - response.menu.menubar_id = menubar_id; - WSMessageLoop::the().post_message_to_client(request.client_id(), response); - break; + auto& menu = *(*it).value; + WSWindowManager::the().close_menu(menu); + m_menus.remove(it); + GUI_ServerMessage response; + response.type = GUI_ServerMessage::Type::DidDestroyMenu; + response.menu.menu_id = menu_id; + WSMessageLoop::the().post_message_to_client(request.client_id(), response); +} + +void WSClientConnection::handle_request(WSAPISetApplicationMenubarRequest& request) +{ + int menubar_id = request.menubar_id(); + auto it = m_menubars.find(menubar_id); + if (it == m_menubars.end()) { + ASSERT_NOT_REACHED(); + // FIXME: Send an error. + return; } - case WSMessage::APIAddMenuToMenubarRequest: { - int menubar_id = static_cast<WSAPIAddMenuToMenubarRequest&>(request).menubar_id(); - int menu_id = static_cast<WSAPIAddMenuToMenubarRequest&>(request).menu_id(); - auto it = m_menubars.find(menubar_id); - auto jt = m_menus.find(menu_id); - if (it == m_menubars.end() || jt == m_menus.end()) { - ASSERT_NOT_REACHED(); - } - auto& menubar = *(*it).value; - auto& menu = *(*jt).value; - menubar.add_menu(&menu); - GUI_ServerMessage response; - response.type = GUI_ServerMessage::Type::DidAddMenuToMenubar; - response.menu.menubar_id = menubar_id; - response.menu.menu_id = menu_id; - WSMessageLoop::the().post_message_to_client(request.client_id(), response); - break; + auto& menubar = *(*it).value; + m_app_menubar = menubar.make_weak_ptr(); + WSWindowManager::the().notify_client_changed_app_menubar(*this); + GUI_ServerMessage response; + response.type = GUI_ServerMessage::Type::DidSetApplicationMenubar; + response.menu.menubar_id = menubar_id; + WSMessageLoop::the().post_message_to_client(request.client_id(), response); +} + +void WSClientConnection::handle_request(WSAPIAddMenuToMenubarRequest& request) +{ + int menubar_id = request.menubar_id(); + int menu_id = request.menu_id(); + auto it = m_menubars.find(menubar_id); + auto jt = m_menus.find(menu_id); + if (it == m_menubars.end() || jt == m_menus.end()) { + ASSERT_NOT_REACHED(); } - case WSMessage::APIAddMenuItemRequest: { - int menu_id = static_cast<WSAPIAddMenuItemRequest&>(request).menu_id(); - unsigned identifier = static_cast<WSAPIAddMenuItemRequest&>(request).identifier(); - String text = static_cast<WSAPIAddMenuItemRequest&>(request).text(); - auto it = m_menus.find(menu_id); - if (it == m_menus.end()) { - ASSERT_NOT_REACHED(); - } - auto& menu = *(*it).value; - menu.add_item(make<WSMenuItem>(identifier, move(text))); - GUI_ServerMessage response; - response.type = GUI_ServerMessage::Type::DidAddMenuItem; - response.menu.menu_id = menu_id; - response.menu.identifier = identifier; - WSMessageLoop::the().post_message_to_client(request.client_id(), response); - break; + auto& menubar = *(*it).value; + auto& menu = *(*jt).value; + menubar.add_menu(&menu); + GUI_ServerMessage response; + response.type = GUI_ServerMessage::Type::DidAddMenuToMenubar; + response.menu.menubar_id = menubar_id; + response.menu.menu_id = menu_id; + WSMessageLoop::the().post_message_to_client(request.client_id(), response); +} + +void WSClientConnection::handle_request(WSAPIAddMenuItemRequest& request) +{ + int menu_id = request.menu_id(); + unsigned identifier = request.identifier(); + String text = request.text(); + auto it = m_menus.find(menu_id); + if (it == m_menus.end()) { + ASSERT_NOT_REACHED(); } - case WSMessage::APIAddMenuSeparatorRequest: { - int menu_id = static_cast<WSAPIAddMenuSeparatorRequest&>(request).menu_id(); - auto it = m_menus.find(menu_id); - if (it == m_menus.end()) { - ASSERT_NOT_REACHED(); - } - auto& menu = *(*it).value; - menu.add_item(make<WSMenuItem>(WSMenuItem::Separator)); - GUI_ServerMessage response; - response.type = GUI_ServerMessage::Type::DidAddMenuSeparator; - response.menu.menu_id = menu_id; - WSMessageLoop::the().post_message_to_client(request.client_id(), response); - break; + auto& menu = *(*it).value; + menu.add_item(make<WSMenuItem>(identifier, move(text))); + GUI_ServerMessage response; + response.type = GUI_ServerMessage::Type::DidAddMenuItem; + response.menu.menu_id = menu_id; + response.menu.identifier = identifier; + WSMessageLoop::the().post_message_to_client(request.client_id(), response); +} + +void WSClientConnection::handle_request(WSAPIAddMenuSeparatorRequest& request) +{ + int menu_id = request.menu_id(); + auto it = m_menus.find(menu_id); + if (it == m_menus.end()) { + ASSERT_NOT_REACHED(); } - case WSMessage::APISetWindowTitleRequest: { - int window_id = static_cast<WSAPISetWindowTitleRequest&>(request).window_id(); - auto it = m_windows.find(window_id); - if (it == m_windows.end()) { - ASSERT_NOT_REACHED(); - } - auto& window = *(*it).value; - window.set_title(static_cast<WSAPISetWindowTitleRequest&>(request).title()); - break; + auto& menu = *(*it).value; + menu.add_item(make<WSMenuItem>(WSMenuItem::Separator)); + GUI_ServerMessage response; + response.type = GUI_ServerMessage::Type::DidAddMenuSeparator; + response.menu.menu_id = menu_id; + WSMessageLoop::the().post_message_to_client(request.client_id(), response); +} + +void WSClientConnection::handle_request(WSAPISetWindowTitleRequest& request) +{ + int window_id = request.window_id(); + auto it = m_windows.find(window_id); + if (it == m_windows.end()) { + ASSERT_NOT_REACHED(); } - case WSMessage::APIGetWindowTitleRequest: { - int window_id = static_cast<WSAPIGetWindowTitleRequest&>(request).window_id(); - auto it = m_windows.find(window_id); - if (it == m_windows.end()) { - ASSERT_NOT_REACHED(); - } - auto& window = *(*it).value; - GUI_ServerMessage response; - response.type = GUI_ServerMessage::Type::DidGetWindowTitle; - response.window_id = window.window_id(); - ASSERT(window.title().length() < sizeof(response.text)); - strcpy(response.text, window.title().characters()); - response.text_length = window.title().length(); - WSMessageLoop::the().post_message_to_client(request.client_id(), response); - break; + auto& window = *(*it).value; + window.set_title(request.title()); +} + +void WSClientConnection::handle_request(WSAPIGetWindowTitleRequest& request) +{ + int window_id = request.window_id(); + auto it = m_windows.find(window_id); + if (it == m_windows.end()) { + ASSERT_NOT_REACHED(); } - case WSMessage::APISetWindowRectRequest: { - int window_id = static_cast<WSAPISetWindowRectRequest&>(request).window_id(); - auto it = m_windows.find(window_id); - if (it == m_windows.end()) { - ASSERT_NOT_REACHED(); - } - auto& window = *(*it).value; - window.set_rect(static_cast<WSAPISetWindowRectRequest&>(request).rect()); - break; + auto& window = *(*it).value; + GUI_ServerMessage response; + response.type = GUI_ServerMessage::Type::DidGetWindowTitle; + response.window_id = window.window_id(); + ASSERT(window.title().length() < sizeof(response.text)); + strcpy(response.text, window.title().characters()); + response.text_length = window.title().length(); + WSMessageLoop::the().post_message_to_client(request.client_id(), response); +} + +void WSClientConnection::handle_request(WSAPISetWindowRectRequest& request) +{ + int window_id = request.window_id(); + auto it = m_windows.find(window_id); + if (it == m_windows.end()) { + ASSERT_NOT_REACHED(); } - case WSMessage::APIGetWindowRectRequest: { - int window_id = static_cast<WSAPIGetWindowRectRequest&>(request).window_id(); - auto it = m_windows.find(window_id); - if (it == m_windows.end()) { - ASSERT_NOT_REACHED(); - } - auto& window = *(*it).value; - GUI_ServerMessage response; - response.type = GUI_ServerMessage::Type::DidGetWindowRect; - response.window_id = window.window_id(); - response.window.rect = window.rect(); - WSMessageLoop::the().post_message_to_client(request.client_id(), response); - break; + auto& window = *(*it).value; + window.set_rect(request.rect()); +} + +void WSClientConnection::handle_request(WSAPIGetWindowRectRequest& request) +{ + int window_id = request.window_id(); + auto it = m_windows.find(window_id); + if (it == m_windows.end()) { + ASSERT_NOT_REACHED(); } - case WSMessage::APICreateWindowRequest: { - int window_id = m_next_window_id++; - auto window = make<WSWindow>(request.client_id(), window_id); - window->set_title(static_cast<WSAPICreateWindowRequest&>(request).title()); - window->set_rect(static_cast<WSAPICreateWindowRequest&>(request).rect()); - m_windows.set(window_id, move(window)); - GUI_ServerMessage response; - response.type = GUI_ServerMessage::Type::DidCreateWindow; - response.window_id = window_id; - WSMessageLoop::the().post_message_to_client(request.client_id(), response); - break; + auto& window = *(*it).value; + GUI_ServerMessage response; + response.type = GUI_ServerMessage::Type::DidGetWindowRect; + response.window_id = window.window_id(); + response.window.rect = window.rect(); + WSMessageLoop::the().post_message_to_client(request.client_id(), response); +} + +void WSClientConnection::handle_request(WSAPICreateWindowRequest& request) +{ + int window_id = m_next_window_id++; + auto window = make<WSWindow>(request.client_id(), window_id); + window->set_title(request.title()); + window->set_rect(request.rect()); + m_windows.set(window_id, move(window)); + GUI_ServerMessage response; + response.type = GUI_ServerMessage::Type::DidCreateWindow; + response.window_id = window_id; + WSMessageLoop::the().post_message_to_client(request.client_id(), response); +} + +void WSClientConnection::handle_request(WSAPIDestroyWindowRequest& request) +{ + int window_id = request.window_id(); + auto it = m_windows.find(window_id); + if (it == m_windows.end()) { + ASSERT_NOT_REACHED(); } - case WSMessage::APIDestroyWindowRequest: { - int window_id = static_cast<WSAPIGetWindowRectRequest&>(request).window_id(); - auto it = m_windows.find(window_id); - if (it == m_windows.end()) { - ASSERT_NOT_REACHED(); - } - auto& window = *(*it).value; - WSWindowManager::the().invalidate(window); - m_windows.remove(it); - break; + auto& window = *(*it).value; + WSWindowManager::the().invalidate(window); + m_windows.remove(it); +} + +void WSClientConnection::handle_request(WSAPIInvalidateRectRequest& request) +{ + int window_id = request.window_id(); + auto it = m_windows.find(window_id); + if (it == m_windows.end()) { + ASSERT_NOT_REACHED(); } - case WSMessage::APIInvalidateRectRequest: { - int window_id = static_cast<WSAPIInvalidateRectRequest&>(request).window_id(); - auto it = m_windows.find(window_id); - if (it == m_windows.end()) { - ASSERT_NOT_REACHED(); - } - GUI_ServerMessage response; - response.type = GUI_ServerMessage::Type::Paint; - response.window_id = window_id; - response.paint.rect = static_cast<WSAPIInvalidateRectRequest&>(request).rect(); - WSMessageLoop::the().post_message_to_client(request.client_id(), response); - break; + GUI_ServerMessage response; + response.type = GUI_ServerMessage::Type::Paint; + response.window_id = window_id; + response.paint.rect = request.rect(); + WSMessageLoop::the().post_message_to_client(request.client_id(), response); +} + +void WSClientConnection::handle_request(WSAPIDidFinishPaintingNotification& request) +{ + int window_id = request.window_id(); + auto it = m_windows.find(window_id); + if (it == m_windows.end()) { + ASSERT_NOT_REACHED(); } - case WSMessage::APIDidFinishPaintingNotification: { - int window_id = static_cast<WSAPIDidFinishPaintingNotification&>(request).window_id(); - auto it = m_windows.find(window_id); - if (it == m_windows.end()) { - ASSERT_NOT_REACHED(); - } - auto& window = *(*it).value; - WSWindowManager::the().invalidate(window, static_cast<WSAPIDidFinishPaintingNotification&>(request).rect()); - break; + auto& window = *(*it).value; + WSWindowManager::the().invalidate(window, request.rect()); +} + +void WSClientConnection::handle_request(WSAPIGetWindowBackingStoreRequest& request) +{ + int window_id = request.window_id(); + auto it = m_windows.find(window_id); + if (it == m_windows.end()) { + ASSERT_NOT_REACHED(); } - case WSMessage::APIGetWindowBackingStoreRequest: { - int window_id = static_cast<WSAPIGetWindowBackingStoreRequest&>(request).window_id(); - auto it = m_windows.find(window_id); - if (it == m_windows.end()) { - ASSERT_NOT_REACHED(); - } - auto& window = *(*it).value; - auto* backing_store = window.backing(); + auto& window = *(*it).value; + auto* backing_store = window.backing(); - // FIXME: It shouldn't work this way! - backing_store->retain(); + // FIXME: It shouldn't work this way! + backing_store->retain(); - GUI_ServerMessage response; - response.type = GUI_ServerMessage::Type::DidGetWindowBackingStore; - response.window_id = window_id; - response.backing.backing_store_id = backing_store; - response.backing.bpp = sizeof(RGBA32); - response.backing.pitch = backing_store->pitch(); - response.backing.size = backing_store->size(); - response.backing.pixels = reinterpret_cast<RGBA32*>(backing_store->client_region()->laddr().as_ptr()); - WSMessageLoop::the().post_message_to_client(request.client_id(), response); - break; - } - case WSMessage::APIReleaseWindowBackingStoreRequest: { - int backing_store_id = static_cast<WSAPIReleaseWindowBackingStoreRequest&>(request).backing_store_id(); - // FIXME: It shouldn't work this way! - auto* backing_store = (GraphicsBitmap*)backing_store_id; - backing_store->release(); - break; + GUI_ServerMessage response; + response.type = GUI_ServerMessage::Type::DidGetWindowBackingStore; + response.window_id = window_id; + response.backing.backing_store_id = backing_store; + response.backing.bpp = sizeof(RGBA32); + response.backing.pitch = backing_store->pitch(); + response.backing.size = backing_store->size(); + response.backing.pixels = reinterpret_cast<RGBA32*>(backing_store->client_region()->laddr().as_ptr()); + WSMessageLoop::the().post_message_to_client(request.client_id(), response); +} + +void WSClientConnection::handle_request(WSAPIReleaseWindowBackingStoreRequest& request) +{ + int backing_store_id = request.backing_store_id(); + // FIXME: It shouldn't work this way! + auto* backing_store = (GraphicsBitmap*)backing_store_id; + backing_store->release(); +} + +void WSClientConnection::handle_request(WSAPISetGlobalCursorTrackingRequest& request) +{ + int window_id = request.window_id(); + auto it = m_windows.find(window_id); + if (it == m_windows.end()) { + ASSERT_NOT_REACHED(); } + auto& window = *(*it).value; + window.set_global_cursor_tracking_enabled(request.value()); +} + +void WSClientConnection::on_request(WSAPIClientRequest& request) +{ + switch (request.type()) { + case WSMessage::APICreateMenubarRequest: + return handle_request(static_cast<WSAPICreateMenubarRequest&>(request)); + case WSMessage::APIDestroyMenubarRequest: + return handle_request(static_cast<WSAPIDestroyMenubarRequest&>(request)); + case WSMessage::APICreateMenuRequest: + return handle_request(static_cast<WSAPICreateMenuRequest&>(request)); + case WSMessage::APIDestroyMenuRequest: + return handle_request(static_cast<WSAPIDestroyMenuRequest&>(request)); + case WSMessage::APISetApplicationMenubarRequest: + return handle_request(static_cast<WSAPISetApplicationMenubarRequest&>(request)); + case WSMessage::APIAddMenuToMenubarRequest: + return handle_request(static_cast<WSAPIAddMenuToMenubarRequest&>(request)); + case WSMessage::APIAddMenuItemRequest: + return handle_request(static_cast<WSAPIAddMenuItemRequest&>(request)); + case WSMessage::APIAddMenuSeparatorRequest: + return handle_request(static_cast<WSAPIAddMenuSeparatorRequest&>(request)); + case WSMessage::APISetWindowTitleRequest: + return handle_request(static_cast<WSAPISetWindowTitleRequest&>(request)); + case WSMessage::APIGetWindowTitleRequest: + return handle_request(static_cast<WSAPIGetWindowTitleRequest&>(request)); + case WSMessage::APISetWindowRectRequest: + return handle_request(static_cast<WSAPISetWindowRectRequest&>(request)); + case WSMessage::APIGetWindowRectRequest: + return handle_request(static_cast<WSAPIGetWindowRectRequest&>(request)); + case WSMessage::APICreateWindowRequest: + return handle_request(static_cast<WSAPICreateWindowRequest&>(request)); + case WSMessage::APIDestroyWindowRequest: + return handle_request(static_cast<WSAPIDestroyWindowRequest&>(request)); + case WSMessage::APIInvalidateRectRequest: + return handle_request(static_cast<WSAPIInvalidateRectRequest&>(request)); + case WSMessage::APIDidFinishPaintingNotification: + return handle_request(static_cast<WSAPIDidFinishPaintingNotification&>(request)); + case WSMessage::APIGetWindowBackingStoreRequest: + return handle_request(static_cast<WSAPIGetWindowBackingStoreRequest&>(request)); + case WSMessage::APIReleaseWindowBackingStoreRequest: + return handle_request(static_cast<WSAPIReleaseWindowBackingStoreRequest&>(request)); + case WSMessage::APISetGlobalCursorTrackingRequest: + return handle_request(static_cast<WSAPISetGlobalCursorTrackingRequest&>(request)); default: break; } |