|
|
|
|
@ -133,6 +133,10 @@ static void _configure_core_for_callbacks(LinphoneCoreManager *lcm, LinphoneCore
|
|
|
|
|
linphone_core_set_user_data(lcm->lc, lcm);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void _start_core(LinphoneCoreManager *lcm) {
|
|
|
|
|
linphone_core_manager_start(lcm, TRUE);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Configure list of core manager for conference and add the listener
|
|
|
|
|
static bctbx_list_t * init_core_for_conference(bctbx_list_t *coreManagerList) {
|
|
|
|
|
bctbx_list_t *coresList = NULL;
|
|
|
|
|
@ -157,6 +161,10 @@ static bctbx_list_t * init_core_for_conference(bctbx_list_t *coreManagerList) {
|
|
|
|
|
return coresList;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void start_core_for_conference(bctbx_list_t *coreManagerList) {
|
|
|
|
|
bctbx_list_for_each(coreManagerList, (void (*)(void *))_start_core);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static LinphoneChatRoom * check_creation_chat_room_client_side(bctbx_list_t *lcs, LinphoneCoreManager *lcm, stats *initialStats, const LinphoneAddress *confAddr, const char* subject, int participantNumber, bool_t isAdmin) {
|
|
|
|
|
BC_ASSERT_TRUE(wait_for_list(lcs, &lcm->stat.number_of_LinphoneChatRoomStateCreationPending, initialStats->number_of_LinphoneChatRoomStateCreationPending + 1, 5000));
|
|
|
|
|
BC_ASSERT_TRUE(wait_for_list(lcs, &lcm->stat.number_of_LinphoneChatRoomStateCreated, initialStats->number_of_LinphoneChatRoomStateCreated + 1, 5000));
|
|
|
|
|
@ -176,7 +184,7 @@ static LinphoneChatRoom * check_creation_chat_room_client_side(bctbx_list_t *lcs
|
|
|
|
|
return chatRoom;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static LinphoneChatRoom * create_chat_room_client_side(bctbx_list_t *lcs, LinphoneCoreManager *lcm, stats *initialStats, bctbx_list_t *participantsAddresses, const char* initialSubject) {
|
|
|
|
|
static LinphoneChatRoom * create_chat_room_client_side(bctbx_list_t *lcs, LinphoneCoreManager *lcm, stats *initialStats, bctbx_list_t *participantsAddresses, const char* initialSubject, int expectedParticipantSize) {
|
|
|
|
|
LinphoneChatRoom *chatRoom = linphone_core_create_client_group_chat_room(lcm->lc, initialSubject);
|
|
|
|
|
if (!chatRoom) return NULL;
|
|
|
|
|
|
|
|
|
|
@ -188,7 +196,9 @@ static LinphoneChatRoom * create_chat_room_client_side(bctbx_list_t *lcs, Linpho
|
|
|
|
|
// Check that the chat room is correctly created on Marie's side and that the participants are added
|
|
|
|
|
BC_ASSERT_TRUE(wait_for_list(lcs, &lcm->stat.number_of_LinphoneChatRoomStateCreationPending, initialStats->number_of_LinphoneChatRoomStateCreationPending + 1, 10000));
|
|
|
|
|
BC_ASSERT_TRUE(wait_for_list(lcs, &lcm->stat.number_of_LinphoneChatRoomStateCreated, initialStats->number_of_LinphoneChatRoomStateCreated + 1, 10000));
|
|
|
|
|
BC_ASSERT_EQUAL(linphone_chat_room_get_nb_participants(chatRoom), bctbx_list_size(participantsAddresses), int, "%d");
|
|
|
|
|
BC_ASSERT_EQUAL(linphone_chat_room_get_nb_participants(chatRoom),
|
|
|
|
|
(expectedParticipantSize >= 0) ? expectedParticipantSize : (int)bctbx_list_size(participantsAddresses),
|
|
|
|
|
int, "%d");
|
|
|
|
|
LinphoneParticipant *participant = linphone_chat_room_get_me(chatRoom);
|
|
|
|
|
BC_ASSERT_PTR_NOT_NULL(participant);
|
|
|
|
|
if (participant)
|
|
|
|
|
@ -202,10 +212,10 @@ static LinphoneChatRoom * create_chat_room_client_side(bctbx_list_t *lcs, Linpho
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void group_chat_room_creation_server (void) {
|
|
|
|
|
LinphoneCoreManager *marie = linphone_core_manager_new("marie_rc");
|
|
|
|
|
LinphoneCoreManager *pauline = linphone_core_manager_new("pauline_rc");
|
|
|
|
|
LinphoneCoreManager *laure = linphone_core_manager_new("laure_tcp_rc");
|
|
|
|
|
LinphoneCoreManager *chloe = linphone_core_manager_new("chloe_rc");
|
|
|
|
|
LinphoneCoreManager *marie = linphone_core_manager_create("marie_rc");
|
|
|
|
|
LinphoneCoreManager *pauline = linphone_core_manager_create("pauline_rc");
|
|
|
|
|
LinphoneCoreManager *laure = linphone_core_manager_create("laure_tcp_rc");
|
|
|
|
|
LinphoneCoreManager *chloe = linphone_core_manager_create("chloe_rc");
|
|
|
|
|
bctbx_list_t *coresManagerList = NULL;
|
|
|
|
|
bctbx_list_t *participantsAddresses = NULL;
|
|
|
|
|
int dummy = 0;
|
|
|
|
|
@ -214,6 +224,7 @@ static void group_chat_room_creation_server (void) {
|
|
|
|
|
coresManagerList = bctbx_list_append(coresManagerList, laure);
|
|
|
|
|
coresManagerList = bctbx_list_append(coresManagerList, chloe);
|
|
|
|
|
bctbx_list_t *coresList = init_core_for_conference(coresManagerList);
|
|
|
|
|
start_core_for_conference(coresManagerList);
|
|
|
|
|
|
|
|
|
|
participantsAddresses = bctbx_list_append(participantsAddresses, linphone_address_new(linphone_core_get_identity(pauline->lc)));
|
|
|
|
|
participantsAddresses = bctbx_list_append(participantsAddresses, linphone_address_new(linphone_core_get_identity(laure->lc)));
|
|
|
|
|
@ -224,7 +235,7 @@ static void group_chat_room_creation_server (void) {
|
|
|
|
|
|
|
|
|
|
// Marie creates a new group chat room
|
|
|
|
|
const char *initialSubject = "Colleagues";
|
|
|
|
|
LinphoneChatRoom *marieCr = create_chat_room_client_side(coresList, marie, &initialMarieStats, participantsAddresses, initialSubject);
|
|
|
|
|
LinphoneChatRoom *marieCr = create_chat_room_client_side(coresList, marie, &initialMarieStats, participantsAddresses, initialSubject, -1);
|
|
|
|
|
const LinphoneAddress *confAddr = linphone_chat_room_get_conference_address(marieCr);
|
|
|
|
|
|
|
|
|
|
// Check that the chat room is correctly created on Pauline's side and that the participants are added
|
|
|
|
|
@ -364,9 +375,9 @@ static void group_chat_room_creation_server (void) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void group_chat_room_send_message (void) {
|
|
|
|
|
LinphoneCoreManager *marie = linphone_core_manager_new("marie_rc");
|
|
|
|
|
LinphoneCoreManager *pauline = linphone_core_manager_new("pauline_rc");
|
|
|
|
|
LinphoneCoreManager *chloe = linphone_core_manager_new("chloe_rc");
|
|
|
|
|
LinphoneCoreManager *marie = linphone_core_manager_create("marie_rc");
|
|
|
|
|
LinphoneCoreManager *pauline = linphone_core_manager_create("pauline_rc");
|
|
|
|
|
LinphoneCoreManager *chloe = linphone_core_manager_create("chloe_rc");
|
|
|
|
|
bctbx_list_t *coresManagerList = NULL;
|
|
|
|
|
bctbx_list_t *participantsAddresses = NULL;
|
|
|
|
|
int dummy = 0;
|
|
|
|
|
@ -374,6 +385,7 @@ static void group_chat_room_send_message (void) {
|
|
|
|
|
coresManagerList = bctbx_list_append(coresManagerList, pauline);
|
|
|
|
|
coresManagerList = bctbx_list_append(coresManagerList, chloe);
|
|
|
|
|
bctbx_list_t *coresList = init_core_for_conference(coresManagerList);
|
|
|
|
|
start_core_for_conference(coresManagerList);
|
|
|
|
|
participantsAddresses = bctbx_list_append(participantsAddresses, linphone_address_new(linphone_core_get_identity(pauline->lc)));
|
|
|
|
|
participantsAddresses = bctbx_list_append(participantsAddresses, linphone_address_new(linphone_core_get_identity(chloe->lc)));
|
|
|
|
|
stats initialMarieStats = marie->stat;
|
|
|
|
|
@ -382,7 +394,7 @@ static void group_chat_room_send_message (void) {
|
|
|
|
|
|
|
|
|
|
// Marie creates a new group chat room
|
|
|
|
|
const char *initialSubject = "Colleagues";
|
|
|
|
|
LinphoneChatRoom *marieCr = create_chat_room_client_side(coresList, marie, &initialMarieStats, participantsAddresses, initialSubject);
|
|
|
|
|
LinphoneChatRoom *marieCr = create_chat_room_client_side(coresList, marie, &initialMarieStats, participantsAddresses, initialSubject, -1);
|
|
|
|
|
const LinphoneAddress *confAddr = linphone_chat_room_get_conference_address(marieCr);
|
|
|
|
|
|
|
|
|
|
// Check that the chat room is correctly created on Pauline's side and that the participants are added
|
|
|
|
|
@ -423,10 +435,10 @@ static void group_chat_room_send_message (void) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void group_chat_room_invite_multi_register_account (void) {
|
|
|
|
|
LinphoneCoreManager *marie = linphone_core_manager_new("marie_rc");
|
|
|
|
|
LinphoneCoreManager *pauline1 = linphone_core_manager_new("pauline_rc");
|
|
|
|
|
LinphoneCoreManager *pauline2 = linphone_core_manager_new("pauline_rc");
|
|
|
|
|
LinphoneCoreManager *laure = linphone_core_manager_new("laure_tcp_rc");
|
|
|
|
|
LinphoneCoreManager *marie = linphone_core_manager_create("marie_rc");
|
|
|
|
|
LinphoneCoreManager *pauline1 = linphone_core_manager_create("pauline_rc");
|
|
|
|
|
LinphoneCoreManager *pauline2 = linphone_core_manager_create("pauline_rc");
|
|
|
|
|
LinphoneCoreManager *laure = linphone_core_manager_create("laure_tcp_rc");
|
|
|
|
|
bctbx_list_t *coresManagerList = NULL;
|
|
|
|
|
bctbx_list_t *participantsAddresses = NULL;
|
|
|
|
|
int dummy = 0;
|
|
|
|
|
@ -435,6 +447,7 @@ static void group_chat_room_invite_multi_register_account (void) {
|
|
|
|
|
coresManagerList = bctbx_list_append(coresManagerList, pauline2);
|
|
|
|
|
coresManagerList = bctbx_list_append(coresManagerList, laure);
|
|
|
|
|
bctbx_list_t *coresList = init_core_for_conference(coresManagerList);
|
|
|
|
|
start_core_for_conference(coresManagerList);
|
|
|
|
|
participantsAddresses = bctbx_list_append(participantsAddresses, linphone_address_new(linphone_core_get_identity(pauline1->lc)));
|
|
|
|
|
participantsAddresses = bctbx_list_append(participantsAddresses, linphone_address_new(linphone_core_get_identity(laure->lc)));
|
|
|
|
|
stats initialMarieStats = marie->stat;
|
|
|
|
|
@ -444,7 +457,7 @@ static void group_chat_room_invite_multi_register_account (void) {
|
|
|
|
|
|
|
|
|
|
// Marie creates a new group chat room
|
|
|
|
|
const char *initialSubject = "Colleagues";
|
|
|
|
|
LinphoneChatRoom *marieCr = create_chat_room_client_side(coresList, marie, &initialMarieStats, participantsAddresses, initialSubject);
|
|
|
|
|
LinphoneChatRoom *marieCr = create_chat_room_client_side(coresList, marie, &initialMarieStats, participantsAddresses, initialSubject, -1);
|
|
|
|
|
|
|
|
|
|
const LinphoneAddress *confAddr = linphone_chat_room_get_conference_address(marieCr);
|
|
|
|
|
|
|
|
|
|
@ -473,9 +486,9 @@ static void group_chat_room_invite_multi_register_account (void) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void group_chat_room_add_admin (void) {
|
|
|
|
|
LinphoneCoreManager *marie = linphone_core_manager_new("marie_rc");
|
|
|
|
|
LinphoneCoreManager *pauline = linphone_core_manager_new("pauline_rc");
|
|
|
|
|
LinphoneCoreManager *laure = linphone_core_manager_new("laure_tcp_rc");
|
|
|
|
|
LinphoneCoreManager *marie = linphone_core_manager_create("marie_rc");
|
|
|
|
|
LinphoneCoreManager *pauline = linphone_core_manager_create("pauline_rc");
|
|
|
|
|
LinphoneCoreManager *laure = linphone_core_manager_create("laure_tcp_rc");
|
|
|
|
|
bctbx_list_t *coresManagerList = NULL;
|
|
|
|
|
bctbx_list_t *participantsAddresses = NULL;
|
|
|
|
|
int dummy = 0;
|
|
|
|
|
@ -483,6 +496,7 @@ static void group_chat_room_add_admin (void) {
|
|
|
|
|
coresManagerList = bctbx_list_append(coresManagerList, pauline);
|
|
|
|
|
coresManagerList = bctbx_list_append(coresManagerList, laure);
|
|
|
|
|
bctbx_list_t *coresList = init_core_for_conference(coresManagerList);
|
|
|
|
|
start_core_for_conference(coresManagerList);
|
|
|
|
|
participantsAddresses = bctbx_list_append(participantsAddresses, linphone_address_new(linphone_core_get_identity(pauline->lc)));
|
|
|
|
|
participantsAddresses = bctbx_list_append(participantsAddresses, linphone_address_new(linphone_core_get_identity(laure->lc)));
|
|
|
|
|
stats initialMarieStats = marie->stat;
|
|
|
|
|
@ -491,7 +505,7 @@ static void group_chat_room_add_admin (void) {
|
|
|
|
|
|
|
|
|
|
// Marie creates a new group chat room
|
|
|
|
|
const char *initialSubject = "Colleagues";
|
|
|
|
|
LinphoneChatRoom *marieCr = create_chat_room_client_side(coresList, marie, &initialMarieStats, participantsAddresses, initialSubject);
|
|
|
|
|
LinphoneChatRoom *marieCr = create_chat_room_client_side(coresList, marie, &initialMarieStats, participantsAddresses, initialSubject, -1);
|
|
|
|
|
|
|
|
|
|
const LinphoneAddress *confAddr = linphone_chat_room_get_conference_address(marieCr);
|
|
|
|
|
|
|
|
|
|
@ -526,9 +540,9 @@ static void group_chat_room_add_admin (void) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void group_chat_room_add_admin_non_admin (void) {
|
|
|
|
|
LinphoneCoreManager *marie = linphone_core_manager_new("marie_rc");
|
|
|
|
|
LinphoneCoreManager *pauline = linphone_core_manager_new("pauline_rc");
|
|
|
|
|
LinphoneCoreManager *laure = linphone_core_manager_new("laure_tcp_rc");
|
|
|
|
|
LinphoneCoreManager *marie = linphone_core_manager_create("marie_rc");
|
|
|
|
|
LinphoneCoreManager *pauline = linphone_core_manager_create("pauline_rc");
|
|
|
|
|
LinphoneCoreManager *laure = linphone_core_manager_create("laure_tcp_rc");
|
|
|
|
|
bctbx_list_t *coresManagerList = NULL;
|
|
|
|
|
bctbx_list_t *participantsAddresses = NULL;
|
|
|
|
|
int dummy = 0;
|
|
|
|
|
@ -536,6 +550,7 @@ static void group_chat_room_add_admin_non_admin (void) {
|
|
|
|
|
coresManagerList = bctbx_list_append(coresManagerList, pauline);
|
|
|
|
|
coresManagerList = bctbx_list_append(coresManagerList, laure);
|
|
|
|
|
bctbx_list_t *coresList = init_core_for_conference(coresManagerList);
|
|
|
|
|
start_core_for_conference(coresManagerList);
|
|
|
|
|
participantsAddresses = bctbx_list_append(participantsAddresses, linphone_address_new(linphone_core_get_identity(pauline->lc)));
|
|
|
|
|
participantsAddresses = bctbx_list_append(participantsAddresses, linphone_address_new(linphone_core_get_identity(laure->lc)));
|
|
|
|
|
stats initialMarieStats = marie->stat;
|
|
|
|
|
@ -544,7 +559,7 @@ static void group_chat_room_add_admin_non_admin (void) {
|
|
|
|
|
|
|
|
|
|
// Marie creates a new group chat room
|
|
|
|
|
const char *initialSubject = "Colleagues";
|
|
|
|
|
LinphoneChatRoom *marieCr = create_chat_room_client_side(coresList, marie, &initialMarieStats, participantsAddresses, initialSubject);
|
|
|
|
|
LinphoneChatRoom *marieCr = create_chat_room_client_side(coresList, marie, &initialMarieStats, participantsAddresses, initialSubject, -1);
|
|
|
|
|
|
|
|
|
|
const LinphoneAddress *confAddr = linphone_chat_room_get_conference_address(marieCr);
|
|
|
|
|
|
|
|
|
|
@ -576,9 +591,9 @@ static void group_chat_room_add_admin_non_admin (void) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void group_chat_room_remove_admin (void) {
|
|
|
|
|
LinphoneCoreManager *marie = linphone_core_manager_new("marie_rc");
|
|
|
|
|
LinphoneCoreManager *pauline = linphone_core_manager_new("pauline_rc");
|
|
|
|
|
LinphoneCoreManager *laure = linphone_core_manager_new("laure_tcp_rc");
|
|
|
|
|
LinphoneCoreManager *marie = linphone_core_manager_create("marie_rc");
|
|
|
|
|
LinphoneCoreManager *pauline = linphone_core_manager_create("pauline_rc");
|
|
|
|
|
LinphoneCoreManager *laure = linphone_core_manager_create("laure_tcp_rc");
|
|
|
|
|
bctbx_list_t *coresManagerList = NULL;
|
|
|
|
|
bctbx_list_t *participantsAddresses = NULL;
|
|
|
|
|
int dummy = 0;
|
|
|
|
|
@ -586,6 +601,7 @@ static void group_chat_room_remove_admin (void) {
|
|
|
|
|
coresManagerList = bctbx_list_append(coresManagerList, pauline);
|
|
|
|
|
coresManagerList = bctbx_list_append(coresManagerList, laure);
|
|
|
|
|
bctbx_list_t *coresList = init_core_for_conference(coresManagerList);
|
|
|
|
|
start_core_for_conference(coresManagerList);
|
|
|
|
|
participantsAddresses = bctbx_list_append(participantsAddresses, linphone_address_new(linphone_core_get_identity(pauline->lc)));
|
|
|
|
|
participantsAddresses = bctbx_list_append(participantsAddresses, linphone_address_new(linphone_core_get_identity(laure->lc)));
|
|
|
|
|
stats initialMarieStats = marie->stat;
|
|
|
|
|
@ -594,7 +610,7 @@ static void group_chat_room_remove_admin (void) {
|
|
|
|
|
|
|
|
|
|
// Marie creates a new group chat room
|
|
|
|
|
const char *initialSubject = "Colleagues";
|
|
|
|
|
LinphoneChatRoom *marieCr = create_chat_room_client_side(coresList, marie, &initialMarieStats, participantsAddresses, initialSubject);
|
|
|
|
|
LinphoneChatRoom *marieCr = create_chat_room_client_side(coresList, marie, &initialMarieStats, participantsAddresses, initialSubject, -1);
|
|
|
|
|
|
|
|
|
|
const LinphoneAddress *confAddr = linphone_chat_room_get_conference_address(marieCr);
|
|
|
|
|
|
|
|
|
|
@ -641,9 +657,9 @@ static void group_chat_room_remove_admin (void) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static void group_chat_room_change_subject (void) {
|
|
|
|
|
LinphoneCoreManager *marie = linphone_core_manager_new("marie_rc");
|
|
|
|
|
LinphoneCoreManager *pauline = linphone_core_manager_new("pauline_rc");
|
|
|
|
|
LinphoneCoreManager *laure = linphone_core_manager_new("laure_tcp_rc");
|
|
|
|
|
LinphoneCoreManager *marie = linphone_core_manager_create("marie_rc");
|
|
|
|
|
LinphoneCoreManager *pauline = linphone_core_manager_create("pauline_rc");
|
|
|
|
|
LinphoneCoreManager *laure = linphone_core_manager_create("laure_tcp_rc");
|
|
|
|
|
bctbx_list_t *coresManagerList = NULL;
|
|
|
|
|
bctbx_list_t *participantsAddresses = NULL;
|
|
|
|
|
int dummy = 0;
|
|
|
|
|
@ -651,6 +667,7 @@ static void group_chat_room_change_subject (void) {
|
|
|
|
|
coresManagerList = bctbx_list_append(coresManagerList, pauline);
|
|
|
|
|
coresManagerList = bctbx_list_append(coresManagerList, laure);
|
|
|
|
|
bctbx_list_t *coresList = init_core_for_conference(coresManagerList);
|
|
|
|
|
start_core_for_conference(coresManagerList);
|
|
|
|
|
participantsAddresses = bctbx_list_append(participantsAddresses, linphone_address_new(linphone_core_get_identity(pauline->lc)));
|
|
|
|
|
participantsAddresses = bctbx_list_append(participantsAddresses, linphone_address_new(linphone_core_get_identity(laure->lc)));
|
|
|
|
|
stats initialMarieStats = marie->stat;
|
|
|
|
|
@ -660,7 +677,7 @@ static void group_chat_room_change_subject (void) {
|
|
|
|
|
// Marie creates a new group chat room
|
|
|
|
|
const char *initialSubject = "Colleagues";
|
|
|
|
|
const char *newSubject = "New subject";
|
|
|
|
|
LinphoneChatRoom *marieCr = create_chat_room_client_side(coresList, marie, &initialMarieStats, participantsAddresses, initialSubject);
|
|
|
|
|
LinphoneChatRoom *marieCr = create_chat_room_client_side(coresList, marie, &initialMarieStats, participantsAddresses, initialSubject, -1);
|
|
|
|
|
|
|
|
|
|
const LinphoneAddress *confAddr = linphone_chat_room_get_conference_address(marieCr);
|
|
|
|
|
|
|
|
|
|
@ -693,9 +710,9 @@ static void group_chat_room_change_subject (void) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void group_chat_room_change_subject_non_admin (void) {
|
|
|
|
|
LinphoneCoreManager *marie = linphone_core_manager_new("marie_rc");
|
|
|
|
|
LinphoneCoreManager *pauline = linphone_core_manager_new("pauline_rc");
|
|
|
|
|
LinphoneCoreManager *laure = linphone_core_manager_new("laure_tcp_rc");
|
|
|
|
|
LinphoneCoreManager *marie = linphone_core_manager_create("marie_rc");
|
|
|
|
|
LinphoneCoreManager *pauline = linphone_core_manager_create("pauline_rc");
|
|
|
|
|
LinphoneCoreManager *laure = linphone_core_manager_create("laure_tcp_rc");
|
|
|
|
|
bctbx_list_t *coresManagerList = NULL;
|
|
|
|
|
bctbx_list_t *participantsAddresses = NULL;
|
|
|
|
|
int dummy = 0;
|
|
|
|
|
@ -703,6 +720,7 @@ static void group_chat_room_change_subject_non_admin (void) {
|
|
|
|
|
coresManagerList = bctbx_list_append(coresManagerList, pauline);
|
|
|
|
|
coresManagerList = bctbx_list_append(coresManagerList, laure);
|
|
|
|
|
bctbx_list_t *coresList = init_core_for_conference(coresManagerList);
|
|
|
|
|
start_core_for_conference(coresManagerList);
|
|
|
|
|
participantsAddresses = bctbx_list_append(participantsAddresses, linphone_address_new(linphone_core_get_identity(pauline->lc)));
|
|
|
|
|
participantsAddresses = bctbx_list_append(participantsAddresses, linphone_address_new(linphone_core_get_identity(laure->lc)));
|
|
|
|
|
stats initialMarieStats = marie->stat;
|
|
|
|
|
@ -712,7 +730,7 @@ static void group_chat_room_change_subject_non_admin (void) {
|
|
|
|
|
// Marie creates a new group chat room
|
|
|
|
|
const char *initialSubject = "Colleagues";
|
|
|
|
|
const char *newSubject = "New subject";
|
|
|
|
|
LinphoneChatRoom *marieCr = create_chat_room_client_side(coresList, marie, &initialMarieStats, participantsAddresses, initialSubject);
|
|
|
|
|
LinphoneChatRoom *marieCr = create_chat_room_client_side(coresList, marie, &initialMarieStats, participantsAddresses, initialSubject, -1);
|
|
|
|
|
|
|
|
|
|
const LinphoneAddress *confAddr = linphone_chat_room_get_conference_address(marieCr);
|
|
|
|
|
|
|
|
|
|
@ -746,9 +764,9 @@ static void group_chat_room_change_subject_non_admin (void) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static void group_chat_room_remove_participant (void) {
|
|
|
|
|
LinphoneCoreManager *marie = linphone_core_manager_new("marie_rc");
|
|
|
|
|
LinphoneCoreManager *pauline = linphone_core_manager_new("pauline_rc");
|
|
|
|
|
LinphoneCoreManager *laure = linphone_core_manager_new("laure_tcp_rc");
|
|
|
|
|
LinphoneCoreManager *marie = linphone_core_manager_create("marie_rc");
|
|
|
|
|
LinphoneCoreManager *pauline = linphone_core_manager_create("pauline_rc");
|
|
|
|
|
LinphoneCoreManager *laure = linphone_core_manager_create("laure_tcp_rc");
|
|
|
|
|
bctbx_list_t *coresManagerList = NULL;
|
|
|
|
|
bctbx_list_t *participantsAddresses = NULL;
|
|
|
|
|
int dummy = 0;
|
|
|
|
|
@ -756,6 +774,7 @@ static void group_chat_room_remove_participant (void) {
|
|
|
|
|
coresManagerList = bctbx_list_append(coresManagerList, pauline);
|
|
|
|
|
coresManagerList = bctbx_list_append(coresManagerList, laure);
|
|
|
|
|
bctbx_list_t *coresList = init_core_for_conference(coresManagerList);
|
|
|
|
|
start_core_for_conference(coresManagerList);
|
|
|
|
|
participantsAddresses = bctbx_list_append(participantsAddresses, linphone_address_new(linphone_core_get_identity(pauline->lc)));
|
|
|
|
|
participantsAddresses = bctbx_list_append(participantsAddresses, linphone_address_new(linphone_core_get_identity(laure->lc)));
|
|
|
|
|
stats initialMarieStats = marie->stat;
|
|
|
|
|
@ -764,7 +783,7 @@ static void group_chat_room_remove_participant (void) {
|
|
|
|
|
|
|
|
|
|
// Marie creates a new group chat room
|
|
|
|
|
const char *initialSubject = "Colleagues";
|
|
|
|
|
LinphoneChatRoom *marieCr = create_chat_room_client_side(coresList, marie, &initialMarieStats, participantsAddresses, initialSubject);
|
|
|
|
|
LinphoneChatRoom *marieCr = create_chat_room_client_side(coresList, marie, &initialMarieStats, participantsAddresses, initialSubject, -1);
|
|
|
|
|
|
|
|
|
|
const LinphoneAddress *confAddr = linphone_chat_room_get_conference_address(marieCr);
|
|
|
|
|
|
|
|
|
|
@ -798,9 +817,9 @@ static void group_chat_room_remove_participant (void) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void group_chat_room_leave (void) {
|
|
|
|
|
LinphoneCoreManager *marie = linphone_core_manager_new("marie_rc");
|
|
|
|
|
LinphoneCoreManager *pauline = linphone_core_manager_new("pauline_rc");
|
|
|
|
|
LinphoneCoreManager *laure = linphone_core_manager_new("laure_tcp_rc");
|
|
|
|
|
LinphoneCoreManager *marie = linphone_core_manager_create("marie_rc");
|
|
|
|
|
LinphoneCoreManager *pauline = linphone_core_manager_create("pauline_rc");
|
|
|
|
|
LinphoneCoreManager *laure = linphone_core_manager_create("laure_tcp_rc");
|
|
|
|
|
bctbx_list_t *coresManagerList = NULL;
|
|
|
|
|
bctbx_list_t *participantsAddresses = NULL;
|
|
|
|
|
int dummy = 0;
|
|
|
|
|
@ -808,6 +827,7 @@ static void group_chat_room_leave (void) {
|
|
|
|
|
coresManagerList = bctbx_list_append(coresManagerList, pauline);
|
|
|
|
|
coresManagerList = bctbx_list_append(coresManagerList, laure);
|
|
|
|
|
bctbx_list_t *coresList = init_core_for_conference(coresManagerList);
|
|
|
|
|
start_core_for_conference(coresManagerList);
|
|
|
|
|
participantsAddresses = bctbx_list_append(participantsAddresses, linphone_address_new(linphone_core_get_identity(pauline->lc)));
|
|
|
|
|
participantsAddresses = bctbx_list_append(participantsAddresses, linphone_address_new(linphone_core_get_identity(laure->lc)));
|
|
|
|
|
stats initialMarieStats = marie->stat;
|
|
|
|
|
@ -816,7 +836,7 @@ static void group_chat_room_leave (void) {
|
|
|
|
|
|
|
|
|
|
// Marie creates a new group chat room
|
|
|
|
|
const char *initialSubject = "Colleagues";
|
|
|
|
|
LinphoneChatRoom *marieCr = create_chat_room_client_side(coresList, marie, &initialMarieStats, participantsAddresses, initialSubject);
|
|
|
|
|
LinphoneChatRoom *marieCr = create_chat_room_client_side(coresList, marie, &initialMarieStats, participantsAddresses, initialSubject, -1);
|
|
|
|
|
|
|
|
|
|
const LinphoneAddress *confAddr = linphone_chat_room_get_conference_address(marieCr);
|
|
|
|
|
|
|
|
|
|
@ -845,9 +865,9 @@ static void group_chat_room_leave (void) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void group_chat_room_come_back_after_disconnection (void) {
|
|
|
|
|
LinphoneCoreManager *marie = linphone_core_manager_new("marie_rc");
|
|
|
|
|
LinphoneCoreManager *pauline = linphone_core_manager_new("pauline_rc");
|
|
|
|
|
LinphoneCoreManager *laure = linphone_core_manager_new("laure_tcp_rc");
|
|
|
|
|
LinphoneCoreManager *marie = linphone_core_manager_create("marie_rc");
|
|
|
|
|
LinphoneCoreManager *pauline = linphone_core_manager_create("pauline_rc");
|
|
|
|
|
LinphoneCoreManager *laure = linphone_core_manager_create("laure_tcp_rc");
|
|
|
|
|
bctbx_list_t *coresManagerList = NULL;
|
|
|
|
|
bctbx_list_t *participantsAddresses = NULL;
|
|
|
|
|
int dummy = 0;
|
|
|
|
|
@ -855,6 +875,7 @@ static void group_chat_room_come_back_after_disconnection (void) {
|
|
|
|
|
coresManagerList = bctbx_list_append(coresManagerList, pauline);
|
|
|
|
|
coresManagerList = bctbx_list_append(coresManagerList, laure);
|
|
|
|
|
bctbx_list_t *coresList = init_core_for_conference(coresManagerList);
|
|
|
|
|
start_core_for_conference(coresManagerList);
|
|
|
|
|
participantsAddresses = bctbx_list_append(participantsAddresses, linphone_address_new(linphone_core_get_identity(pauline->lc)));
|
|
|
|
|
participantsAddresses = bctbx_list_append(participantsAddresses, linphone_address_new(linphone_core_get_identity(laure->lc)));
|
|
|
|
|
stats initialMarieStats = marie->stat;
|
|
|
|
|
@ -864,7 +885,7 @@ static void group_chat_room_come_back_after_disconnection (void) {
|
|
|
|
|
// Marie creates a new group chat room
|
|
|
|
|
const char *initialSubject = "Colleagues";
|
|
|
|
|
const char *newSubject = "New subject";
|
|
|
|
|
LinphoneChatRoom *marieCr = create_chat_room_client_side(coresList, marie, &initialMarieStats, participantsAddresses, initialSubject);
|
|
|
|
|
LinphoneChatRoom *marieCr = create_chat_room_client_side(coresList, marie, &initialMarieStats, participantsAddresses, initialSubject, -1);
|
|
|
|
|
|
|
|
|
|
const LinphoneAddress *confAddr = linphone_chat_room_get_conference_address(marieCr);
|
|
|
|
|
|
|
|
|
|
@ -931,7 +952,7 @@ static void group_chat_room_create_room_with_disconnected_friends (void) {
|
|
|
|
|
|
|
|
|
|
// Marie creates a new group chat room
|
|
|
|
|
const char *initialSubject = "Colleagues";
|
|
|
|
|
LinphoneChatRoom *marieCr = create_chat_room_client_side(coresList, marie, &initialMarieStats, participantsAddresses, initialSubject);
|
|
|
|
|
LinphoneChatRoom *marieCr = create_chat_room_client_side(coresList, marie, &initialMarieStats, participantsAddresses, initialSubject, -1);
|
|
|
|
|
|
|
|
|
|
const LinphoneAddress *confAddr = linphone_chat_room_get_conference_address(marieCr);
|
|
|
|
|
|
|
|
|
|
@ -961,9 +982,9 @@ static void group_chat_room_create_room_with_disconnected_friends (void) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void group_chat_room_reinvited_after_removed (void) {
|
|
|
|
|
LinphoneCoreManager *marie = linphone_core_manager_new("marie_rc");
|
|
|
|
|
LinphoneCoreManager *pauline = linphone_core_manager_new("pauline_rc");
|
|
|
|
|
LinphoneCoreManager *laure = linphone_core_manager_new("laure_tcp_rc");
|
|
|
|
|
LinphoneCoreManager *marie = linphone_core_manager_create("marie_rc");
|
|
|
|
|
LinphoneCoreManager *pauline = linphone_core_manager_create("pauline_rc");
|
|
|
|
|
LinphoneCoreManager *laure = linphone_core_manager_create("laure_tcp_rc");
|
|
|
|
|
bctbx_list_t *coresManagerList = NULL;
|
|
|
|
|
bctbx_list_t *participantsAddresses = NULL;
|
|
|
|
|
int dummy = 0;
|
|
|
|
|
@ -971,6 +992,7 @@ static void group_chat_room_reinvited_after_removed (void) {
|
|
|
|
|
coresManagerList = bctbx_list_append(coresManagerList, pauline);
|
|
|
|
|
coresManagerList = bctbx_list_append(coresManagerList, laure);
|
|
|
|
|
bctbx_list_t *coresList = init_core_for_conference(coresManagerList);
|
|
|
|
|
start_core_for_conference(coresManagerList);
|
|
|
|
|
participantsAddresses = bctbx_list_append(participantsAddresses, linphone_address_new(linphone_core_get_identity(pauline->lc)));
|
|
|
|
|
participantsAddresses = bctbx_list_append(participantsAddresses, linphone_address_new(linphone_core_get_identity(laure->lc)));
|
|
|
|
|
stats initialMarieStats = marie->stat;
|
|
|
|
|
@ -979,7 +1001,7 @@ static void group_chat_room_reinvited_after_removed (void) {
|
|
|
|
|
|
|
|
|
|
// Marie creates a new group chat room
|
|
|
|
|
const char *initialSubject = "Colleagues";
|
|
|
|
|
LinphoneChatRoom *marieCr = create_chat_room_client_side(coresList, marie, &initialMarieStats, participantsAddresses, initialSubject);
|
|
|
|
|
LinphoneChatRoom *marieCr = create_chat_room_client_side(coresList, marie, &initialMarieStats, participantsAddresses, initialSubject, -1);
|
|
|
|
|
participantsAddresses = NULL;
|
|
|
|
|
const LinphoneAddress *confAddr = linphone_chat_room_get_conference_address(marieCr);
|
|
|
|
|
|
|
|
|
|
@ -1031,9 +1053,9 @@ static void group_chat_room_reinvited_after_removed (void) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void group_chat_room_notify_after_disconnection (void) {
|
|
|
|
|
LinphoneCoreManager *marie = linphone_core_manager_new("marie_rc");
|
|
|
|
|
LinphoneCoreManager *pauline = linphone_core_manager_new("pauline_rc");
|
|
|
|
|
LinphoneCoreManager *laure = linphone_core_manager_new("laure_tcp_rc");
|
|
|
|
|
LinphoneCoreManager *marie = linphone_core_manager_create("marie_rc");
|
|
|
|
|
LinphoneCoreManager *pauline = linphone_core_manager_create("pauline_rc");
|
|
|
|
|
LinphoneCoreManager *laure = linphone_core_manager_create("laure_tcp_rc");
|
|
|
|
|
bctbx_list_t *coresManagerList = NULL;
|
|
|
|
|
bctbx_list_t *participantsAddresses = NULL;
|
|
|
|
|
int dummy = 0;
|
|
|
|
|
@ -1041,6 +1063,7 @@ static void group_chat_room_notify_after_disconnection (void) {
|
|
|
|
|
coresManagerList = bctbx_list_append(coresManagerList, pauline);
|
|
|
|
|
coresManagerList = bctbx_list_append(coresManagerList, laure);
|
|
|
|
|
bctbx_list_t *coresList = init_core_for_conference(coresManagerList);
|
|
|
|
|
start_core_for_conference(coresManagerList);
|
|
|
|
|
participantsAddresses = bctbx_list_append(participantsAddresses, linphone_address_new(linphone_core_get_identity(pauline->lc)));
|
|
|
|
|
participantsAddresses = bctbx_list_append(participantsAddresses, linphone_address_new(linphone_core_get_identity(laure->lc)));
|
|
|
|
|
stats initialMarieStats = marie->stat;
|
|
|
|
|
@ -1049,7 +1072,7 @@ static void group_chat_room_notify_after_disconnection (void) {
|
|
|
|
|
|
|
|
|
|
// Marie creates a new group chat room
|
|
|
|
|
const char *initialSubject = "Colleagues";
|
|
|
|
|
LinphoneChatRoom *marieCr = create_chat_room_client_side(coresList, marie, &initialMarieStats, participantsAddresses, initialSubject);
|
|
|
|
|
LinphoneChatRoom *marieCr = create_chat_room_client_side(coresList, marie, &initialMarieStats, participantsAddresses, initialSubject, -1);
|
|
|
|
|
participantsAddresses = NULL;
|
|
|
|
|
const LinphoneAddress *confAddr = linphone_chat_room_get_conference_address(marieCr);
|
|
|
|
|
|
|
|
|
|
@ -1139,12 +1162,11 @@ static void group_chat_room_notify_after_disconnection (void) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void group_chat_room_send_refer_to_all_devices (void) {
|
|
|
|
|
LinphoneCoreManager *marie1 = linphone_core_manager_new("marie_rc");
|
|
|
|
|
LinphoneCoreManager *marie2 = linphone_core_manager_new("marie_rc");
|
|
|
|
|
LinphoneCoreManager *pauline1 = linphone_core_manager_new("pauline_rc");
|
|
|
|
|
LinphoneCoreManager *pauline2 = linphone_core_manager_new("pauline_rc");
|
|
|
|
|
LinphoneCoreManager *laure1 = linphone_core_manager_new("laure_tcp_rc");
|
|
|
|
|
//LinphoneCoreManager *laure2 = linphone_core_manager_new("laure_tcp_rc");
|
|
|
|
|
LinphoneCoreManager *marie1 = linphone_core_manager_create("marie_rc");
|
|
|
|
|
LinphoneCoreManager *marie2 = linphone_core_manager_create("marie_rc");
|
|
|
|
|
LinphoneCoreManager *pauline1 = linphone_core_manager_create("pauline_rc");
|
|
|
|
|
LinphoneCoreManager *pauline2 = linphone_core_manager_create("pauline_rc");
|
|
|
|
|
LinphoneCoreManager *laure = linphone_core_manager_create("laure_tcp_rc");
|
|
|
|
|
bctbx_list_t *coresManagerList = NULL;
|
|
|
|
|
bctbx_list_t *participantsAddresses = NULL;
|
|
|
|
|
int dummy = 0;
|
|
|
|
|
@ -1152,41 +1174,39 @@ static void group_chat_room_send_refer_to_all_devices (void) {
|
|
|
|
|
coresManagerList = bctbx_list_append(coresManagerList, marie2);
|
|
|
|
|
coresManagerList = bctbx_list_append(coresManagerList, pauline1);
|
|
|
|
|
coresManagerList = bctbx_list_append(coresManagerList, pauline2);
|
|
|
|
|
coresManagerList = bctbx_list_append(coresManagerList, laure1);
|
|
|
|
|
//coresManagerList = bctbx_list_append(coresManagerList, laure2);
|
|
|
|
|
coresManagerList = bctbx_list_append(coresManagerList, laure);
|
|
|
|
|
bctbx_list_t *coresList = init_core_for_conference(coresManagerList);
|
|
|
|
|
participantsAddresses = bctbx_list_append(participantsAddresses, linphone_address_new(linphone_core_get_identity(pauline1->lc)));
|
|
|
|
|
participantsAddresses = bctbx_list_append(participantsAddresses, linphone_address_new(linphone_core_get_identity(laure1->lc)));
|
|
|
|
|
participantsAddresses = bctbx_list_append(participantsAddresses, linphone_address_new(linphone_core_get_identity(laure->lc)));
|
|
|
|
|
stats initialMarie1Stats = marie1->stat;
|
|
|
|
|
stats initialMarie2Stats = marie2->stat;
|
|
|
|
|
stats initialPauline1Stats = pauline1->stat;
|
|
|
|
|
stats initialPauline2Stats = pauline2->stat;
|
|
|
|
|
stats initialLaure1Stats = laure1->stat;
|
|
|
|
|
//stats initialLaure2Stats = laure2->stat;
|
|
|
|
|
stats initialLaureStats = laure->stat;
|
|
|
|
|
|
|
|
|
|
// Marie creates a new group chat room
|
|
|
|
|
const char *initialSubject = "Colleagues";
|
|
|
|
|
LinphoneChatRoom *marieCr = create_chat_room_client_side(coresList, marie1, &initialMarie1Stats, participantsAddresses, initialSubject);
|
|
|
|
|
LinphoneChatRoom *marieCr = create_chat_room_client_side(coresList, marie1, &initialMarie1Stats, participantsAddresses, initialSubject, -1);
|
|
|
|
|
participantsAddresses = NULL;
|
|
|
|
|
const LinphoneAddress *confAddr = linphone_chat_room_get_conference_address(marieCr);
|
|
|
|
|
|
|
|
|
|
LinphoneChatRoom *marieCr2= check_creation_chat_room_client_side(coresList, marie2, &initialMarie2Stats, confAddr, initialSubject, 2, 1);
|
|
|
|
|
// Check that the chat room is correctly created on second Marie's device
|
|
|
|
|
LinphoneChatRoom *marieCr2 = check_creation_chat_room_client_side(coresList, marie2, &initialMarie2Stats, confAddr, initialSubject, 2, 1);
|
|
|
|
|
|
|
|
|
|
// Check that the chat room is correctly created on Pauline's side and that the participants are added
|
|
|
|
|
LinphoneChatRoom *paulineCr = check_creation_chat_room_client_side(coresList, pauline1, &initialPauline1Stats, confAddr, initialSubject, 2, 0);
|
|
|
|
|
LinphoneChatRoom *paulineCr2 = check_creation_chat_room_client_side(coresList, pauline2, &initialPauline2Stats, confAddr, initialSubject, 2, 0);
|
|
|
|
|
|
|
|
|
|
// Check that the chat room is correctly created on Laure's side and that the participants are added
|
|
|
|
|
LinphoneChatRoom *laureCr = check_creation_chat_room_client_side(coresList, laure1, &initialLaure1Stats, confAddr, initialSubject, 2, 0);
|
|
|
|
|
/*LinphoneChatRoom *laure2Cr = *///check_creation_chat_room_client_side(coresList, laure2, &initialLaure2Stats, confAddr, initialSubject, 2);
|
|
|
|
|
LinphoneChatRoom *laureCr = check_creation_chat_room_client_side(coresList, laure, &initialLaureStats, confAddr, initialSubject, 2, 0);
|
|
|
|
|
|
|
|
|
|
// Marie removes Laure from the chat room
|
|
|
|
|
LinphoneAddress *laureAddr = linphone_address_new(linphone_core_get_identity(laure1->lc));
|
|
|
|
|
LinphoneAddress *laureAddr = linphone_address_new(linphone_core_get_identity(laure->lc));
|
|
|
|
|
LinphoneParticipant *laureParticipant = linphone_chat_room_find_participant(marieCr, laureAddr);
|
|
|
|
|
linphone_address_unref(laureAddr);
|
|
|
|
|
BC_ASSERT_PTR_NOT_NULL(laureParticipant);
|
|
|
|
|
linphone_chat_room_remove_participant(marieCr, laureParticipant);
|
|
|
|
|
BC_ASSERT_TRUE(wait_for_list(coresList, &laure1->stat.number_of_LinphoneChatRoomStateTerminated, initialLaure1Stats.number_of_LinphoneChatRoomStateTerminated + 1, 1000));
|
|
|
|
|
//BC_ASSERT_TRUE(wait_for_list(coresList, &laure2->stat.number_of_LinphoneChatRoomStateTerminated, initialLaure2Stats.number_of_LinphoneChatRoomStateTerminated + 1, 1000));
|
|
|
|
|
BC_ASSERT_TRUE(wait_for_list(coresList, &laure->stat.number_of_LinphoneChatRoomStateTerminated, initialLaureStats.number_of_LinphoneChatRoomStateTerminated + 1, 1000));
|
|
|
|
|
BC_ASSERT_TRUE(wait_for_list(coresList, &marie1->stat.number_of_participants_removed, initialMarie1Stats.number_of_participants_removed + 1, 1000));
|
|
|
|
|
BC_ASSERT_TRUE(wait_for_list(coresList, &marie2->stat.number_of_participants_removed, initialMarie2Stats.number_of_participants_removed + 1, 1000));
|
|
|
|
|
BC_ASSERT_TRUE(wait_for_list(coresList, &pauline1->stat.number_of_participants_removed, initialPauline1Stats.number_of_participants_removed + 1, 1000));
|
|
|
|
|
@ -1199,7 +1219,7 @@ static void group_chat_room_send_refer_to_all_devices (void) {
|
|
|
|
|
// Clean db from chat room
|
|
|
|
|
linphone_core_delete_chat_room(marie1->lc, marieCr);
|
|
|
|
|
linphone_core_delete_chat_room(marie2->lc, marieCr2);
|
|
|
|
|
linphone_core_delete_chat_room(laure1->lc, laureCr);
|
|
|
|
|
linphone_core_delete_chat_room(laure->lc, laureCr);
|
|
|
|
|
linphone_core_delete_chat_room(pauline1->lc, paulineCr);
|
|
|
|
|
linphone_core_delete_chat_room(pauline2->lc, paulineCr2);
|
|
|
|
|
|
|
|
|
|
@ -1210,8 +1230,7 @@ static void group_chat_room_send_refer_to_all_devices (void) {
|
|
|
|
|
linphone_core_manager_destroy(marie2);
|
|
|
|
|
linphone_core_manager_destroy(pauline1);
|
|
|
|
|
linphone_core_manager_destroy(pauline2);
|
|
|
|
|
linphone_core_manager_destroy(laure1);
|
|
|
|
|
//linphone_core_manager_destroy(laure2);
|
|
|
|
|
linphone_core_manager_destroy(laure);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void multiple_is_composing_notification(void) {
|
|
|
|
|
@ -1233,7 +1252,7 @@ static void multiple_is_composing_notification(void) {
|
|
|
|
|
|
|
|
|
|
// Marie creates a new group chat room
|
|
|
|
|
const char *initialSubject = "Colleagues";
|
|
|
|
|
LinphoneChatRoom *marieCr = create_chat_room_client_side(coresList, marie, &initialMarieStats, participantsAddresses, initialSubject);
|
|
|
|
|
LinphoneChatRoom *marieCr = create_chat_room_client_side(coresList, marie, &initialMarieStats, participantsAddresses, initialSubject, -1);
|
|
|
|
|
participantsAddresses = NULL;
|
|
|
|
|
const LinphoneAddress *confAddr = linphone_chat_room_get_conference_address(marieCr);
|
|
|
|
|
|
|
|
|
|
@ -1340,6 +1359,47 @@ static void multiple_is_composing_notification(void) {
|
|
|
|
|
linphone_core_manager_destroy(laure);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void group_chat_room_create_room_with_incompatible_friend (void) {
|
|
|
|
|
LinphoneCoreManager *marie = linphone_core_manager_create("marie2_rc");
|
|
|
|
|
LinphoneCoreManager *pauline = linphone_core_manager_create("pauline_rc");
|
|
|
|
|
LinphoneCoreManager *laure = linphone_core_manager_create("laure_tcp_rc");
|
|
|
|
|
bctbx_list_t *coresManagerList = NULL;
|
|
|
|
|
bctbx_list_t *participantsAddresses = NULL;
|
|
|
|
|
int dummy = 0;
|
|
|
|
|
coresManagerList = bctbx_list_append(coresManagerList, marie);
|
|
|
|
|
coresManagerList = bctbx_list_append(coresManagerList, pauline);
|
|
|
|
|
coresManagerList = bctbx_list_append(coresManagerList, laure);
|
|
|
|
|
bctbx_list_t *coresList = init_core_for_conference(coresManagerList);
|
|
|
|
|
start_core_for_conference(coresManagerList);
|
|
|
|
|
participantsAddresses = bctbx_list_append(participantsAddresses, linphone_address_new(linphone_core_get_identity(marie->lc)));
|
|
|
|
|
participantsAddresses = bctbx_list_append(participantsAddresses, linphone_address_new(linphone_core_get_identity(laure->lc)));
|
|
|
|
|
//stats initialMarieStats = marie->stat;
|
|
|
|
|
stats initialPaulineStats = pauline->stat;
|
|
|
|
|
stats initialLaureStats = laure->stat;
|
|
|
|
|
|
|
|
|
|
// Marie creates a new group chat room
|
|
|
|
|
const char *initialSubject = "Colleagues";
|
|
|
|
|
LinphoneChatRoom *paulineCr = create_chat_room_client_side(coresList, pauline, &initialPaulineStats, participantsAddresses, initialSubject, 1);
|
|
|
|
|
participantsAddresses = NULL;
|
|
|
|
|
const LinphoneAddress *confAddr = linphone_chat_room_get_conference_address(paulineCr);
|
|
|
|
|
|
|
|
|
|
// Check that the chat room is correctly created on Pauline's side and that the participants are added
|
|
|
|
|
//LinphoneChatRoom *marieCr = check_creation_chat_room_client_side(coresList, marie, &initialMarieStats, confAddr, initialSubject, 2, 0);
|
|
|
|
|
|
|
|
|
|
// Check that the chat room is correctly created on Laure's side and that the participants are added
|
|
|
|
|
LinphoneChatRoom *laureCr = check_creation_chat_room_client_side(coresList, laure, &initialLaureStats, confAddr, initialSubject, 1, 0);
|
|
|
|
|
|
|
|
|
|
BC_ASSERT_EQUAL(linphone_chat_room_get_nb_participants(laureCr), 1, int, "%d");
|
|
|
|
|
BC_ASSERT_EQUAL(linphone_chat_room_get_nb_participants(paulineCr), 1, int, "%d");
|
|
|
|
|
|
|
|
|
|
wait_for_list(coresList, &dummy, 1, 1000);
|
|
|
|
|
bctbx_list_free(coresList);
|
|
|
|
|
bctbx_list_free(coresManagerList);
|
|
|
|
|
linphone_core_manager_destroy(marie);
|
|
|
|
|
linphone_core_manager_destroy(pauline);
|
|
|
|
|
linphone_core_manager_destroy(laure);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void group_chat_room_fallback_to_basic_chat_room (void) {
|
|
|
|
|
LinphoneCoreManager *marie = linphone_core_manager_create("marie_rc");
|
|
|
|
|
LinphoneCoreManager *pauline = linphone_core_manager_create("pauline_rc");
|
|
|
|
|
|