2013-12-19 16:05:39 -05:00
|
|
|
#ifndef MOCK_UI_H
|
|
|
|
#define MICK_UI_H
|
|
|
|
|
|
|
|
#include <glib.h>
|
|
|
|
#include <setjmp.h>
|
|
|
|
#include <cmocka.h>
|
|
|
|
|
2014-02-01 16:18:15 -05:00
|
|
|
#include "config/account.h"
|
|
|
|
#include "contact.h"
|
2014-02-01 18:48:24 -05:00
|
|
|
#include "ui/window.h"
|
2014-02-01 16:18:15 -05:00
|
|
|
|
2013-12-19 16:05:39 -05:00
|
|
|
void stub_cons_show(void);
|
|
|
|
|
|
|
|
void mock_cons_show(void);
|
|
|
|
void expect_cons_show(char *output);
|
|
|
|
void expect_cons_show_calls(int n);
|
|
|
|
|
2014-01-20 13:40:48 -05:00
|
|
|
void mock_cons_show_contact_online(void);
|
|
|
|
void expect_cons_show_contact_online(PContact contact, Resource *resource, GDateTime *last_activity);
|
|
|
|
void stub_ui_chat_win_contact_online(void);
|
|
|
|
|
2013-12-22 17:14:15 -05:00
|
|
|
void mock_cons_show_error(void);
|
|
|
|
void expect_cons_show_error(char *output);
|
|
|
|
|
2014-01-28 18:56:45 -05:00
|
|
|
void stub_ui_handle_recipient_not_found(void);
|
2014-01-30 18:15:39 -05:00
|
|
|
void stub_ui_handle_recipient_error(void);
|
2014-01-28 17:37:50 -05:00
|
|
|
void expect_ui_handle_error(char *err_msg);
|
2014-01-28 18:56:45 -05:00
|
|
|
void expect_ui_handle_recipient_error(char *recipient, char *err_msg);
|
|
|
|
void expect_ui_handle_recipient_not_found(char *recipient, char *err_msg);
|
2014-01-28 17:37:50 -05:00
|
|
|
|
2013-12-22 17:14:15 -05:00
|
|
|
void mock_cons_show_account(void);
|
|
|
|
void expect_cons_show_account(ProfAccount *account);
|
|
|
|
|
2014-02-01 16:18:15 -05:00
|
|
|
void mock_cons_show_bookmarks(void);
|
|
|
|
void expect_cons_show_bookmarks(GList *bookmarks);
|
|
|
|
|
2014-01-23 17:29:53 -05:00
|
|
|
void mock_cons_show_aliases(void);
|
|
|
|
void expect_cons_show_aliases(void);
|
|
|
|
|
2013-12-22 17:14:15 -05:00
|
|
|
void mock_cons_show_account_list(void);
|
|
|
|
void expect_cons_show_account_list(gchar **accounts);
|
|
|
|
|
|
|
|
void stub_ui_ask_password(void);
|
|
|
|
void mock_ui_ask_password(void);
|
|
|
|
void mock_ui_ask_password_returns(char *password);
|
|
|
|
|
2014-02-01 18:48:24 -05:00
|
|
|
void mock_current_win_type(win_type_t type);
|
|
|
|
|
|
|
|
void mock_ui_current_recipient(void);
|
|
|
|
void ui_current_recipient_returns(char *jid);
|
|
|
|
|
2014-02-15 21:22:29 -05:00
|
|
|
void stub_ui_current_refresh(void);
|
|
|
|
|
2014-02-17 16:52:42 -05:00
|
|
|
void mock_ui_current_print_formatted_line(void);
|
|
|
|
void ui_current_print_formatted_line_expect(char show_char, int attrs, char *message);
|
|
|
|
|
2014-02-17 17:14:33 -05:00
|
|
|
void mock_ui_current_print_line(void);
|
|
|
|
void ui_current_print_line_expect(char *message);
|
|
|
|
|
2014-02-17 17:57:36 -05:00
|
|
|
void ui_current_win_is_otr_returns(gboolean result);
|
|
|
|
|
2014-03-08 16:10:23 -05:00
|
|
|
void ui_room_join_expect(char *room);
|
|
|
|
|
2014-03-15 21:23:12 -04:00
|
|
|
void mock_cons_show_roster(void);
|
|
|
|
void cons_show_roster_expect(GSList *list);
|
|
|
|
|
2013-12-19 16:05:39 -05:00
|
|
|
#endif
|