Commit Graph

239 Commits

Author SHA1 Message Date
Slava Monich c292d771b7 voicecall: Implement ofono_voicecall_get_modem 2018-06-25 10:26:26 -05:00
Philippe De Swert 2de1aff6bd voicecall: Add memory location dialing
Implement functionality to allow to  dial favourites/quick contacts over
bluetooth.
2018-02-13 13:05:53 -06:00
Philippe De Swert 08ac5a6e5b voicecall: Rename hfp dialing functions
Calling from memory index is very similar in functionality to dialing
the last called number. So we rename the functions so we can reuse them,
to deal with memory index calling. Function names now also reflect this
is for hfp.
2018-02-13 13:00:39 -06:00
Philippe De Swert 5c0ec25353 voicecall: Fix issue with invalid dbus path
Fix an error message from dbus about the path supplied not being valid.
Related to commit f58e7685b0

ofonod[19107]: src/voicecall.c:voicecall_dial_shortcut() check position
ofonod[19107]: src/voicecall.c:synthesize_outgoing_call() Registering new call: 1
process 19107: arguments to dbus_message_iter_append_basic() were incorrect, assertion "_dbus_check_is_valid_path (*string_p)" failed in file ../../../dbus/dbus-message.c line 2759.
This is normally a bug in some application using the D-Bus library.
2017-12-08 08:26:35 -06:00
Denis Kenzior f58e7685b0 voicecall: Fix up dial_last_callback error paths
Error conditions were not properly handled
2017-11-03 13:25:04 -05:00
Philippe De Swert f5857fdd23 voicecallmanager: Handle last number dialled DBUS call
Handle the new DialLast method on the voicecallmanager interface
2017-11-03 13:18:00 -05:00
Denis Kenzior 3b951d20f4 voicecall: expand synthesize_outgoing_call
synthethize_outgoing_call was only used once from dial_handle_result.
So move all the logic of registering the call to D-Bus and adding it to
the voicecalls list to that function.

This will allow synthethize_outgoing_call to be used from other
callbacks where the dial callback is guaranteed to return before any
call state notifications, e.g. in the case of +BLDN.
2017-10-26 10:23:47 -05:00
Alexander Couzens 8e6ac330a5 voicecall: use ofono_call_status_name in DBG messages
status names are more readable then integer values.
2017-09-07 17:29:46 -05:00
Alexander Couzens 9b16b2c23c voicecall,common: move call_status_to_string() to common
call_status_to_string() is useful for debug output.
Change signature to contain enum call_status
Replace default case to get compiler warning when new enums added
2017-09-07 17:29:42 -05:00
Marcel Holtmann 9fa6f20a6f voicecall: Reword fall through statement to avoid compiler warning 2017-07-11 10:45:19 -07:00
John Ernberg 7cea20b680 voicecall: Use g_slist_free_full 2016-04-22 15:36:47 -05:00
John Ernberg a6847d0f7f voicecall: limit g_drivers variable exposure 2016-04-22 14:19:11 -05:00
John Ernberg 72570fffd8 voicecall: fix CreateMultiparty method introspection
This caused problems with stricter dbus wrappers such as dbus-c++.
2016-04-22 14:17:33 -05:00
Simon Fels 06480bdf53 voicecall: don't dereference a supplied null value
When the voicecall atom is unregistered we remove all HFP support as
well but were supplying a zero as value to the emulator status
callbacks which caused the process to crash as we were dereferencing
the supplied value always and not respecting a zero as indicator to
reset.
2015-11-29 16:01:26 -06:00
Denis Kenzior 9ec8d03c7c voicecall: Don't accept USSD strings in Dial() 2015-08-06 17:16:03 -05:00
Denis Kenzior 0727da1d5b emulator: Improve SLC establishment logic 2014-10-20 13:40:27 -05:00
Denis Kenzior 394069cb59 voicecall: Implement ofono_voicecall_mpty_hint 2013-09-12 13:17:39 -05:00
Denis Kenzior d8a9e88705 voicecall: Add extra debug info 2012-11-28 10:31:14 -06:00
Denis Kenzior 7ee8d3a16a voicecall: Fix crash 2012-11-28 10:31:14 -06:00
Denis Kenzior 1f986ebdad voicecall: Handle RESETTING sim state 2012-11-22 06:57:04 -06:00
Philippe Nunes 20138aed75 voicecall: Accept long phone number format for STK 2012-09-05 14:25:57 -05:00
Denis Kenzior 3d57bf37d0 voicecall: Implement ReleaseAndSwap 2012-08-05 23:34:16 -05:00
Marcel Holtmann c1490c6751 voicecall: Avoid shadowing of number variable 2012-07-15 20:35:42 -03:00
Marcel Holtmann 8cdc453b2b voicecall: Remove shadowing modem variable 2012-07-15 20:32:17 -03:00
Lucas De Marchi e0d6f9f0ce Do not set signature and reply in GDBus tables
Use GDBUS_* macros, so signature and reply fields are not set in each
method/signal.
2012-05-20 02:47:57 -07:00
Lucas De Marchi b3489f2ee8 Convert GDBus methods to use macro helpers
With these macro helpers we can separate in/out arguments and use their
own vector.
2012-05-20 02:47:57 -07:00
Henrique Dante de Almeida 924ee02ff7 Constify GDBus signal tables
Constify signal tables with the following command:

    find . -name '*.[ch]' -exec \
             sed -i 's/\(GDBusSignalTable .* =\)/const \1/g' {} \;
2012-05-20 02:47:56 -07:00
Henrique Dante de Almeida 63bbdebdf2 Constify GDBus method tables
Constify method tables with the following command:

find . -name '*.[ch]' -exec \
             sed -i 's/\(GDBusMethodTable .* =\)/const \1/g' {} \;
2012-05-20 02:47:56 -07:00
Frédéric Danis 004c8200aa voicecall: Force callheld update after calls swap
In HFP spec, a callheld indicator update should be sent after swapping
calls, even if it stays to 1 (AG has both active and held calls).
2012-03-20 19:26:24 -05:00
Frédéric Danis 0efaa9975a voicecall: Improve transitions check
Indicators should not be updated if:
- multiple separate calls are active at same time
- a conf call and a call are active at same time
- multiple separate calls are held at same time
- a conf call and a call are held at same time
- a conf call has call in active and held state
2012-03-13 21:44:15 -05:00
Denis Kenzior f8812ceb23 voicecall: Don't set indicators during transitions 2012-03-07 06:17:06 -06:00
Frédéric Danis a035f8b0e2 voicecall: Fix emulator AT+CHUP for HFP
AT+CHUP should be able to hang-up active or incoming calls
2012-02-09 14:21:51 -06:00
Denis Kenzior 15ef5861c5 voicecall: Use __ofono_atom_find 2012-01-18 12:21:36 -06:00
Denis Kenzior f5d84faf22 voicecall: Make emulator use release_queue 2011-10-12 16:14:06 -05:00
Denis Kenzior 4ced8116a9 voicecall: Fix HangupAll for HFP
HFP does not implement HangupAll natively and most AGs do not support
releasing held calls by id.  Work around this by using hangup active and
then dropping all held calls if no waiting calls exist.  Otherwise
fall back to releasing calls by id.
2011-10-12 16:00:00 -05:00
Marcel Holtmann 7e6afe37bf core: Update copyright information 2011-10-10 13:39:42 -07:00
Denis Kenzior cb21b7f442 voicecall: Relax reqs for hangup of held calls
If we have a single held call, then it should be possible to hang it up
with 'Hangup' even if active calls exist.  Only if multiple held calls
or a waiting call exists should we disallow the request due to possible
side-effects.
2011-08-18 19:28:40 -05:00
Denis Kenzior 236f1ffb36 voicecall: Move stuff around 2011-08-18 19:28:20 -05:00
Frédéric Danis 0001866186 emulator: fix indicator notification 2011-08-15 00:25:27 -05:00
Denis Kenzior fe757a5b83 voicecall: Be more paranoid and null terminate 2011-07-25 22:57:08 -05:00
Denis Kenzior 625045dcb1 voicecall: Use defined constants 2011-07-25 22:55:30 -05:00
Jeevaka Badrappan 14b003c7d9 voicecall: api for set/clear alpha and icon id 2011-07-25 21:43:04 -05:00
Frédéric Danis c7610c44af voicecall: remove usage of em_atd_number
as emulator atom can only run with a 'ready' SIM,
use saved number instead of em_atd_number
2011-07-21 20:26:43 -05:00
Denis Kenzior aa58348bbc voicecall: Free settings when sim gets locked out 2011-07-19 15:07:02 -05:00
Frédéric Danis 9751914274 voicecall: close settings when SIM is removed
This also fixes the case where +BLDN uses an invalid number when the SIM
is removed.
2011-07-19 12:09:22 -05:00
Frédéric Danis d3f8eae1ff voicecall: fix callheld indicator for PTS
Fix PTS test TP/TWC/BV-03-I [Call Waiting- Hold Active/Retrieve
Waiting Call or Held].

PTS test fails after receiving intermediate update of callheld indicator
with value 0 (no held call) before it receives update to value 1
(active and held calls). This is due to the non-atomic update of calls
status after call swap (moving first call to active state before moving
second one to hold state).

HFP 1.5 spec specifies that an update of callheld indicator to 1 should
be sent after AT+CHLD=2 command.
As oFono emulator sends +CIEV only if the indicator value changes, we
need to use an intermediate state for callheld indicator (2, all calls on
hold).

So, in case of multiple active calls, or an active call with an active
mutiparty call, force update of callheld indicator to 2.
2011-07-19 11:18:22 -05:00
Denis Kenzior fd47c3a502 voicecall: Minor style fix 2011-07-14 19:58:32 -05:00
Denis Kenzior e825cf3ee4 voicecall: dial_request_user_cancel is not safe
It is not safe to call dial_request_user_cancel directly.  This is
because there might be a situation where the SIM requested the calls to
be dropped first.  If we're still executing the release_all_active
request and someone calls hangup -> crash.

Instead it is safer to throttle the hangup requests until the call is
actually dialing.

In similar fashion, we should not allow hanging up a specific call if a
dial request is active, unless that call is part of the SIM dial
request.  Note that by default this is not known until the driver's dial
implementation returns and the call is in the dialing (or alerting /
connected) state.
2011-07-14 19:15:53 -05:00
Denis Kenzior 70df9939db voicecall: Send busy to DBus if emulator is pending 2011-07-14 18:28:37 -05:00
Denis Kenzior 688258a7c6 voicecall: Don't send response to defunct emulator 2011-07-14 18:28:37 -05:00