summaryrefslogtreecommitdiff
path: root/testing/toxic
diff options
context:
space:
mode:
Diffstat (limited to 'testing/toxic')
-rw-r--r--testing/toxic/main.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/testing/toxic/main.c b/testing/toxic/main.c
index c14dee1f..ad89b23c 100644
--- a/testing/toxic/main.c
+++ b/testing/toxic/main.c
@@ -46,7 +46,7 @@ int w_num;
46int active_window; 46int active_window;
47 47
48/* CALLBACKS START */ 48/* CALLBACKS START */
49void on_request(uint8_t *public_key, uint8_t *data, uint16_t length) 49void on_request(uint8_t *public_key, uint8_t *data, uint16_t length, void* userdata)
50{ 50{
51 int n = add_req(public_key); 51 int n = add_req(public_key);
52 wprintw(prompt->window, "\nFriend request from:\n"); 52 wprintw(prompt->window, "\nFriend request from:\n");
@@ -65,7 +65,7 @@ void on_request(uint8_t *public_key, uint8_t *data, uint16_t length)
65 } 65 }
66} 66}
67 67
68void on_message(Messenger *m, int friendnumber, uint8_t *string, uint16_t length) 68void on_message(Messenger *m, int friendnumber, uint8_t *string, uint16_t length, void* userdata)
69{ 69{
70 int i; 70 int i;
71 for (i = 0; i < MAX_WINDOW_SLOTS; ++i) { 71 for (i = 0; i < MAX_WINDOW_SLOTS; ++i) {
@@ -74,7 +74,7 @@ void on_message(Messenger *m, int friendnumber, uint8_t *string, uint16_t length
74 } 74 }
75} 75}
76 76
77void on_action(Messenger *m, int friendnumber, uint8_t *string, uint16_t length) 77void on_action(Messenger *m, int friendnumber, uint8_t *string, uint16_t length, void* userdata)
78{ 78{
79 int i; 79 int i;
80 for (i = 0; i < MAX_WINDOW_SLOTS; ++i) { 80 for (i = 0; i < MAX_WINDOW_SLOTS; ++i) {
@@ -83,7 +83,7 @@ void on_action(Messenger *m, int friendnumber, uint8_t *string, uint16_t length)
83 } 83 }
84} 84}
85 85
86void on_nickchange(Messenger *m, int friendnumber, uint8_t *string, uint16_t length) 86void on_nickchange(Messenger *m, int friendnumber, uint8_t *string, uint16_t length, void* userdata)
87{ 87{
88 wprintw(prompt->window, "\n(nickchange) %d: %s\n", friendnumber, string); 88 wprintw(prompt->window, "\n(nickchange) %d: %s\n", friendnumber, string);
89 int i; 89 int i;
@@ -93,7 +93,7 @@ void on_nickchange(Messenger *m, int friendnumber, uint8_t *string, uint16_t len
93 } 93 }
94} 94}
95 95
96void on_statuschange(Messenger *m, int friendnumber, uint8_t *string, uint16_t length) 96void on_statuschange(Messenger *m, int friendnumber, uint8_t *string, uint16_t length, void* userdata)
97{ 97{
98 wprintw(prompt->window, "\n(statuschange) %d: %s\n", friendnumber, string); 98 wprintw(prompt->window, "\n(statuschange) %d: %s\n", friendnumber, string);
99 int i; 99 int i;
@@ -134,11 +134,11 @@ static void init_tox()
134 m = initMessenger(); 134 m = initMessenger();
135 135
136 /* Callbacks */ 136 /* Callbacks */
137 m_callback_friendrequest(m, on_request); 137 m_callback_friendrequest(m, on_request, NULL);
138 m_callback_friendmessage(m, on_message); 138 m_callback_friendmessage(m, on_message, NULL);
139 m_callback_namechange(m, on_nickchange); 139 m_callback_namechange(m, on_nickchange, NULL);
140 m_callback_statusmessage(m, on_statuschange); 140 m_callback_statusmessage(m, on_statuschange, NULL);
141 m_callback_action(m, on_action); 141 m_callback_action(m, on_action, NULL);
142} 142}
143 143
144#define MAXLINE 90 /* Approx max number of chars in a sever line (IP + port + key) */ 144#define MAXLINE 90 /* Approx max number of chars in a sever line (IP + port + key) */