Commit 3bab5aa8 authored by Evangelos Ribeiro Tzaras's avatar Evangelos Ribeiro Tzaras
Browse files

New upstream version 0.3.2

parent f849adfe
......@@ -40,7 +40,7 @@ test:native:
- build:native
script:
- export LC_ALL=C.UTF-8
- xvfb-run ninja -C _build test
- xvfb-run -s -noreset ninja -C _build test
build-gtkdoc:
extends: build:native
......@@ -83,22 +83,6 @@ check-po:
- flatpak build-bundle repo ${BUNDLE} --runtime-repo=${RUNTIME_REPO} ${APP_ID} ${BRANCH}
- tar cf repo.tar repo/
# Run automatic tests inside the Flatpak env
# we need to recreate the build directory because cleanup would have deleted build dependencies
- rm -rf flatpak_app
- flatpak-builder --user --disable-rofiles-fuse --build-only flatpak_app ${MANIFEST_PATH}
- flatpak build-finish --socket=x11 --share=network flatpak_app
- >
xvfb-run -a -s "-screen 0 1024x768x24"
flatpak-builder --user --disable-rofiles-fuse --build-shell=${FLATPAK_MODULE} flatpak_app ${MANIFEST_PATH} <<END
LANG=C.UTF-8
NO_AT_BRIDGE=1
dbus-run-session
meson test --no-stdsplit --print-errorlogs ${TEST_RUN_ARGS}
END
artifacts:
name: 'Flatpak artifacts'
expose_as: 'Get Flatpak bundle here'
......
Building
========
For build instructions see the README.md
Pull requests
=============
Before filing a pull request run the tests:
```sh
ninja -C _build test
```
Use descriptive commit messages, see
https://wiki.gnome.org/Git/CommitMessages
and check
https://wiki.openstack.org/wiki/GitCommitMessages
for good examples.
Coding Style
============
While much of the original codebase was written using [GNU's Coding Style][1],
please try to follow this document for newly written code.
For existing code you should probably try to not mix different code styles too much.
This coding style is heavily inspired/copied from [phosh's Coding Style][2]
which itself is mostly using [libhandy's Coding Style][3].
These are the differences:
- We're not picky about GTK+ style function argument indentation, that is
having multiple arguments on one line is also o.k.
- For callbacks we additionally allow for the `on_<action>` pattern e.g.
`on_feedback_ended ()` since this helps to keep the namespace
clean.
- Since we're not a library we usually use `G_DEFINE_TYPE` instead of
`G_DEFINE_TYPE_WITH_PRIVATE` (except when we need a deriveable
type) since it makes the rest of the code more compact.
Source file layout
------------------
We use one file per GObject. It should be named like the GObject with
the calls prefix, lowercase and '_' replaced by '-'. So a hypothetical
`CallsThing` would go to `src/calls-thing.c`. The
individual C files should be structured as (top to bottom of file):
- License boilerplate
```c
/*
* Copyright (C) year copyright holder
*
* SPDX-License-Identifier: GPL-3-or-later
* Author: you <youremail@example.com>
*/
```
- A log domain
```C
#define G_LOG_DOMAIN "CallsThing"
```
Usually just the GObject.
- `#include`s:
Calls ones go first, then glib/gtk, then generic C headers. These blocks
are separated by newline and each sorted alphabetically:
```
#define G_LOG_DOMAIN "CallsThing"
#include "calls-things.h"
#include "calls-other-things.h"
#include <gio/gdesktopappinfo.h>
#include <glib/glib.h>
#include <math.h>
```
This helps to detect missing headers in includes.
- docstring
- property enum
```c
enum {
PROP_0,
PROP_FOO,
PROP_BAR,,
LAST_PROP
};
static GParamSpec *props[LAST_PROP];
```
- signal enum
```c
enum {
FOO_HAPPENED,
BAR_TRIGGERED,
N_SIGNALS
};
static guint signals[N_SIGNALS] = { 0 };
```
- type definitions
```c
typedef struct _CallsThing {
GObject parent;
...
} CallsThing;
G_DEFINE_TYPE (CallsThing, calls_thing, G_TYPE_OBJECT)
```
- private methods and callbacks (these can also go at convenient
places above `calls_thing_constructed ()`
- `calls_thing_set_properties ()`
- `calls_thing_get_properties ()`
- `calls_thing_constructed ()`
- `calls_thing_dispose ()`
- `calls_thing_finalize ()`
- `calls_thing_class_init ()`
- `calls_thing_init ()`
- `calls_thing_new ()`
- Public methods, all starting with the object name(i.e. `calls_thing_`)
The reason public methods go at the bottom is that they have declarations in
the header file and can thus be referenced from anywhere else in the source
file.
Try to avoid forward declarations where possible.
[1]: https://www.gnu.org/prep/standards/standards.html#Formatting
[2]: https://source.puri.sm/Librem5/phosh/blob/master/HACKING.md#coding-style
[3]: https://source.puri.sm/Librem5/libhandy/blob/master/HACKING.md#coding-style
......@@ -36,6 +36,12 @@ If using ModemManager, Calls will wait for ModemManager to appear on
D-Bus and then wait for usable modems to appear. The UI will be
inactive and display a status message until a usable modem appears.
When running from the source tree you can use `CALLS_PLUGIN_DIR` environment
varible to specify the directroy from where plugins are loaded. To e.g. load
the dummy plugin from the source tree:
export CALLS_PLUGIN_DIR=_build/plugins/dummy/
_build/src/gnome-calls -p dummy
### oFono
There is also an oFono backend, "ofono". This was the first backend
......
gnome-calls (0.3.2) byzantium; urgency=medium
[ carlosgonz ]
* po: Update spanish translation
[ Evangelos Ribeiro Tzaras ]
* meson: bump version
* po: Add src/ui/contacts-box.ui to POTFILES.in
* d/gbp.conf: automatically bump project version
* new-call-box: make sure to call origin_count_changed_cb
* codestyle: remove whitespaces
* plugins: use g_autoptr for GError
* flatpak: remove libhandy as it is part of the SDK
* meson: bump required libhandy-1 version >1.1.90
* contact-row: remove deprecated function
* dummy: fix infinite ringtone
* ringer: use quiet profile for non-primary calls
* manager: remove unused function
* manager: hang up secondary calls
* ci: add -noreset to xvfb-run invocation for flatpak builds
* plugins: fix memory leaks with respect to items in GListStore
* ofono: Derive from CallsProvider
* test: Test loading provider plugins
* ofono: use g_bus_watch_name
* sip: Initial provider
* sip: Origin needs account credentials
* sip: sipify provider with sofia
* sip: Add media manager and sipify origin
* sip: initial call handling
* sip: origin: fix CallsSipHandles reference in sip_callback
* sip: origin: get address on incoming call
* sip: origin: fix direct connection case
* sip: call: rework call state changes
* sip: origin: emit message on DNS error
* sip: origin: do not use hardcoded ports for RTP
* sip: pipeline: bind sockets for RTP
* sip: origin: register with SIP server
* sip: go offline when disposing CallsSipOrigin
* sip: rework setting SDP
* sip: allow specifying local port and use IPv6
* sip: Use app name in the user agent
* sip: media: change default codec to PCMA
* sip: handle i_outbound 404 errors
* sip: media: improve SDP offer/answer handling
* sip: use ipv4 exclusively for now
* sip: improve connection handling by using relevant sofia tags
* application: open sip uri
* sip: use g_return_if_fail and friends only for public functions
* sip: slightly improved authentication
* sip: fix infinite ringtone loop
* sip-media: enable echo cancellation
* sip: do not auto load accounts when running tests
* test: Add basic SIP provider tests
* test: Test CallsSipOrigin
* sip: provider: use g_get_user_config_dir () for account config
* sip: provider: Fall back to reasonable values for local-port property
* sip: pipeline: clean up in finalize ()
* new-call-box: Connect signals only if origins non-NULL
* provider: Add API for loading and unloading provider plugins
* tests: use plugin load API
* test: test-plugins: Add SIP plugin
* sip: Allow controlling automatic account loading via environment
* contact-provider: remove trailing whitespaces
* ci: add -noreset to xvfb-run invocation
* call: g_return_if_fail: type check calls_call_get_contact ()
* contacts-provider: fix docstring
* best-match: g_return_if_fail if not GeeCollection
* origin: Add country-code property
* application: Use the country code
* best-match: Use the country code
* Add API to get SIM country code
* mm: Implement country-code property
* manager: set default origin
* best-match: Lookup contact if country code changed
* best-match: disconnect old signal handlers
* plugins: build as shared library instead of shared module
* sip: remove FOR_TESTING ifdef
* tests: don't special case tests needing FOR_TESTING define
* mm-origin: codestyle
* mm-origin: fix memory leak
* Introduce HACKING.md
* media-manager: codestyle
* sip: media-manager: remove unused function prototypes
* media: manager: support multiple codecs SDP wise
* sip: media: use number types for payload id and clock rate
* sip: call: rename setup local/remote connection functions
* sip: media: rework codec negotiation
* sip: media-pipeline: only create pipeline after codec negotiation
* sip: gst-rfc3551: query for plugin availability
* sip: gst-rfc3551: Add docstrings for public functions
* tests: Update year in SPDX header
* tests: Test SDP messages
* sip: media-manager: fix G_LOG_DOMAIN
* sip: media-manager: fix SDP message when there is no supported codec
* best-match: avoid using NULL phone number
* best-match: Don't set NULL phone numbers when updating country code
* meson: Fix project name in license header
* build: doc: deduplicate sources
* sip: build: depend on config.h
* ci: disable testing in flatpak
* sip: origin: make create_inbound a private function
* sip: origin: Remove hardcoded display name from contact header
* sip: origin: Remove unnecessary code
* sip: provider: Allow overriding SIP account config via environment
* sip: provider: use g_clear_pointer pattern instead of emulating it
* sip: origin: Allow using a local port of 0
* sip: pipeline: Only inform of unhandled bus massages when debugging
* sip: codestyle changes
* sip: provider: document public functions
* sip: call: Don't fail when hanging up on an incoming call
* plugins: make plugins shared modules again
* codestyle: application
* application: add --version flag
* debian: ran wrap-and-sort -ast
* d/control: Add gstreamer plugins for SIP calling tests
* sip: media-pipeline: Allow overriding audio elements from environment
* test: sip: use g_assert_cmpint for asserting enums
* test: Use dummy audio elements for Gstreamer pipelines
* test: Add calling tests
* d/gbp.conf: set multimaint-merge true
[ Pierre Michel Augustin ]
* po: Add Creole Haitian translation
[ Yuri Chornoivan ]
* po: Update Ukrainian translation
* po: Update Ukrainian translation
[ Mohammed Sadiq ]
* provider: Use GListModel to track origins
* application: Open only the first 'tel:' URI
* provider: Avoid private data
* provider: Rename a variable
* provider: Implement default methods
* Let calls-call be an abstract class
[ Guido Günther ]
* notifier: Fix compile warning
* manager: Allow one to add plugin dir via environment
* window: Don't unhibit with 0 cookie (Closes: #249)
* build: Move generated sources before source file list
* build: deduplicate sources
* provider: Fix gtk-doc transfer annotations
* calls: Fix gtk-doc transfer annotation
[ Jan Jasper de Kroon ]
* po: Add Dutch translation
[ Emin Tufan Çetin ]
* po: Update Turkish translation
[ JaroslavSvoboda ]
* Added Czech translation
[ Balázs Meskó ]
* po:Update Hungarian translation
[ Daniel Șerbănescu ]
* po: Update Romanian translation
* po: Update Romanian translation
[ anteater ]
* ofono: fix return of incorrect field
* ofono: ref self across async callback
* ofono: don't clear self->modem after constructing CallsOfonoOrigin
* ofono: track status in CallsOfonoProvider
* ofono: correct variant format confusion
* ofono: add calls-ofono-provider.c to POTFILES.skip
[ Anders Jonsson ]
* po: Update Swedish translation
* po: Update Swedish translation
[ scootergrisen ]
* po: Update Danish translation
-- Evangelos Ribeiro Tzaras <devrtz-debian@fortysixandtwo.eu> Thu, 22 Apr 2021 12:09:15 +0200
gnome-calls (0.3.1) byzantium; urgency=medium
* application: Fix double free
-- Evangelos Ribeiro Tzaras <evangelos.tzaras@puri.sm> Tue, 16 Feb 2021 11:48:14 +0100
gnome-calls (0.3.0) byzantium; urgency=medium
[ Timo Jyrinki ]
......@@ -198,11 +382,11 @@ calls (0.1.8) amber-phone; urgency=medium
[ Guido Günther ]
* po: Add Hungarian to LINGUAS
* call-record-row: Use g_autoptr for the GError
* calls-call-record-row: Ignore anonymous callsers.
* calls-call-record-row: Ignore anonymous callers.
These have an empty string which leads to
Error parsing phone number `': Keine Telefonnumme
* po: Add Spanish to LINGUAS
* gitlab-ci: Allow to only build a package
* gitlab-ci: Allow one to only build a package
* main-window: Allow the in app notification to wrap.
Othewise we overflow the window. Center it too.
* calls-main-window: Bring back old error string when no modem is present.
......
......@@ -2,41 +2,46 @@ Source: gnome-calls
Section: comm
Priority: optional
Maintainer: PureOS Maintainers <pureos-project@puri.sm>
Uploaders: Julian Sparber <julian.sparber@puri.sm>,
Evangelos Ribeiro Tzaras <evangelos.tzaras@puri.sm>
Uploaders:
Julian Sparber <julian.sparber@puri.sm>,
Evangelos Ribeiro Tzaras <evangelos.tzaras@puri.sm>,
Build-Depends:
debhelper (>= 11),
desktop-file-utils,
gstreamer1.0-plugins-good,
gtk-doc-tools <!nodoc>,
libcallaudio-dev (>= 0.0.5),
libebook-contacts1.2-dev,
libfeedback-dev,
libhandy-1-dev (>= 1.0.0),
libfolks-dev,
libgom-1.0-dev,
libgstreamer1.0-dev,
libgtk-3-dev,
libgtk-3-doc <!nodoc>,
modemmanager-dev,
libhandy-1-dev (>= 1.0.0),
libmm-glib-dev (>= 1.12.0),
libpeas-dev,
libgom-1.0-dev,
libebook-contacts1.2-dev,
valac,
libfolks-dev,
libsofia-sip-ua-glib-dev,
meson,
modemmanager-dev,
pkg-config,
# to run the tests
xvfb,
valac,
xauth,
xvfb,
Standards-Version: 4.1.3
Homepage: https://gitlab.gnome.org/Community/Purism/calls
Package: gnome-calls
Replaces: calls (<< 0.3.0)
Breaks: calls (<< 0.3.0)
Replaces:
calls (<< 0.3.0),
Breaks:
calls (<< 0.3.0),
Architecture: any
Depends:
${misc:Depends},
${shlibs:Depends},
callaudiod,
modemmanager,
${misc:Depends},
${shlibs:Depends},
Description: Make and receive PSTN phone calls
A GTK user interface for PSTN phone calls using ModemManager.
.
......@@ -44,10 +49,12 @@ Description: Make and receive PSTN phone calls
.
It works on desktops but also adjusts to small screen sizes like smart phones
and other mobile devices.
Package: gnome-calls-doc
Replaces: calls-doc (<< 0.3.0)
Breaks: calls-doc (<< 0.3.0)
Replaces:
calls-doc (<< 0.3.0),
Breaks:
calls-doc (<< 0.3.0),
Architecture: all
Build-Profiles: <!nodoc>
Depends:
......
......@@ -5,3 +5,7 @@ debian-tag-msg = %(pkg)s v%(version)s
[tag]
sign-tags = true
[dch]
postedit = sed -i s"@^\( \+version: '\)[0-9.]\+\(',\)@\1$GBP_DEBIAN_VERSION\2@" meson.build
multimaint-merge = true
Test-Command: xvfb-run /usr/bin/gnome-calls --help
Restrictions: superficial
Depends: gnome-calls, xauth, xvfb
Depends:
gnome-calls,
xauth,
xvfb,
......@@ -12,11 +12,11 @@ if get_option('gtk_doc')
calls_vala_sources,
dependencies: calls_vala_deps)
calls_doc_lib = library('calls-doc',
[calls_sources, calls_enum_sources, wayland_sources, wl_proto_sources, gdbofono_src],
[calls_sources, gdbofono_src],
include_directories: calls_includes,
link_with: calls_vala_doc_lib,
dependencies: calls_deps)
calls_doc_deps = declare_dependency(sources: [calls_sources, calls_enum_sources, wayland_sources, wl_proto_sources, calls_vala_sources],
calls_doc_deps = declare_dependency(sources: [calls_sources, calls_vala_sources],
include_directories: calls_includes,
link_with: [calls_doc_lib, calls_vala_doc_lib],
dependencies: [calls_deps, calls_vala_deps])
......
#
# Copyright (C) 2018 Purism SPC
#
# This file is part of Dialer.
# This file is part of Calls.
#
# Dialer is free software: you can redistribute it and/or modify
# Calls is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Dialer is distributed in the hope that it will be useful,
# Calls is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Dialer. If not, see <http://www.gnu.org/licenses/>.
# along with Calls. If not, see <http://www.gnu.org/licenses/>.
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
......@@ -22,7 +22,7 @@
project(
'calls',
'c', 'vala',
version: '0.3.0',
version: '0.3.2',
license: 'GPLv3+',
meson_version: '>= 0.47.0',
default_options: [
......
......@@ -37,25 +37,16 @@ struct _CallsDummyCall
CallsCallState state;
};
static void calls_dummy_call_message_source_interface_init (CallsCallInterface *iface);
static void calls_dummy_call_call_interface_init (CallsCallInterface *iface);
static void calls_dummy_call_message_source_interface_init (CallsMessageSourceInterface *iface);
G_DEFINE_TYPE_WITH_CODE (CallsDummyCall, calls_dummy_call, G_TYPE_OBJECT,
G_DEFINE_TYPE_WITH_CODE (CallsDummyCall, calls_dummy_call, CALLS_TYPE_CALL,
G_IMPLEMENT_INTERFACE (CALLS_TYPE_MESSAGE_SOURCE,
calls_dummy_call_message_source_interface_init)
G_IMPLEMENT_INTERFACE (CALLS_TYPE_CALL,
calls_dummy_call_call_interface_init))
calls_dummy_call_message_source_interface_init))
enum {
PROP_0,
PROP_NUMBER_CONSTRUCTOR,
PROP_INBOUND_CONSTRUCTOR,
PROP_CALL_NUMBER,
PROP_CALL_INBOUND,
PROP_CALL_STATE,
PROP_CALL_NAME,
PROP_LAST_PROP
};
static GParamSpec *props[PROP_LAST_PROP];
......@@ -73,15 +64,39 @@ change_state (CallsCall *call,
}
self->state = state;
g_object_notify_by_pspec (G_OBJECT (call), props[PROP_CALL_STATE]);
g_object_notify (G_OBJECT (self), "state");
g_signal_emit_by_name (call,
"state-changed",
state,
old_state);
}
static const char *
calls_dummy_call_get_number (CallsCall *call)
{
CallsDummyCall *self = CALLS_DUMMY_CALL (call);
return self->number;
}
static CallsCallState
calls_dummy_call_get_state (CallsCall *call)
{
CallsDummyCall *self = CALLS_DUMMY_CALL (call);
return self->state;
}
static gboolean
calls_dummy_call_get_inbound (CallsCall *call)
{
CallsDummyCall *self = CALLS_DUMMY_CALL (call);
return self->inbound;
}
static void
answer (CallsCall *call)
calls_dummy_call_answer (CallsCall *call)
{
CallsDummyCall *self;
......@@ -94,7 +109,7 @@ answer (CallsCall *call)
}
static void
hang_up (CallsCall *call)
calls_dummy_call_hang_up (CallsCall *call)
{
CallsDummyCall *self;
......@@ -104,19 +119,6 @@ hang_up (CallsCall *call)
change_state (call, self, CALLS_CALL_STATE_DISCONNECTED);
}
static void
tone_start (CallsCall *call, gchar key)
{
g_info ("Beep! (%c)", (int)key);
}
static void
tone_stop (CallsCall *call, gchar key)
{
g_info ("Beep end (%c)", (int)key);
}
static gboolean
outbound_timeout_cb (CallsDummyCall *self)
{
......@@ -197,39 +199,6 @@ constructed (GObject *object)
G_OBJECT_CLASS (calls_dummy_call_parent_class)->constructed (object);
}
static void
get_property (GObject *object,