1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-11-15 21:05:36 +00:00
Commit graph

15 commits

Author SHA1 Message Date
Evangelos Ribeiro Tzaras
dbb829be06 debug: Add G_LOG_DOMAIN to every file using g_debug() 2021-06-18 11:12:13 +02:00
Evangelos Ribeiro Tzaras
2847508034 Fix missing-declarations warnings all over the codebase
As caught by compiling with `-Wmissing-declarations`
by either making functions static, or declaring them in the header.
2021-06-03 19:46:45 +00:00
Evangelos Ribeiro Tzaras
44f2002f86 manager: Differentiate the NO_ORIGIN state
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
2021-06-01 14:52:23 +02:00
Evangelos Ribeiro Tzaras
7ad0f4cdd6 provider: Add API to query supported protocols
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.
2021-05-28 17:02:02 +02:00
Evangelos Ribeiro Tzaras
1def4c3585 plugins: provider: Use CallsOrigin instead of derived types for GListStore
Otherwise we run into trouble when using `g_list_store_find()`
2021-05-28 13:18:24 +02:00
anteater
a4851c4fdc ofono: correct variant format confusion
this fixes the crash observed when starting the modem (#248)
2021-04-14 20:45:15 -04:00
anteater
edc1089224 ofono: track status in CallsOfonoProvider 2021-04-14 20:45:15 -04:00
Evangelos Ribeiro Tzaras
a32f6e4dc4 ofono: use g_bus_watch_name
Otherwise the load plugins test fails in CI.
2021-04-02 07:24:51 +00:00
Evangelos Ribeiro Tzaras
52424ee927 ofono: Derive from CallsProvider
This was missed 5684d54 when CallsProvider switched from
an interface to an abstract class.

Closes #243
2021-03-24 10:00:00 +00:00
Evangelos Ribeiro Tzaras
7a6b702a31 plugins: use g_autoptr for GError 2021-03-03 00:17:49 +00:00
Evangelos Ribeiro Tzaras
3f197149a8 codestyle: remove whitespaces 2021-03-03 00:17:49 +00:00
Mohammed Sadiq
eda460ac15 provider: Use GListModel to track origins
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.
2021-02-25 08:44:56 +05:30
Mohammed Sadiq
5684d54bbd Let calls-provider be an abstract class
And adapt to changes.

A calls-mm-provider IS-A calls-provider (and so on)
2021-01-31 23:01:13 +00:00
Julian Sparber
e911f391c6
Use correct parent class when chaining up overridden functions
How `g_type_class_peek ()` was used it didn't return the correct parent
class in most cases.
G_DEFINE_TYPE macro creates a pointer we can use to get the parent
class `n_p_parent_class`.
Because we didn't use the correct parent class the object initialisation
wasn't fully completed for some GtkWidgets.
See https://developer.gnome.org/gobject/stable/chapter-gobject.html#gobject-instantiation
for more information.

This commit makes use of the `n_p_parent_class pointer` created for this
specific use case where ever possible.

Fixes: https://source.puri.sm/Librem5/calls/issues/118
2020-02-19 12:49:58 +01:00
Bob Ham
460c0c6c3d Turn providers into plugins courtesy of libpeas
This is an initial, static implementation of plugins.  The
CallsApplication has a plugin name which can be changed with a new
--provider command line option.  This plugin name is used to
instantiate the appropriate plugin when the application is activated.
From then on, the plugin cannot change.

In future, we can expand this support to include loading multiple
plugins at once, configurable through some UI.  This will have
far-reaching implications though, and complicate things like
enumerating the provider hierarchy.  There is also no practical
benefit right now; the mm and ofono plugins can't be used at the same
time because ModemManager and oFono don't play nice together, and the
whole raison d'être of the dummy plugin is undermined if you can make
use of one of the others.  So for now, we just implement one static
plugin.
2018-11-23 15:51:46 +00:00
Renamed from src/calls-ofono-provider.c (Browse further)