Commit Graph

85 Commits

Author SHA1 Message Date
Sjur Brændeland 9a24ece0fb voicecall: Add support for function hangup_all
This patch fixes problem for modems that cannot terminate
DIALING/ALERTING calls with CHUP=1X. The main change is that
voicecall driver's hangup function is split into the functions
hangup_all and hangup_active.

Changes:
- In cases where hangup previously was used, hangup_all is used
  if implemented otherwise hangup_active is used.
- Call in state DIALING/ALERTING is released with hangup_active if
  implemented.
- manager_hangup_all will simply call hangup_all if implemented.
- manager_hangup_all will release calls in state
  ALERTING/DIALING/INCOMING using hangup_active otherwise
  release_specific.
2010-08-12 11:32:12 -05:00
Denis Kenzior ab9d7cd2cb style: No initialization needed here 2010-07-08 14:27:34 -05:00
Denis Kenzior 1786c17c3f Refactor: Store the sim object inside voicecalls
Makes the logic a bit easier to follow.  Also use a switch/case inside
the sim state watcher.
2010-04-15 16:49:42 -05:00
Denis Kenzior fa37f158d1 Style: Proper indentation 2010-04-15 16:49:42 -05:00
Andrzej Zaborowski 1ca8671d11 Handle EFen list when SIM inserted / removed 2010-04-15 16:49:41 -05:00
Denis Kenzior e1e036b5df Move voicecall interface definitions to dbus.h 2010-03-22 15:27:08 -05:00
Denis Kenzior 4b81513d95 Style: if statement 2010-02-10 16:41:31 -06:00
Denis Kenzior 87ca1b0c8f Fix: Don't use ofono_debug directly in the core
Use DBG macro which is integrated with the new debug framework.
2010-02-08 11:54:03 -06:00
Marcel Holtmann 144080e749 Update copyright information 2010-01-01 17:00:10 -08:00
Marcel Holtmann 0b359e89db Use error label instead of err or err_out 2009-12-24 07:09:09 -08:00
Denis Kenzior 955e6a61ee Style: Fix a few more occurences of if/else
See Linux coding style document for details
2009-12-17 21:45:39 -06:00
Andrzej Zaborowski 50d855d91f Support 51.011 EFecc format.
EFecc has different formats in G2 and G3 UICC specs.
2009-12-16 11:10:33 -06:00
Denis Kenzior e1ceeafe5f Optimize: call list signal emission 2009-12-04 16:52:31 -06:00
Denis Kenzior 752c5af2f0 Update voicecall atom to use new callid api 2009-12-04 16:52:31 -06:00
Denis Kenzior 0b754835f5 Add utility to get the next free call id 2009-12-04 16:52:30 -06:00
Denis Kenzior d2bcc0921d Fix: Simplify logic to use g_memdup 2009-12-01 12:45:40 -06:00
Denis Kenzior e8ac4e5368 Fix: Be more signed/unsigned correct 2009-12-01 12:42:23 -06:00
Denis Kenzior 6b223870bd Fix: Make sure we don't dial with an incoming call 2009-11-13 16:04:45 -06:00
Denis Kenzior 27cb260d07 Refactor: Simplify code and add have_incoming 2009-11-13 16:03:33 -06:00
Denis Kenzior f9580e7b3e Revert: Go back to the old dial behavior
The driver has a better idea of how to handle ATD being invoked when
a waiting/held/active call(s) is/are already present.  Generally most
modems will swap the call automatically preserving the state of the
waiting call.

We do block dialing another call while a dial is still in progress.
2009-11-13 15:29:30 -06:00
Denis Kenzior 9a703cd378 Use release_all_held to release a single held call 2009-11-12 19:16:32 -06:00
Denis Kenzior e9341c5203 Remove Voicecall.Busy method
According to 22.030, UDUB or CHLD=0 can only be invoked on waiting
calls.  Most AT command based modems do not support using CHLD=0 on an
incoming call.  So we remove the Busy method and invoke set_udub on
a call that is in the waiting state.
2009-11-12 19:16:31 -06:00
Denis Kenzior 1cabf97fe8 Use localtime_r instead of localtime 2009-11-05 16:00:34 -06:00
Denis Kenzior c5600c1be2 Fix: Refine the logic for CHLD=1 and CHLD=2 2009-10-30 12:02:43 -05:00
Denis Kenzior 8f499841cf Fix: Refine logic for hangup 2009-10-29 00:10:03 -05:00
Denis Kenzior d3778dde97 In the simple single active call case, use hangup 2009-10-28 23:39:15 -05:00
Denis Kenzior ba9f38b09e Fix: Take care of the logic for Dialing
The logic for dialing a call while other calls are in the system is a
bit more complicated than what was implemented.

