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

27 commits

Author SHA1 Message Date
Evangelos Ribeiro Tzaras
c7731b189a origin: Add "numeric-addresses" property
This will be useful in the dialpad to determine whether we should allow
only numeric input or not.
2021-08-13 02:13:27 +02:00
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
96a7d901c1 Fix old-style warnings all over the codebase
As caught by compiling with `-Wold-style-definition` and `-Wstrict-prototypes`.
2021-06-03 19:46:45 +00:00
Evangelos Ribeiro Tzaras
0c966fdf83 origin: Add API to query supported protocols
This will allow selecting a suitable origin when placing outgoing calls.
2021-05-28 17:02:02 +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
53f69b06dd call: Introduce protocol property 2021-05-28 13:18:24 +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
Mohammed Sadiq
b1278f6140 build: Avoid building files multiple times
We don't have to build each source for every test, instead we could
create a static library link it with every test, which will be a lot
faster.
2021-05-17 20:00:04 +05:30
Evangelos Ribeiro Tzaras
e5dc3f06ce plugins: make plugins shared modules again
This reverts the main part of commit 4a264252a7.

As plugins are the prime use case for `shared_module`
getting rid of the warning from meson about linking against shared modules
weighs less heavy.
2021-04-16 16:41:18 +00:00
Evangelos Ribeiro Tzaras
4a264252a7 plugins: build as shared library instead of shared module 2021-04-06 16:55:33 +00:00
Evangelos Ribeiro Tzaras
7d69d78b70 origin: Add country-code property
And add a binding in CallsManager for the default origin
2021-04-06 14:27:26 +00:00
Mohammed Sadiq
c30a41ffa9 Let calls-call be an abstract class
And adapt to changes.

A calls-mm-call IS-A calls-call (and so on)
2021-04-05 09:38:03 +05:30
Evangelos Ribeiro Tzaras
b60680f645 plugins: fix memory leaks with respect to items in GListStore
This was probably missed by accident in eda460ac where oFono's origin
did get the g_autoptr treatment.
2021-03-23 09:58:15 +01:00
Evangelos Ribeiro Tzaras
03d960ccaf dummy: fix infinite ringtone
Fixes #238 by making sure the call-added signal is emitted earlier.
2021-03-11 23:36:41 +01: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
Daniel Abrecht
0d8470597b Don't localise property descriptions in calls-call and calls-origin properties 2020-12-07 17:25:33 +00:00
Daniel Abrecht
4e7a0b8151 Replace CallsOrigin getters with properties and add calls_origin_foreach_call method 2020-12-07 17:25:33 +00:00
Julian Sparber
389e772069 DummyPlugin: fix events emits for call-removed, origin-*
This fixes this two issues:
- Emit the events origin-removed, origin-added when required.

- Remove call immediately when disconnected and emit events:
  By using `g_idle_add ()` we can't be sure when the call is actually
  removed and could stay potentionaly for evere, as long the main loop is
  busy. This can lead to unexpected behavior. If the calls shouldn't be
  freed then it's required to increase the ref count. This is similar how
  the `remove` event works in a `GtkContainer`.
2020-03-26 18:49:57 +00:00
Daniel Abrecht
cad79a4834 Reintroduce GParamSpec props arrays & replace g_object_notify with g_object_notify_by_pspec 2020-03-18 09:57:01 +00:00
Daniel Abrecht
a7a679c186 Convert calls call getters to readonly properties
This is part of a larger refactoring effort, with the goal to replace
all the get_*() member functions in provider abstraction interfaces with
GObject properties. See also: https://source.puri.sm/Librem5/calls/issues/6
2020-03-18 09:57:01 +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
ebf579af78 calls-dummy-origin: Fix ordering of state change and call removal callbacks 2019-07-22 14:37:27 +01:00
Bob Ham
215877cc60 calls-dummy-provider: Create an inbound call on SIGUSR1
This enables easy testing of inbound calls with just

$ calls -p dummy &
$ killall -USR1 calls
2019-06-28 15:14:45 +01:00
Bob Ham
824395b040 plugins/dummy: Implement inbound property
Also simulating dialing/ringing/active state changes for outbound
calls.
2019-06-28 15:14:41 +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