Commit bbebdbf5 authored by Ronan's avatar Ronan

fix(tester): remove some things linked to GTK

parent 209225e2
......@@ -311,15 +311,6 @@ if (NOT ANDROID AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
set_target_properties(liblinphone_tester PROPERTIES LINKER_LANGUAGE CXX)
target_include_directories(liblinphone_tester PUBLIC ${BCTOOLBOX_TESTER_INCLUDE_DIRS})
target_link_libraries(liblinphone_tester ${LINPHONE_LIBS_FOR_TOOLS} ${OTHER_LIBS_FOR_TESTER})
if (GTK2_FOUND)
target_compile_definitions(liblinphone_tester PRIVATE HAVE_GTK)
target_include_directories(liblinphone_tester PUBLIC ${GTK2_INCLUDE_DIRS})
target_link_libraries(liblinphone_tester ${GTK2_LIBRARIES})
if(GTKMACINTEGRATION_FOUND)
target_include_directories(liblinphone_tester PUBLIC ${GTKMACINTEGRATION_INCLUDE_DIRS})
target_link_libraries(liblinphone_tester ${GTKMACINTEGRATION_LIBRARIES})
endif()
endif()
if(NOT IOS)
install(TARGETS liblinphone_tester
......
......@@ -167,13 +167,6 @@ AM_CFLAGS = -DBC_CONFIG_FILE=\"config.h\" $(STRICT_OPTIONS) $(STRICT_OPTIONS_
$(ORTP_CFLAGS) $(MEDIASTREAMER_CFLAGS) $(BCTOOLBOXTESTER_CFLAGS) \
$(BELLESIP_CFLAGS) $(LIBXML2_CFLAGS) $(SQLITE3_CFLAGS) $(BELCARD_CFLAGS)
if BUILD_GTK_UI
liblinphonetester_la_LIBADD += $(LIBGTK_LIBS) $(LIBGTKMAC_LIBS)
AM_CFLAGS += $(LIBGTK_CFLAGS) $(LIBGTKMAC_CFLAGS) -DHAVE_GTK
endif
#AM_LDFLAGS=-Wl,-rpath -Wl,$(libdir)
bin_PROGRAMS=
......
......@@ -21,25 +21,6 @@
#include "liblinphone_tester.h"
#include "tester_utils.h"
#if __clang__ || ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4)
#pragma GCC diagnostic push
#endif
#ifdef _MSC_VER
#pragma warning(disable : 4996)
#else
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#pragma GCC diagnostic ignored "-Wstrict-prototypes"
#endif
#ifdef HAVE_GTK
#include <gtk/gtk.h>
#endif
#if __clang__ || ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4)
#pragma GCC diagnostic pop
#endif
static FILE * log_file = NULL;
#ifdef __ANDROID__
......@@ -220,14 +201,6 @@ int main (int argc, char *argv[])
int i;
int ret;
#ifdef HAVE_GTK
gtk_init(&argc, &argv);
#if !GLIB_CHECK_VERSION(2,32,0) // backward compatibility with Debian 6 and CentOS 6
g_thread_init(NULL);
#endif
gdk_threads_init();
#endif
liblinphone_tester_init(NULL);
linphone_core_set_log_level(ORTP_ERROR);
......
......@@ -23,21 +23,6 @@
#include <bctoolbox/tester.h>
#include "tester_utils.h"
#if __clang__ || ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4)
#pragma GCC diagnostic push
#endif
#ifndef _MSC_VER
#pragma GCC diagnostic ignored "-Wstrict-prototypes"
#endif
#ifdef HAVE_GTK
#include <gtk/gtk.h>
#endif
#if __clang__ || ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4)
#pragma GCC diagnostic pop
#endif
#if _WIN32
#define unlink _unlink
#endif
......@@ -94,27 +79,25 @@ LinphoneAddress * create_linphone_address(const char * domain) {
}
LinphoneAddress * create_linphone_address_for_algo(const char * domain, const char* username) {
LinphoneAddress *addr = linphone_address_new(NULL);
if (!BC_ASSERT_PTR_NOT_NULL(addr)) return NULL;
/* For clients who support different algorithms, their usernames must be differnet for having diffrent forms of password */
if(username) linphone_address_set_username(addr,username);
else linphone_address_set_username(addr,test_username);
if(username) BC_ASSERT_STRING_EQUAL(username,linphone_address_get_username(addr));
else BC_ASSERT_STRING_EQUAL(test_username,linphone_address_get_username(addr));
if (!domain) domain= test_route;
linphone_address_set_domain(addr,domain);
BC_ASSERT_STRING_EQUAL(domain,linphone_address_get_domain(addr));
linphone_address_set_display_name(addr, NULL);
linphone_address_set_display_name(addr, "Mr Tester");
BC_ASSERT_STRING_EQUAL("Mr Tester",linphone_address_get_display_name(addr));
return addr;
LinphoneAddress *addr = linphone_address_new(NULL);
if (!BC_ASSERT_PTR_NOT_NULL(addr)) return NULL;
/* For clients who support different algorithms, their usernames must be differnet for having diffrent forms of password */
if (username) linphone_address_set_username(addr,username);
else linphone_address_set_username(addr,test_username);
if (username) BC_ASSERT_STRING_EQUAL(username, linphone_address_get_username(addr));
else BC_ASSERT_STRING_EQUAL(test_username, linphone_address_get_username(addr));
if (!domain) domain = test_route;
linphone_address_set_domain(addr,domain);
BC_ASSERT_STRING_EQUAL(domain, linphone_address_get_domain(addr));
linphone_address_set_display_name(addr, NULL);
linphone_address_set_display_name(addr, "Mr Tester");
BC_ASSERT_STRING_EQUAL("Mr Tester", linphone_address_get_display_name(addr));
return addr;
}
static void auth_info_requested(LinphoneCore *lc, const char *realm, const char *username, const char *domain) {
stats* counters;
ms_message("Auth info requested for user id [%s] at realm [%s]\n"
,username
,realm);
ms_message("Auth info requested for user id [%s] at realm [%s]\n", username, realm);
counters = get_stats(lc);
counters->number_of_auth_info_requested++;
}
......@@ -216,11 +199,6 @@ bool_t wait_for_list(bctbx_list_t* lcs,int* counter,int value,int timeout_ms) {
liblinphone_tester_clock_start(&start);
while ((counter==NULL || *counter<value) && !liblinphone_tester_clock_elapsed(&start,timeout_ms)) {
for (iterator=lcs;iterator!=NULL;iterator=iterator->next) {
#ifdef HAVE_GTK
gdk_threads_enter();
gtk_main_iteration_do(FALSE);
gdk_threads_leave();
#endif
linphone_core_iterate((LinphoneCore*)(iterator->data));
}
#ifdef LINPHONE_WINDOWS_DESKTOP
......@@ -621,9 +599,9 @@ void liblinphone_tester_add_suites() {
bc_tester_add_suite(&clonable_object_test_suite);
bc_tester_add_suite(&main_db_test_suite);
bc_tester_add_suite(&property_container_test_suite);
#if defined(VIDEO_ENABLED) && defined(HAVE_GTK)
bc_tester_add_suite(&video_test_suite);
#endif
#ifdef VIDEO_ENABLED
bc_tester_add_suite(&video_test_suite);
#endif // ifdef VIDEO_ENABLED
bc_tester_add_suite(&multicast_call_test_suite);
bc_tester_add_suite(&proxy_config_test_suite);
#if HAVE_SIPP
......@@ -949,10 +927,12 @@ static void linphone_conference_server_refer_received(LinphoneCore *core, const
linphone_address_unref(refer_to_addr);
}
static void linphone_conference_server_registration_state_changed(LinphoneCore *core,
LinphoneProxyConfig *cfg,
LinphoneRegistrationState cstate,
const char *message) {
static void linphone_conference_server_registration_state_changed(
LinphoneCore *core,
LinphoneProxyConfig *cfg,
LinphoneRegistrationState cstate,
const char *message
) {
LinphoneCoreCbs *cbs = linphone_core_get_current_callbacks(core);
LinphoneConferenceServer *m = (LinphoneConferenceServer *)linphone_core_cbs_get_user_data(cbs);
if(cfg == linphone_core_get_default_proxy_config(core)) {
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment