origin: Add API to query supported protocols
This will allow selecting a suitable origin when placing outgoing calls.
This commit is contained in:
@@ -101,6 +101,16 @@ dial (CallsOrigin *origin, const gchar *number)
|
||||
}
|
||||
|
||||
|
||||
static gboolean
|
||||
supports_protocol (CallsOrigin *origin,
|
||||
const char *protocol)
|
||||
{
|
||||
g_assert (protocol);
|
||||
g_assert (CALLS_IS_OFONO_ORIGIN (origin));
|
||||
|
||||
return g_strcmp0 (protocol, "tel") == 0;
|
||||
}
|
||||
|
||||
CallsOfonoOrigin *
|
||||
calls_ofono_origin_new (GDBOModem *modem)
|
||||
{
|
||||
@@ -576,6 +586,7 @@ static void
|
||||
calls_ofono_origin_origin_interface_init (CallsOriginInterface *iface)
|
||||
{
|
||||
iface->dial = dial;
|
||||
iface->supports_protocol = supports_protocol;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user