There are several cases to consider:

- Active Call and Held Call
	In this situation we cannot dial, the user must drop one of the
	calls.
- Active Call and Waiting Call -> We have to put the active call on
  hold, unfortunately there is no standard command to do so without
  affecting the waiting call.  If the modem has a vendor specific
  implementation, then try to use that.

- Active Call only -> Put the active call on hold.  We use the
  swap_without_accept implementation (if exists) to be safe, otherwise
  we fall back to hold active calls.

- No Active calls -> Simply dial
2009-10-28 14:36:14 -05:00
Denis Kenzior 3ad86847ec Refactor: Avoid unnecessary forward declarations 2009-10-28 14:28:51 -05:00
Denis Kenzior 32f013f386 Refactor: Move more code around
Avoid unnecessary forward declarations
2009-10-28 14:27:39 -05:00
Denis Kenzior efd4f4b361 Refactor: Move code to avoid forward declaration 2009-10-28 14:23:51 -05:00
Denis Kenzior 466d70797f Refactor: Get rid of PENDING_FLAG in voicecalls
the pending variable was enough already.  Also refactor to use
__ofono_dbus_pending_reply to make the code much more readable.
2009-10-28 14:12:21 -05:00
Denis Kenzior db44cc0e1c Add utility to parse CLIR option 2009-10-28 13:06:34 -05:00
Denis Kenzior ed1d8a6fab Fix: Skip empty emergency numbers 2009-10-27 12:47:42 -05:00
Olivier Le Thanh Duong 6d9bd02480 Migrate from RFC2822 to ISO8601 2009-10-21 19:04:47 -05:00
Denis Kenzior 1a6f392d8f Rename function to express its purpose better 2009-10-08 12:57:26 -05:00
Pekka Pessi 0063db3a74 Allow sending DTMF tones in alerting state
2nd stage dialing may be done before call gets connected.
2009-10-08 12:55:41 -05:00
Pekka Pessi 72d68e5001 Use swap_without_accept method, if present 2009-10-08 12:55:17 -05:00
Denis Kenzior be55ba4ab3 Refactor: Move elementary file type checking
Every single EF read callback checks the file type reported out of the
SIM is what it expects.  Instead this should be done in one place and
the errors reported accordingly
2009-10-02 18:25:56 -05:00
Denis Kenzior 8e449d6184 Some modems don't return from ATD until connected
Yet they send progress indications all the way up to connected, which
breaks the current logic.
2009-09-04 20:37:50 -05:00
Denis Kenzior 88ebea5aca Don't emit disconnect reason if unknown 2009-09-04 20:37:50 -05:00
Denis Kenzior adaa72533a For incoming call case, send hangup
CHLD=1X doesn't work for incoming calls on some devices.  This is
more portable
2009-09-04 20:37:49 -05:00
Denis Kenzior 422df0edfb change int vendor to unsigned int vendor 2009-09-01 21:39:02 -05:00
Denis Kenzior 4064f4ba73 Add vendor flag capability to voicecalls 2009-09-01 18:14:59 -05:00
Denis Kenzior aa9a0f6072 Remove unused function 2009-08-20 15:39:12 -05:00
Denis Kenzior ec3e0f5ce5 Fix implicit declaration of extract_bcd_number 2009-08-20 15:39:12 -05:00
Denis Kenzior 552351e252 Fix unused variable path 2009-08-20 15:39:12 -05:00
Denis Kenzior 191c521f9d Fix unused variable l 2009-08-20 15:39:12 -05:00
Denis Kenzior 3f76bbf782 Emit the DisconnectReason signal 2009-08-19 18:35:08 -05:00
Denis Kenzior d704ba7fc2 Make sure call history handles waiting calls
Missed waiting calls were not being handled properly
2009-08-19 18:35:08 -05:00
Denis Kenzior 04c12038ba Evolve the voicecall driver 2009-08-19 18:35:08 -05:00