1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-06-28 06:39:32 +00:00
Commit graph

287 commits

Author SHA1 Message Date
Evangelos Ribeiro Tzaras 3f3b108cea new-call-box: Honour auto-use-default-origins setting 2021-06-01 14:52:23 +02:00
Evangelos Ribeiro Tzaras fef1531749 application: Add CallsSettings class
This makes it easy to access application wide settings.
2021-06-01 14:52:23 +02:00
Evangelos Ribeiro Tzaras 0b2f146053 manager: support multiple providers
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.
2021-06-01 14:52:18 +02: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 6d8c227b24 calls-record: Introduce the protocol property
This is in preparation for supporting multiple providers (which are handling
different protocols/URI schemes).

This commit also changes the underlying database schema.
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 1e84812938 util: Add simple API to query protocol 2021-05-28 13:18:24 +02:00
Evangelos Ribeiro Tzaras 80ec7d8a35 account-provider: Add debugging in the public functions 2021-05-28 13:18:24 +02:00
Evangelos Ribeiro Tzaras fecdc1fff8 cleanup: Fix calls_origin_get_name() related memory leaks
Document calls_origin_get_name() correctly as transfer-full.
Additionaly fix related memory leaks.
2021-05-28 13:18:24 +02:00
Evangelos Ribeiro Tzaras 1543802c88 provider: whitespace and indentation 2021-05-28 13:18:24 +02:00
Evangelos Ribeiro Tzaras 2ac43f391a manager: Set peas search path only once
There is no need to redo it for every added plugin.
2021-05-20 02:52:11 +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 14ef4f6b17 Add CallsAccountProviderInterface
This interface should by implemented by providers for which the user can add
or remove accounts.
2021-05-04 06:41:43 +02:00
Evangelos Ribeiro Tzaras 781adaddee sip: origin: Use CallsAccountState instead of SipAccountState 2021-05-04 05:57:42 +02:00
Evangelos Ribeiro Tzaras 0e5bd82568 Add CallsAccountInterface
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).
2021-05-04 05:57:42 +02:00
Evangelos Ribeiro Tzaras 3f72d34c49 Add CallsCredentials class and use it in CallsSipProvider
CallsCredentials is a dumb container to store account credentials.
This is done in preparation for the account management in the UI.
2021-05-04 05:57:06 +02:00
Evangelos Ribeiro Tzaras f9a324fc6f manager: add debug messages when adding or removing origins 2021-04-27 11:39:09 +02:00
Evangelos Ribeiro Tzaras 8a4d408f3f manager: remove unused CallsProvider argument from functions
Both add_origin() and remove_origin() don't really need it.
2021-04-27 11:39:09 +02:00
Evangelos Ribeiro Tzaras b71227aae5 call: doc: Indicate ownership in docstrings 2021-04-27 11:38:58 +02:00
Evangelos Ribeiro Tzaras 5ed24c4ed7 doc: Fix gtk-doc transfer annotations 2021-04-27 11:38:26 +02:00
Evangelos Ribeiro Tzaras 70f1df7e0e build: separate version from the rest of the configuration data
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`
2021-04-27 01:55:13 +02:00
Evangelos Ribeiro Tzaras d0194fe534 manager: g_assert in static functions 2021-04-25 18:12:59 +02:00
Evangelos Ribeiro Tzaras c2c3f64102 codestyle: new-call-box 2021-04-25 18:12:59 +02:00
Evangelos Ribeiro Tzaras d65284acaa codestyle: align function prototypes in calls-origin header
This makes it a easier on the eyes.
2021-04-25 18:12:59 +02:00
Evangelos Ribeiro Tzaras 868d9e36da codestyle: get rid of CALLS_SET_PTR_PROPERTY macro
One more step towards fixing #214
In `calls-ofono-call.c` the changed code also adheres to the newly introduced
coding style.
2021-04-25 18:12:59 +02:00
Evangelos Ribeiro Tzaras 042478a8eb call-record: Get rid of macros
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
2021-04-25 18:12:59 +02:00
Evangelos Ribeiro Tzaras 4d405e6dcb application: add --version flag
Closes #256
2021-04-16 19:57:03 +02:00
Evangelos Ribeiro Tzaras 9a4debe87e codestyle: application 2021-04-16 19:47:01 +02:00
Evangelos Ribeiro Tzaras 21666fc7d4 best-match: Don't set NULL phone numbers when updating country code
Also related to #255
2021-04-12 14:02:26 +02:00
Evangelos Ribeiro Tzaras a072d8c7e3 best-match: avoid using NULL phone number
Fixes #255
2021-04-12 14:02:19 +02:00
Evangelos Ribeiro Tzaras 9703b1e43e best-match: disconnect old signal handlers 2021-04-06 14:27:26 +00:00
Evangelos Ribeiro Tzaras 0bd6d7f2a5 best-match: Lookup contact if country code changed
Closes #217
2021-04-06 14:27:26 +00:00
Evangelos Ribeiro Tzaras 25d651c834 manager: set default origin
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.
2021-04-06 14:27:26 +00:00
Evangelos Ribeiro Tzaras 622827d293 best-match: Use the country code 2021-04-06 14:27:26 +00:00
Evangelos Ribeiro Tzaras e5832bbad3 application: Use the country code 2021-04-06 14:27:26 +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
Evangelos Ribeiro Tzaras 69b170ecfe best-match: g_return_if_fail if not GeeCollection
Closes #254
Closes #227
2021-04-06 14:27:26 +00:00
Evangelos Ribeiro Tzaras f8a57edc6d contacts-provider: fix docstring
The caller takes ownership of the returned `CallsBestMatch`, so
this should be reflected in the docstring
2021-04-06 14:27:26 +00:00
Evangelos Ribeiro Tzaras f84d3c0adf call: g_return_if_fail: type check calls_call_get_contact () 2021-04-06 14:27:26 +00:00
Evangelos Ribeiro Tzaras 32c89ca9dd contact-provider: remove trailing whitespaces 2021-04-06 14:27:26 +00:00
Guido Günther e5827adb60 calls: Fix gtk-doc transfer annotation
Broken-by: 501d2914
2021-04-06 13:01:36 +00:00
Guido Günther 01f015a21c provider: Fix gtk-doc transfer annotations
Broken-by: 9e92fb88
2021-04-06 13:01:36 +00:00
Guido Günther 443d23dd56 build: deduplicate sources
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.
2021-04-06 14:18:06 +02:00
Guido Günther 5933a4005d build: Move generated souces before source file list
This will be needed in the next commit
2021-04-06 12:50:31 +02:00
Evangelos Ribeiro Tzaras 9e92fb88af provider: Add API for loading and unloading provider plugins
This is also used for our tests. In order to avoid code duplication
this is being moved to calls-provider.{c,h}.
2021-04-05 06:13:44 +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
Mohammed Sadiq a30e1eaa8f provider: Implement default methods
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.
2021-04-04 18:16:48 +05:30
Mohammed Sadiq faa35e90dc provider: Rename a variable
Provider is no longer an interface
2021-04-04 18:12:46 +05:30
Evangelos Ribeiro Tzaras d67e690f33 new-call-box: Connect signals only if origins non-NULL
Fixes #252
2021-04-03 06:41:54 +00:00