origin: Add API to query supported protocols

This will allow selecting a suitable origin when placing outgoing calls.
This commit is contained in:
Evangelos Ribeiro Tzaras
2021-04-12 18:20:56 +02:00
parent 7ad0f4cdd6
commit 0c966fdf83
6 changed files with 82 additions and 0 deletions

View File

@@ -153,6 +153,17 @@ dial (CallsOrigin *origin, const gchar *number)
}
static gboolean
supports_protocol (CallsOrigin *origin,
const char *protocol)
{
g_assert (protocol != NULL);
g_assert (CALLS_IS_DUMMY_ORIGIN (origin));
return TRUE;
}
CallsDummyOrigin *
calls_dummy_origin_new (const gchar *name)
{
@@ -273,6 +284,7 @@ static void
calls_dummy_origin_origin_interface_init (CallsOriginInterface *iface)
{
iface->dial = dial;
iface->supports_protocol = supports_protocol;
}