mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2024-11-19 01:51:46 +00:00
eda460ac15
And adapt to changes It's easier to track changes if we are using GListModel than a GList. Also, eventually we shall have multiple providers, and we can use GtkFlattenListModel to merge multiple origins without manually managing pointers ourself. Since several widgets has APIs to handle GListModels, it will also help us create widgets from GListModels easily.
33 lines
822 B
C
33 lines
822 B
C
/*
|
|
* Copyright (C) 2018 Purism SPC
|
|
*
|
|
* SPDX-License-Identifier: GPL-3.0+
|
|
*/
|
|
|
|
#include "setup-origin.h"
|
|
#include "calls-provider.h"
|
|
|
|
void
|
|
test_dummy_origin_set_up (OriginFixture *fixture,
|
|
gconstpointer user_data)
|
|
{
|
|
GListModel *origins;
|
|
|
|
test_dummy_provider_set_up (&fixture->parent, user_data);
|
|
|
|
calls_dummy_provider_add_origin (fixture->parent.dummy_provider,
|
|
TEST_ORIGIN_NAME);
|
|
|
|
origins = calls_provider_get_origins
|
|
(CALLS_PROVIDER (fixture->parent.dummy_provider));
|
|
fixture->dummy_origin = g_list_model_get_item (origins, 0);
|
|
}
|
|
|
|
|
|
void
|
|
test_dummy_origin_tear_down (OriginFixture *fixture,
|
|
gconstpointer user_data)
|
|
{
|
|
fixture->dummy_origin = NULL;
|
|
test_dummy_provider_tear_down (&fixture->parent, user_data);
|
|
}
|