Commit Graph
100 Commits
Author SHA1 Message Date
Evangelos Ribeiro Tzaras 1f02e27797 flatpak: Update e-d-s to 3.40 2021-06-22 06:27:23 +02:00
Evangelos Ribeiro Tzaras d5ae0fc2f2 flatpak: Update gom to 0.4.0 2021-06-22 06:27:18 +02:00
Evangelos Ribeiro Tzaras de6293c05e meson: Passing -fPIE explicitly is discouraged
as indicated by the logs during configuration:

`WARNING: Use the 'pie' kwarg instead of passing '-fpie' manually to 'provider'`
2021-06-22 04:37:11 +02:00
Evangelos Ribeiro Tzaras 59fb343037 meson: Fix typo in gnome.compile_schemas
Logs during configuration revealed a typo:

data/meson.build:72: WARNING: Passed invalid keyword argument "depends_files".
WARNING: This will become a hard error in the future.

`depends_file` is supposed to be `depend_file`.
2021-06-22 04:37:11 +02:00
Evangelos Ribeiro Tzaras 7295607e32 meson: bump required version to 0.49.0
The pie kwarg was introduced with 0.49.0.
Amber ships 0.49.0, Amber-phone 0.51.0 and we have 0.56.2 in Debian,
so bumping the requirement should be unproblematic.
2021-06-22 04:37:11 +02:00
Evangelos Ribeiro Tzaras 8a230fc5b5 sip: origin: No need to explicitly clear nua handles
Memory allocations from su_home_t will get cleaned up, when the home is freed.
2021-06-21 13:20:32 +02:00
Evangelos Ribeiro Tzaras a803294c4a sip: origin: Handle unregistering (going offline)
and set the account state accordingly.
2021-06-18 19:29:25 +02:00
Evangelos Ribeiro Tzaras e6c7994abc sip: origin: Remove unnecessary notify 2021-06-18 19:29:25 +02:00
Evangelos Ribeiro Tzaras 5bd84043b9 sip: origin: codestyle 2021-06-18 19:28:12 +02:00
Evangelos Ribeiro Tzaras cce8318a64 notifier: Explicitly handle unknown callers
Closes #288
2021-06-18 17:13:48 +00:00
Evangelos Ribeiro Tzaras c520bdae70 run: Allow passing arguments to calls when running under gdb
Without this patch running f.e. `CALLS_GDB=1 _build/run -p sip` will not work.
2021-06-18 16:50:11 +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 160d3e42a8 ringer: Follow coding style for G_LOG_DOMAIN
Closes #294
2021-06-18 11:12:13 +02:00
Evangelos Ribeiro Tzaras 4324f683e7 run: Run under gdb when CALLS_GDB is set to 1 2021-06-18 10:21:28 +02:00
Evangelos Ribeiro Tzaras 4948148bfe Document and release 0.3.4 2021-06-12 17:24:23 +02:00
Evangelos Ribeiro Tzaras f74f4b6469 test: manager: Expanded *has_provider() testing 2021-06-11 17:52:56 +02:00
Evangelos Ribeiro Tzaras b550160a0d util: Make position argument in calls_find_store() optional 2021-06-11 17:52:43 +02:00
Evangelos Ribeiro Tzaras 736c17a4bc sip: origin: Fix if condition in dispose()
This should make sure that origins go offline
2021-06-11 17:51:06 +02:00
Evangelos Ribeiro Tzaras ccae753194 manager: codestyle 2021-06-11 17:50:42 +02:00
Evangelos Ribeiro Tzaras ddcd91d3d9 manager: Fix whitespace 2021-06-11 17:50:22 +02:00
Evangelos Ribeiro Tzaras 9f9ea16509 dir-locals: Treat G_* macros as including a semicolon
Otherwise without appending a semicolon explicitly to the macros, emacs
will insist on indentation.
2021-06-11 17:20:48 +02:00
Evangelos Ribeiro Tzaras 9b5508c627 README: Reword plugin search directory section to be more accurate 2021-06-04 17:06:07 +00:00
Evangelos Ribeiro Tzaras f81ed3d063 run: Add plugin search directory
This makes sure we can load the plugins from the build directory.
2021-06-04 17:06:07 +00:00
Evangelos Ribeiro Tzaras c0ad87fdd4 desktop-file: Register as sip and sips URI scheme handler
Closes #229
2021-06-04 06:43:08 +00:00
Evangelos Ribeiro Tzaras feaace73f4 meson: Use stricter compilation warnings and errors
All the previous commits make sure we don't fail building with these flags.
2021-06-03 19:46:45 +00:00
Evangelos Ribeiro Tzaras acc35ad224 main-window: Add default case to switch statement
As caught by compiling with `-Wswitch-default`
2021-06-03 19:46:45 +00:00
Evangelos Ribeiro Tzaras 90b598ed5b record-store: Add default case to switch statements
As caught by compiling with `-Wswitch-default`
2021-06-03 19:46:45 +00:00
Evangelos Ribeiro Tzaras f097a39e04 call-display: Add default case to switch statement
As caught by compiling with `-Wswitch-default`
2021-06-03 19:46:45 +00:00
Evangelos Ribeiro Tzaras 6c146897d4 mm: origin: Don't shadow props variable
As caught by compiling with `'-Wshadow`
2021-06-03 19:46:45 +00:00
Evangelos Ribeiro Tzaras 521979ef69 ofono: call: Don't shadow props variable
As caught by compiling with `-Wshadow`
2021-06-03 19:46:45 +00:00
Evangelos Ribeiro Tzaras 7988ddf85b sip: media-pipeline: Don't shadow props variable
As caught by compiling with `-Wshadow`
2021-06-03 19:46:45 +00: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 38abbc5b18 record-store: codestyle 2021-06-03 19:46:45 +00:00
Evangelos Ribeiro Tzaras 9877f4469b display: Fix typo 2021-06-03 19:46:45 +00:00
Evangelos Ribeiro Tzaras 588955b59e display: codestyle 2021-06-03 19:46:45 +00:00
Evangelos Ribeiro Tzaras 8d937bedf6 Initial DBus API 2021-06-03 14:29:36 +00:00
Evangelos Ribeiro Tzaras 2ae79ea06f Update README: Explain how to start calls without installing
Additionally get rid of the /usr/local/stow/calls-git prefix.
2021-06-03 13:27:56 +02:00
Evangelos Ribeiro Tzaras 04b81dd664 Add run script to the build directory
This allows starting calls by invoking something like _build/run.

Closes #292
2021-06-03 13:13:33 +02:00
Evangelos Ribeiro Tzaras 3d51d627d3 meson: Compile schemas in build directory
To make it easier to run from the build directory without having to install.
2021-06-03 12:54:46 +02:00
Evangelos Ribeiro Tzaras 23944acc91 d/control: Add libxml2-utils
We are requesting xml-stripblanks in gresources.xml and are missing
xmllint without this dependency.
2021-06-03 12:43:01 +02:00
Evangelos Ribeiro Tzaras 538d98f21d ci: disable flatpak build
Reenable the build after the build failures from #291 have been sorted out.
2021-06-02 12:22:43 +02:00
Evangelos Ribeiro Tzaras cb533aabb7 manager: Update country code
By connecting to the "notify::country-code" signal of our origins.
2021-06-01 14:52:23 +02:00
Evangelos Ribeiro Tzaras 7d3426598d application: settings: Add country code setting
This helps to unbreak country code lookup (see 5fd39121).
2021-06-01 14:52:23 +02:00
Evangelos Ribeiro Tzaras 4990529c6c tests: manager: Add multiple provider tests
The test suite can be further expanded later. For now this suffices to
have some basic regression testing for multiple provider support in place.
2021-06-01 14:52:23 +02:00
Evangelos Ribeiro Tzaras dde4bd8abf sip: provider: Don't warn when trying to add account multiple times
A g_debug() will suffice which will let us get rid of g_test_expect_message() to
as we don't need to guard against the warning anymore.
2021-06-01 14:52:23 +02:00
Evangelos Ribeiro Tzaras 9c91a33604 test: manager: Use more appropriate g_assert_*() calls 2021-06-01 14:52:23 +02: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 98d66743a1 application: Don't add a provider if one is already present
If we initially invoked `gnome-calls -p sip` and later invoke
`gnome-calls sip:user@host` we don't expect to have the default MM provider
added.
2021-06-01 14:52:23 +02:00
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 503e5c2154 test: Add util tests
Unit test the `get_protocol_from_address()` function family.
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 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
Evangelos Ribeiro Tzaras 80ec7d8a35 account-provider: Add debugging in the public functions 2021-05-28 13:18:24 +02:00
Evangelos Ribeiro Tzaras a888ac54b1 mm: origin: Try using own number as the origin name
This will make it easier to select an origin for outgoing calls. Without this
change the name might be "0" which is not very expressive.
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
Evangelos Ribeiro Tzaras 3121963220 Document and release 0.3.3 2021-05-19 18:15:00 +02:00
Evangelos Ribeiro Tzaras 1db1ba6ca9 test: Add account tests 2021-05-04 06:48:36 +02:00
Evangelos Ribeiro Tzaras 95f16cb527 sip: provider: Implement CallsAccountProvider interface 2021-05-04 06:44:43 +02:00
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 36cd9bd122 sip: provider: return origin in calls_sip_provider_add_origin() 2021-05-04 05:58:41 +02:00
Evangelos Ribeiro Tzaras a6cb02a4c9 sip: provider: codestyle 2021-05-04 05:58:41 +02:00
Evangelos Ribeiro Tzaras 3edd6d002b sip: origin: Implement CallsAccountsInterface 2021-05-04 05:57:42 +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 5d0de3d299 sip: origin: Use CallsCredentials and adapt to changes
All parts not related to credentials are now being set when creating the nua
handles and then updated with nua_set_params() when the credentials get updated.
2021-05-04 05:57:06 +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 d6916b3510 sip: media-pipeline: Do not set the stream properties prematurely 2021-05-04 05:57:06 +02:00
Evangelos Ribeiro Tzaras 2b5811dc7b flatpak: change URL for boost
The old one is giving a 403 Forbidden semi regularly.
2021-05-03 12:18:42 +02:00
Evangelos Ribeiro Tzaras 06076a864a sip: media-pipeline: Fix memory leak in error path 2021-05-02 02:36:31 +02:00
Evangelos Ribeiro Tzaras 9cd13ca681 sip: media-pipeline: Fix memory leak 2021-05-02 02:36:25 +02:00
Evangelos Ribeiro Tzaras 21e72c9e12 sip: origin: Fix nua_authenticate call
nua_* calls need TAG_END or TAG_NULL as the final parameter.
2021-05-01 13:59:32 +02:00
Evangelos Ribeiro Tzaras 0d467244b2 test: sip: Connect to state-changed signal
instead of relying so much on g_timeout_add()
2021-04-30 09:42:44 +02:00
Evangelos Ribeiro Tzaras 95bde23f2e README: Include code coverage badge 2021-04-27 13:17:55 +00: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 0c475a41dd ci: Generate code coverage reports 2021-04-27 04:59:02 +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 d7df1a4931 Revert "sip: build: depend on config.h"
This reverts commit 1a35d6544b.
This has not actually fixed the issue completely. See follow up commit
2021-04-27 01:51:05 +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 70cb120951 sip: fix typos
Thanks to lintian for pointing it out!
2021-04-23 15:35:14 +02:00
Evangelos Ribeiro Tzaras 1593dd299b test: sip: Don't use DNS lookups
Otherwise build servers might not be happy.
2021-04-23 15:10:46 +02:00
Evangelos Ribeiro Tzaras 0389137df3 d/control: bump required libhandy
This was bumped for meson.build in 35f45d83 because of changes
to HdyAvatar
2021-04-23 13:27:03 +02:00
Evangelos Ribeiro Tzaras 92e58d8ce1 Document and release 0.3.2 2021-04-22 12:17:55 +02:00
Evangelos Ribeiro Tzaras 3cd42c887f d/gbp.conf: set multimaint-merge true 2021-04-22 12:08:51 +02:00
Evangelos Ribeiro Tzaras efe1b12eb5 test: Add calling tests 2021-04-20 09:50:19 +02:00