示例#1
0
文件: group.c 项目: Ansa89/toxcore
/* Create a new toxav group.
 *
 * return group number on success.
 * return -1 on failure.
 */
int add_av_groupchat(Group_Chats *g_c, void (*audio_callback)(Messenger *, int, int, const int16_t *, unsigned int,
                     uint8_t, unsigned int, void *), void *userdata)
{
    int groupnumber = add_groupchat(g_c, GROUPCHAT_TYPE_AV);

    if (groupnumber == -1) {
        return -1;
    }

    if (groupchat_enable_av(g_c, groupnumber, audio_callback, userdata) == -1) {
        del_groupchat(g_c, groupnumber);
        return -1;
    }

    return groupnumber;
}
示例#2
0
/* Creates a new groupchat and puts it in the chats array.
 *
 * return group number on success.
 * return -1 on failure.
 */
int tox_add_groupchat(void *tox)
{
    Messenger *m = tox;
    return add_groupchat(m);
}
示例#3
0
文件: tox.c 项目: CharlyEtu/toxcore
/* Creates a new groupchat and puts it in the chats array.
 *
 * return group number on success.
 * return -1 on failure.
 */
int tox_add_groupchat(Tox *tox)
{
    Messenger *m = tox;
    return add_groupchat(m->group_chat_object);
}