|
virtual void | process_request (struct MHD_Connection *connection, const char *url, const char *method, const char *upload_data, size_t *upload_data_size, std::ostream &body, int &error_code, std::string &content_type, bool *redraw) |
|
int | do_action (YWidget *widget, const std::string &action, struct MHD_Connection *connection, std::ostream &body) |
|
virtual YDumbTabActionHandler * | get_dumb_tab_handler () |
|
virtual YMenuWidgetActionHandler * | get_menu_handler () |
|
virtual YWidgetActionHandler * | get_widget_handler () |
|
virtual YTableActionHandler * | get_table_handler () |
|
virtual YMultiSelectionBoxActionHandler * | get_multiselectionbox_handler () |
|
template<typename T > |
int | action_handler (YWidget *widget, std::ostream &body, std::function< void(T *)> handler_func, const bool allow_disabled=false) |
|
Protected Member Functions inherited from YHttpHandler |
int | handle_error (std::ostream &body, std::string error, int error_code) |
|
|
Public Member Functions inherited from YHttpHandler |
virtual MHD_RESULT | handle (struct MHD_Connection *connection, const char *url, const char *method, const char *upload_data, size_t *upload_data_size, bool *redraw=nullptr) |
|
◆ action_handler()
template<typename T >
int YHttpWidgetsActionHandler::action_handler |
( |
YWidget * | widget, |
|
|
std::ostream & | body, |
|
|
std::function< void(T *)> | handler_func, |
|
|
const bool | allow_disabled = false ) |
|
inlineprotected |
Processes action on the given widget.
- Template Parameters
-
T | the type of the widget handler will act on |
- Parameters
-
widget | Widget to which action will be applied |
body | HTTP response body stream |
handler_func | Function which will be called with widget as an argument |
allow_disabled | Some widgets get to disabled state, but are actually enabled, like YCheckBoxFrame Not allowing by default, but allow explicit overrides for the exceptions. |
- Returns
- HTTP status code
◆ get_dumb_tab_handler()
Define widgets handlers to override in case need to implement UI specific actions, like activation.
◆ process_request()
void YHttpWidgetsActionHandler::process_request |
( |
struct MHD_Connection * | connection, |
|
|
const char * | url, |
|
|
const char * | method, |
|
|
const char * | upload_data, |
|
|
size_t * | upload_data_size, |
|
|
std::ostream & | body, |
|
|
int & | error_code, |
|
|
std::string & | content_type, |
|
|
bool * | redraw ) |
|
protectedvirtual |
The documentation for this class was generated from the following files:
- /builddir/build/BUILD/libyui-4.6.0/libyui-rest-api/src/YHttpWidgetsActionHandler.h
- /builddir/build/BUILD/libyui-4.6.0/libyui-rest-api/src/YHttpWidgetsActionHandler.cc