This avoids confusion when only the SIP plugin is loaded, but no account
is being used.
For this we introduce two new functions in the abstract CallsProvider class:
`is_modem()` to indicate whether the the provider deals with PTSN telephony and
`is_operational()` which by default simply checks if there any avalaible origins
This includes the following changes:
- Introduce a `providers` hash table to keep track of multiple CallProvider's
and remove the `provider` member
- Remove `calls_manager_get_provider()` and `calls_manager_set_provider()`
in favour of `calls_manager_add_provider()`, `calls_manager_remove_provider()`
and `calls_manager_has_provider()`
- Introduce a `origins` GListStore to keep track of available origins.
`origins` is updated in `items_changed_cb()` when the origins of any
CallsProvider are updated.
- Adapt to changes with respect to `calls_manager_get_origins()`.
- Introduce `origins_by_protocol` hash table to keep track of available origins
per protocol.
- Adjust tests
- We temporarily break country code lookup which was handled previously
with the "default-origin" mechanism. We will add it back to the CallsSettings
class which will provide a better application-wide mechanism.
These are the protocols that the provider plugin may support. The origins
must be queried independently whether or not they support any given protocol.
Example: A SIP origin/account may or may not support the "tel" protocol.
This is in preparation for supporting multiple providers (which are handling
different protocols/URI schemes).
This commit also changes the underlying database schema.
This interface should be implemented by origins which represent an online
account. This means they must have a implement a property representing the
credentials and another representing the account state (online, offline, etc).
This should make sure that we always have 'config.h' available and
should fix issues with flatpak build as seen in #257:
`fatal error: config.h: No such file or directory`
While these macros are not too bad, they will still be removed for the sake
of consistency (no other purism project uses macros this heavily).
Fixes part of #214
This is a bit of a hack to get the country code property hooked up
and will require a rework when multiple provider support is being added.
As the default origin is not being used anywhere else in the code
it's currently not a problem that we're not tracking if the default
origin is being removed.
Additionally test-manager.c needed some adjustment.
Shorten the needed sources from
calls_sources, calls_enum_sources, calls_resources,
wl_proto_sources, wayland_sources,
to
calls_sources
so adding new things such as generated dbus sources doesn't have to
happen in four locations but just one.
Simply return NULL when these methods are called.
If not implemented, calling these methods may result
in crash when the subclasses haven't implemented them.
IPv6 should work, but sofia's outbound engine keep printing
errors involving the outbound engine. Working theory:
Failing ICMPv6 (pings) can make sofia think we don't have connectivity.
Note that we also don't get any answers from the SIP servers we tried so far.
The upper layers do not bother whether there's an inhibitor when
calling uninhibit (and shouldn't) so don't put out out warning
when called with 0 cookie.
Closes: #249
Fixes
../src/calls-notifier.c: In function ‘state_changed_cb’:
/usr/include/glib-2.0/glib/gmacros.h:1132:17: warning: ‘notification’ may be used uninitialized in this function [-Wmaybe-uninitialized]
which wasn't problematic with the current code flow but
can easily become a problem when shuffling stuff around.
Calls can't handle multiple calls, so there is no
point in handling all URIs.
Handle opening URI in activate(), which will be helpful
when we use local_command_line()
Also, this commit fixes presenting window on initial
launch of Calls with a “tel:” URI
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.
Currently, when any call is terminated, audio profile/routing is
switched to the default one.
This is a problem when already into a call and getting a second one:
rejecting the new call will keep the first one going, but with the wrong
audio profile, making it difficult (or, on the PinePhone, impossible) to
keep talking.
This patch makes sure there is no other ongoing call before switching
the audio mode, so that it's possible to keep the first call going even
after rejecting the second one.
Because we rename the project and binaries to 'gnome-calls' we want
to make sure that the call history is preserved by doing the following:
If there is an old directory '~/.local/share/calls' try to rename it to
'gnome-calls'. Use new location if it succeeds and fall back to old location if it failed.