12 #include "bfu/msgbox.h"
13 #include "main/module.h"
14 #include "protocol/user.h"
15 #include "session/session.h"
16 #include "util/test.h"
18 #define STUB_MODULE(name) \
19 struct module name = struct_module( \
20 /* name: */ "Stub " #name, \
21 /* options: */ NULL, \
23 /* submodules: */ NULL, \
28 STUB_MODULE(auth_module
);
29 STUB_MODULE(bittorrent_protocol_module
);
30 STUB_MODULE(cgi_protocol_module
);
31 STUB_MODULE(file_protocol_module
);
32 STUB_MODULE(finger_protocol_module
);
33 STUB_MODULE(fsp_protocol_module
);
34 STUB_MODULE(ftp_protocol_module
);
35 STUB_MODULE(gopher_protocol_module
);
36 STUB_MODULE(http_protocol_module
);
37 STUB_MODULE(nntp_protocol_module
);
38 STUB_MODULE(smb_protocol_module
);
39 STUB_MODULE(uri_rewrite_module
);
40 STUB_MODULE(user_protocol_module
);
43 stub_called(const unsigned char *fun
)
45 die("FAIL: stub %s\n", fun
);
48 #define STUB_PROTOCOL_HANDLER(name) \
50 name(struct connection *conn) \
54 protocol_handler_T name /* consume semicolon */
55 #define STUB_PROTOCOL_EXTERNAL_HANDLER(name) \
57 name(struct session *ses, struct uri *uri) \
61 protocol_external_handler_T name /* consume semicolon */
62 STUB_PROTOCOL_HANDLER(about_protocol_handler
);
63 STUB_PROTOCOL_HANDLER(bittorrent_protocol_handler
);
64 STUB_PROTOCOL_HANDLER(data_protocol_handler
);
65 STUB_PROTOCOL_EXTERNAL_HANDLER(ecmascript_protocol_handler
);
66 STUB_PROTOCOL_HANDLER(file_protocol_handler
);
67 STUB_PROTOCOL_HANDLER(finger_protocol_handler
);
68 STUB_PROTOCOL_HANDLER(fsp_protocol_handler
);
69 STUB_PROTOCOL_HANDLER(ftp_protocol_handler
);
70 STUB_PROTOCOL_HANDLER(gopher_protocol_handler
);
71 STUB_PROTOCOL_HANDLER(http_protocol_handler
);
72 STUB_PROTOCOL_HANDLER(news_protocol_handler
);
73 STUB_PROTOCOL_HANDLER(nntp_protocol_handler
);
74 STUB_PROTOCOL_HANDLER(proxy_protocol_handler
);
75 STUB_PROTOCOL_HANDLER(smb_protocol_handler
);
76 STUB_PROTOCOL_EXTERNAL_HANDLER(user_protocol_handler
);
78 /* declared in "protocol/user.h" */
80 get_user_program(struct terminal
*term
, unsigned char *progid
, int progidlen
)
82 stub_called("get_user_program");
86 /* declared in "session/session.h" */
88 print_error_dialog(struct session
*ses
, struct connection_state state
,
89 struct uri
*uri
, enum connection_priority priority
)
91 stub_called("print_error_dialog");
94 /* declared in "bfu/msgbox.h" */
96 msg_text(struct terminal
*term
, unsigned char *format
, ...)
98 stub_called("msg_text");
102 /* declared in "bfu/msgbox.h" */
104 msg_box(struct terminal
*term
, struct memory_list
*mem_list
,
105 enum msgbox_flags flags
, unsigned char *title
, enum format_align align
,
106 unsigned char *text
, void *udata
, int buttons
, ...)
108 /* mem_list should be freed here but because this is just a
109 * test program it won't matter. */
110 stub_called("msg_box");