mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2025-01-06 03:25:31 +00:00
sip: remove FOR_TESTING ifdef
This commit is contained in:
parent
4a264252a7
commit
a44c265903
3 changed files with 11 additions and 19 deletions
|
@ -63,22 +63,12 @@ static GParamSpec *props[PROP_LAST_PROP];
|
|||
|
||||
static void calls_sip_provider_message_source_interface_init (CallsMessageSourceInterface *iface);
|
||||
|
||||
#ifdef FOR_TESTING
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE
|
||||
(CallsSipProvider, calls_sip_provider, CALLS_TYPE_PROVIDER,
|
||||
G_IMPLEMENT_INTERFACE (CALLS_TYPE_MESSAGE_SOURCE,
|
||||
calls_sip_provider_message_source_interface_init))
|
||||
|
||||
|
||||
#else
|
||||
|
||||
G_DEFINE_DYNAMIC_TYPE_EXTENDED
|
||||
(CallsSipProvider, calls_sip_provider, CALLS_TYPE_PROVIDER, 0,
|
||||
G_IMPLEMENT_INTERFACE_DYNAMIC (CALLS_TYPE_MESSAGE_SOURCE,
|
||||
calls_sip_provider_message_source_interface_init));
|
||||
|
||||
#endif /* FOR_TESTING */
|
||||
|
||||
static gboolean
|
||||
check_required_keys (GKeyFile *key_file,
|
||||
|
@ -442,8 +432,6 @@ calls_sip_provider_new ()
|
|||
}
|
||||
|
||||
|
||||
#ifndef FOR_TESTING
|
||||
|
||||
static void
|
||||
calls_sip_provider_class_finalize (CallsSipProviderClass *klass)
|
||||
{
|
||||
|
@ -459,5 +447,3 @@ peas_register_types (PeasObjectModule *module)
|
|||
CALLS_TYPE_PROVIDER,
|
||||
CALLS_TYPE_SIP_PROVIDER);
|
||||
}
|
||||
|
||||
#endif /* FOR_TESTING */
|
||||
|
|
|
@ -89,14 +89,13 @@ test('plugins', t, env: test_env)
|
|||
|
||||
test_sources = [ 'test-sip.c' ]
|
||||
t = executable('sip', test_sources,
|
||||
calls_sources, sip_sources,
|
||||
c_args : test_cflags_with_test_define,
|
||||
calls_sources,
|
||||
c_args : test_cflags,
|
||||
link_args: test_link_args,
|
||||
link_with : calls_vala,
|
||||
link_with : [calls_vala, calls_sip],
|
||||
dependencies: [calls_deps, sip_deps],
|
||||
include_directories : [
|
||||
calls_includes,
|
||||
dummy_include,
|
||||
sip_include,
|
||||
]
|
||||
)
|
||||
|
|
|
@ -6,12 +6,14 @@
|
|||
* Author: Evangelos Ribeiro Tzaras <evangelos.tzaras@puri.sm>
|
||||
*/
|
||||
|
||||
#include "calls-provider.h"
|
||||
#include "calls-sip-provider.h"
|
||||
#include "calls-sip-origin.h"
|
||||
#include "calls-sip-util.h"
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <sofia-sip/su_uniqueid.h>
|
||||
#include <libpeas/peas.h>
|
||||
|
||||
typedef struct {
|
||||
CallsSipProvider *provider;
|
||||
|
@ -52,7 +54,8 @@ static void
|
|||
setup_sip_provider (SipFixture *fixture,
|
||||
gconstpointer user_data)
|
||||
{
|
||||
fixture->provider = calls_sip_provider_new ();
|
||||
CallsProvider *provider = calls_provider_load_plugin ("sip");
|
||||
fixture->provider = CALLS_SIP_PROVIDER (provider);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -60,6 +63,7 @@ tear_down_sip_provider (SipFixture *fixture,
|
|||
gconstpointer user_data)
|
||||
{
|
||||
g_clear_object (&fixture->provider);
|
||||
calls_provider_unload_plugin ("sip");
|
||||
}
|
||||
|
||||
|
||||
|
@ -170,6 +174,9 @@ main (gint argc,
|
|||
{
|
||||
gtk_test_init (&argc, &argv, NULL);
|
||||
|
||||
#ifdef PLUGIN_BUILDDIR
|
||||
peas_engine_add_search_path (peas_engine_get_default (), PLUGIN_BUILDDIR, NULL);
|
||||
#endif
|
||||
/* this is a workaround for an issue with sofia: https://github.com/freeswitch/sofia-sip/issues/58 */
|
||||
su_random64 ();
|
||||
|
||||
|
|
Loading…
Reference in a new issue