mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Renamed TOX_MESSAGE_TYPE_MESSAGE to TOX_MESSAGE_TYPE_NORMAL.
This commit is contained in:
parent
45cf8a744c
commit
e0bd6ef4e0
|
@ -39,7 +39,7 @@ void print_message(Tox *m, uint32_t friendnumber, TOX_MESSAGE_TYPE type, const u
|
|||
if (*((uint32_t *)userdata) != 974536)
|
||||
return;
|
||||
|
||||
if (type != TOX_MESSAGE_TYPE_MESSAGE) {
|
||||
if (type != TOX_MESSAGE_TYPE_NORMAL) {
|
||||
ck_abort_msg("Bad type");
|
||||
}
|
||||
|
||||
|
@ -401,9 +401,9 @@ START_TEST(test_few_clients)
|
|||
uint8_t msgs[TOX_MAX_MESSAGE_LENGTH + 1];
|
||||
memset(msgs, 'G', sizeof(msgs));
|
||||
TOX_ERR_FRIEND_SEND_MESSAGE errm;
|
||||
tox_friend_send_message(tox2, 0, TOX_MESSAGE_TYPE_MESSAGE, msgs, TOX_MAX_MESSAGE_LENGTH + 1, &errm);
|
||||
tox_friend_send_message(tox2, 0, TOX_MESSAGE_TYPE_NORMAL, msgs, TOX_MAX_MESSAGE_LENGTH + 1, &errm);
|
||||
ck_assert_msg(errm == TOX_ERR_FRIEND_SEND_MESSAGE_TOO_LONG, "TOX_MAX_MESSAGE_LENGTH is too small\n");
|
||||
tox_friend_send_message(tox2, 0, TOX_MESSAGE_TYPE_MESSAGE, msgs, TOX_MAX_MESSAGE_LENGTH, &errm);
|
||||
tox_friend_send_message(tox2, 0, TOX_MESSAGE_TYPE_NORMAL, msgs, TOX_MAX_MESSAGE_LENGTH, &errm);
|
||||
ck_assert_msg(errm == TOX_ERR_FRIEND_SEND_MESSAGE_OK, "TOX_MAX_MESSAGE_LENGTH is too big\n");
|
||||
|
||||
while (1) {
|
||||
|
|
|
@ -395,7 +395,7 @@ void line_eval(Tox *m, char *line)
|
|||
int num = strtoul(line + prompt_offset, posi, 0);
|
||||
|
||||
if (**posi != 0) {
|
||||
if (tox_friend_send_message(m, num, TOX_MESSAGE_TYPE_MESSAGE, (uint8_t *) *posi + 1, strlen(*posi + 1), NULL) < 1) {
|
||||
if (tox_friend_send_message(m, num, TOX_MESSAGE_TYPE_NORMAL, (uint8_t *) *posi + 1, strlen(*posi + 1), NULL) < 1) {
|
||||
char sss[256];
|
||||
sprintf(sss, "[i] could not send message to friend num %u", num);
|
||||
new_lines(sss);
|
||||
|
@ -607,7 +607,7 @@ void line_eval(Tox *m, char *line)
|
|||
if (conversation_default != 0) {
|
||||
if (conversation_default > 0) {
|
||||
int friendnumber = conversation_default - 1;
|
||||
uint32_t res = tox_friend_send_message(m, friendnumber, TOX_MESSAGE_TYPE_MESSAGE, (uint8_t *)line, strlen(line), NULL);
|
||||
uint32_t res = tox_friend_send_message(m, friendnumber, TOX_MESSAGE_TYPE_NORMAL, (uint8_t *)line, strlen(line), NULL);
|
||||
|
||||
if (res == 0) {
|
||||
char sss[128];
|
||||
|
|
|
@ -149,7 +149,7 @@ int main(int argc, char *argv[])
|
|||
if (ret <= 0)
|
||||
break;
|
||||
|
||||
tox_friend_send_message(tox, num, TOX_MESSAGE_TYPE_MESSAGE, buf, ret, 0);
|
||||
tox_friend_send_message(tox, num, TOX_MESSAGE_TYPE_NORMAL, buf, ret, 0);
|
||||
}
|
||||
|
||||
tox_iterate(tox);
|
||||
|
|
|
@ -300,7 +300,7 @@ typedef enum TOX_MESSAGE_TYPE {
|
|||
/**
|
||||
* Normal text message. Similar to PRIVMSG on IRC.
|
||||
*/
|
||||
TOX_MESSAGE_TYPE_MESSAGE,
|
||||
TOX_MESSAGE_TYPE_NORMAL,
|
||||
/**
|
||||
* A message describing an user action. This is similar to /me (CTCP ACTION)
|
||||
* on IRC.
|
||||
|
|
Loading…
Reference in New Issue
Block a user