Commit Graph

168 Commits

Author SHA1 Message Date
Denis Kenzior cdb98a70d0 stk: Cancel pending DTMF tones if session is ended
The Send DTMF command is special in its use of DisplayAction method of
STK agent.  This allows the user to send a 'User Terminated Session'
response to the SIM.  If the user performs this action, then any pending
DTMFs should also be canceled as soon as possible.
2011-05-31 23:31:41 -05:00
Philippe Nunes 4c2d897614 stk: simplify respond_on_exit flag handling
respond_on_exit flag is set by commands which are dispatched to the
agent, so that if the agent exits prematurely, a 'User Terminated
Session' response is sent to the SIM.

There were a couple of corner cases not quite handled correctly:

- During Set Up Call, if the user confirmation phase succeeded and the
  call was dispatched to voicecall atom successfully, and the agent
  exited at this point, then no terminal response would be sent until
  the call succeeded / failed.  Now the agent termination results in an
  'User Terminated Session' response being sent immediately, but the
  call setup proceeding.
2011-05-31 18:43:04 -05:00
Denis Kenzior 8900cf81a6 stk: No more need to use get_registered
__ofono_modem_find_atom returns only atoms that are registered now.
2011-04-05 00:18:34 -05:00
Denis Kenzior 73b9e06c40 stk: Check for USSD atom before others
For efficiency (and consistency) we should check for the USSD atom
before checking CallForwarding, CallBarring, and CallSettings atoms.
2011-04-05 00:16:23 -05:00
Andrzej Zaborowski d77f0ff799 stk: Check if terminal is busy before SIM Refresh 2011-04-05 00:12:10 -05:00
Philippe Nunes 5ba49490c8 stk: Handle user termination for Send DTMF 2011-03-30 12:07:49 -05:00
Jeevaka Badrappan 8e6becc57e stk: Fix getenv failure case 2011-03-23 09:54:46 -05:00
Jeevaka Badrappan 7de1717d42 stk: fix issue with Get Inkey variable timeout 2011-03-16 21:36:11 -05:00
Andrzej Zaborowski 4b6d1b1878 stk: Handle Refresh if also performed by modem 2011-03-02 23:29:54 -06:00
Andrzej Zaborowski 2443cdef49 stk: Make sure to reset respond_on_exit
This fixes a crash spotted by Lasse Kunnasluoto documented at
http://lists.ofono.org/pipermail/ofono/2011-February/009211.html
2011-02-28 16:14:50 -06:00
Andrzej Zaborowski f7d4643cc5 stk: Partially handle Refresh command
Only the four "NAA initialisation" modes are handled at the moment.
2011-02-17 15:16:34 -06:00
Aki Niemi 7d389054ac stk: Fix style issues 2011-02-02 11:03:21 +02:00
Jeevaka Badrappan 0be9e23a90 stk: Fix issue in stk_alpha_id_set
Fixes the crash seen with the null alpha identifier.
Also removed the icon check since the decision of whether to inform the
user of the action is dependent entirely on whether the alpha identifier
is provided by the UICC.
2011-01-26 15:24:50 -06:00
Jeevaka Badrappan f49f0ad0cd stk: change timeout from 10 to 3mintues 2011-01-24 16:22:33 -06:00
Jeevaka Badrappan c81c88e311 stk: Handle Launch Browser proactive command 2011-01-20 10:01:24 -06:00
Jeevaka Badrappan 355fa67742 stk: make use of ADD_ERROR_RESULT macro 2011-01-12 16:05:37 -06:00
Jeevaka Badrappan e5bd00fd80 stk: add additional info for terminal busy result
As per the ETSI TS 102 223 specification 8.12.2, it is
mandatory to provide additional information for the
general result "ME currently unable to process command".
2011-01-12 16:04:29 -06:00
Jeevaka Badrappan b9ead5e736 stk: Remove unwanted error check
Possible return values of  __ofono_voicecall_tone_send
are -ENOSYS, -ENOENT, -ENOMEM and -EINVAL.
2011-01-06 10:29:24 -08:00
Denis Kenzior 3c0a32c102 stk: Remove unneeded assignment 2010-12-27 15:09:03 -06:00
Jeevaka Badrappan 1e5d29012b stk: fix issue in set up menu handling 2010-12-27 15:06:08 -06:00
Andrzej Zaborowski c0d584d160 stk: Send the AlphaId's to agent
Terminate session if return signature doesn't match but allow
agent to return from the call if it does match.
2010-12-23 18:30:45 -06:00
Guillaume Lucas 6058c800df stk: fix issue to avoid null pointer for alpha_id
If a SET UP CALL proactive command with no alpha identifier
occurs, the alpha_id pointer will be set to NULL. This will
generate a crash in the stkagent with dbus function. To avoid
this we use an empty string if the alpha identifier is not
present in the command.
2010-12-10 11:18:06 -06:00
Denis Kenzior 772bee27d4 stk: No need to check for null text
For Set up idle mode text
2010-12-10 10:46:56 -06:00
Yang Gu 5713d5e19f stk: Handle provide local info proactive command 2010-12-08 07:58:24 -06:00
Guillaume Lucas 8b0307a621 stk: Add busy error for the display text command
According to the sequence 1.2 of the ETSI TS 102 384 a busy
screen error should be returns for the display text proactive
command when the ME is not able to display the text.
2010-11-30 08:20:42 -06:00
Lucas De Marchi b210838e87 core: explicitly compare pointers to NULL
This patch was generated by the following semantic patch
(http://coccinelle.lip6.fr/)

// <smpl>
@fix disable is_null,isnt_null1@
expression *E;
@@

- !E
+ E == NULL
// </smpl>
2010-11-29 13:27:15 -06:00
Andrzej Zaborowski 3d1a4ec239 stk: use bigger timeout in DisplayText
When the wait for user confirmation bit is set.
2010-11-25 16:46:33 -06:00
Denis Kenzior 5774e9fa53 stk: Minor style fix 2010-11-23 03:08:56 -06:00
Andrzej Zaborowski 55e1ca2e1c stk: Handle null Text field
Add a NULL check in dbus_apply_text_attributes because in some places
(like DisplayText handler) we call it without checking and we just check
the return value once.
2010-11-23 03:08:51 -06:00
Jeevaka Badrappan 2d0cb92155 src: coding style fixes - rule M6 2010-11-22 05:07:52 -06:00
Andrzej Zaborowski 65159c2f0b stk: API for SMS Point-to-Point download to UICC
The callback returns the TP-User-Data element content of the RP-ACK or
RP-ERROR message, returned by the UICC.
2010-11-08 13:36:23 -06:00
Denis Kenzior 3436c58fac sms: Refactor __ofono_sms_txq_submit 2010-11-04 10:25:42 -05:00
Denis Kenzior 5c6144f359 stk: Handle Send SS in handled_notify 2010-10-28 10:37:05 -05:00
Denis Kenzior 51aecde6cc stk: Remove ofono_stk_terminal_response_sent_notify
Not needed for now.  We can always put this back in later if need be.
2010-10-27 12:10:17 -05:00
Andrzej Zaborowski 77c20d8a27 stk: Handle more commands in handled_notify 2010-10-27 12:00:42 -05:00
Denis Kenzior d9ad66ab38 stk: Default to general beep if no tone is provided
According to section 6.6.5 of 102.223
2010-10-25 17:42:41 -05:00
Andrzej Zaborowski b15bcb4a40 stk: Handle the Play Tone proactive command. 2010-10-25 17:23:12 -05:00
Andrzej Zaborowski 47c3b3f52a stk: Add duration_to_msecs to reduce duplication. 2010-10-25 17:21:23 -05:00
Denis Kenzior e4a0ba26a0 stk: Nitpick some newline issues 2010-10-22 22:39:56 -05:00
Andrzej Zaborowski 6cabaec726 stk: Apply STK text attributes as html 2010-10-22 22:33:54 -05:00
Denis Kenzior d4801a306c stk: use null character instead of 0
Slightly better readability
2010-10-22 22:28:04 -05:00
Denis Kenzior 1cc2c6b1ce stk: Remove reference to positive EINVAL
Move it to the original call where it belongs
2010-10-22 22:25:20 -05:00
Andrzej Zaborowski 75ce3c7c23 stk: Handle the Send DTMF proactive command
The default_agent_notify and session_agent_notify changes below are
needed for respond_on_exit commands to be able to free up their
resources, reset alpha id, etc.  Commands other than Send DTMF that
use respond_on_exit are all associated with a agent method call and
get notified about agent exit in the callback.
2010-10-22 22:00:04 -05:00
Denis Kenzior 6f54b55b0e stk: Add a debug to print the handled command type 2010-10-14 04:17:06 -05:00
Andrzej Zaborowski 404e0838da API for STK driver to signal executed commands
Some modems are able to handle some proactive commands in their
firmware or otherwise, if the command doesn't require input from user.
Nevertheles ofono may need to update internal state or notify the user
where necessary.  With this api the driver can notify core that a
command is being executed in the modem or that a command is finished
executing and the TERMINAL RESPONSE has been sent to SIM.  It would
also be possible for a driver to handle a command.
2010-10-14 04:17:02 -05:00
Andrzej Zaborowski d9f8b13e18 stk: Simplify and add icon to alphaId api
The assumption is now that stk_alpha_id_set will handle NULL
or empty alphaIds or icons.
2010-10-14 03:18:28 -05:00
Denis Kenzior 2059fd289a stk: Make the stk properties not optional 2010-10-14 02:59:20 -05:00
Andrzej Zaborowski 6cb64e1343 stk: IdleModeIcon and MainMenuIcon properties 2010-10-14 02:31:22 -05:00
Andrzej Zaborowski 9da71c67ed stk: Rename sms_submit_req to extern_req 2010-10-14 02:30:32 -05:00
Denis Kenzior 52fade93ac stk: Reflow stk_menu_create slightly 2010-10-14 01:38:52 -05:00
Andrzej Zaborowski 5b1f4d1216 stk: Add icon ID information in stk_menu 2010-10-14 01:13:56 -05:00
Andrzej Zaborowski 198dcc2c28 stk: Pass icon IDs in stk agent request parameters 2010-10-14 00:58:43 -05:00
Jeevaka Badrappan dac67fe363 stk: Additional info for failed Send USSD case 2010-10-02 17:20:08 -05:00
Marcel Holtmann df0a431a41 stk: Fix missing inlude for encode_hex_own_buf 2010-09-24 09:37:14 +09:00
Denis Kenzior a69ae76207 stk: Add skeleton Refresh handler 2010-09-23 13:17:40 -05:00
Jeevaka Badrappan 64b0af24bd stk: Language Notification proactive cmd support 2010-09-21 08:44:48 -05:00
Denis Kenzior 016f168f47 sms: Refactor __ofono_sms_txq_submit 2010-09-21 08:44:47 -05:00
Denis Kenzior 41a55beef3 stk: Refactor Send USSD error handling 2010-09-15 12:03:02 -05:00
Denis Kenzior d966b6593b stk: Fix style issues 2010-09-15 11:58:29 -05:00
Jeevaka Badrappan 47ddc4b70d stk: Handling of Send USSD proactive command 2010-09-15 11:46:23 -05:00
Andrzej Zaborowski 52161db428 stk: Fix User Cancel response to Set Up Call
One of the clean-up commits changed the semantics of the dial request
callback's parameter (NULL if call setup failed, non-NULL if success
or user cancelled).
2010-09-09 21:45:22 -05:00
Denis Kenzior 605d720bd4 voicecall: Refactor ofono_voicecall_busy 2010-08-27 19:06:36 -05:00
Denis Kenzior ce79af6e5c stk: setup call did not handle agent disappearance 2010-08-27 19:01:44 -05:00
Denis Kenzior 07d576bdca stk: Free select item menu
If calling the agent failed for some reason
2010-08-27 19:01:44 -05:00
Denis Kenzior f528e5d566 stk: Reset cancel_cmd to NULL 2010-08-27 19:01:43 -05:00
Denis Kenzior 159903cc53 stk: set cancel_cmd only if agent was called 2010-08-27 19:01:43 -05:00
Andrzej Zaborowski 9e830e3cc8 stk: Handle the Set Up Call proactive command 2010-08-27 12:57:01 -05:00
Andrzej Zaborowski b6488dec41 stk: reorder: Don't access freed memory in Send SMS
Responding to the stk->pending_cmd frees it, we need to read it
before that.
2010-08-20 09:02:29 -05:00
Marcel Holtmann 5ffd12ff9f stk: Fix error messsage from select item method call 2010-08-20 14:48:48 +02:00
Andrzej Zaborowski c8c8116db4 stk: Update agent_called with GetInkey & GetInput 2010-08-18 00:27:38 -05:00
Marcel Holtmann 5dc131c8ea Add a few debug statements to STK core 2010-08-11 14:18:13 -04:00
Denis Kenzior 9b284c7c35 stk: Rip out the HELP stuff for now
We're not supporting it in the current API and doing so is actually
very painful.
2010-08-04 14:47:38 -05:00
Andrzej Zaborowski c09dfb8473 stk: Handle the Get Input proactive command 2010-08-04 14:29:24 -05:00
Andrzej Zaborowski ed169aa02f stk: Handle the Get Inkey proactive command 2010-08-04 14:13:16 -05:00
Denis Kenzior 8697cbbba8 stk: Remove unneeded check
The agent_remove_source will be canceled as part of the session agent
destruction notify.
2010-07-30 18:50:38 -05:00
Denis Kenzior 41017a11f5 stk: Fix typo in comment 2010-07-30 18:34:49 -05:00
Denis Kenzior e2d6d56374 stk: Handle the case where no agent is registered 2010-07-30 18:17:57 -05:00
Denis Kenzior c2cf374857 stk: Get rid of cancel result
And also rework how immediate response display text gets handled.
2010-07-30 17:19:56 -05:00
Denis Kenzior cf249c9fd7 stk: Introduce destroy semantics to stkagent 2010-07-30 17:19:56 -05:00
Denis Kenzior 27e890cc40 stk: Handle errors when sending to the agent fails 2010-07-30 17:19:56 -05:00
Denis Kenzior 2a1eee38bb stk: Get rid of nested switch 2010-07-30 17:19:56 -05:00
Denis Kenzior e5ea6e2193 stk: Handle the new termination semantics
The termination semantics were changed in stkagent.  Now if an agent
sends an invalid response or an unexpected error, then the agent is
terminated, even if it is the default agent.
2010-07-30 17:19:56 -05:00
Denis Kenzior e44d130b8c stk: Simplify sending of terminal responses
Introduce a new send_simple_response function
2010-07-30 17:19:56 -05:00
Denis Kenzior 3434540d8b stkagent: Make DisplayText invocation match API
For now we match the proposed API until we decide that changes are
needed.
2010-07-30 17:19:56 -05:00
Denis Kenzior 0292fe12c0 stkagent: Get rid of nasty g_timeout tricks 2010-07-30 17:19:55 -05:00
Denis Kenzior 7ad5b35a35 stkagent: Refactor stkagent api 2010-07-30 17:19:55 -05:00
Denis Kenzior dc5a2609b3 stkagent: Rename stk_agent_remove
to stk_agent_free
2010-07-30 17:19:55 -05:00
Andrzej Zaborowski b051f28dbe stk: Handle the Display Text proactive command. 2010-07-30 17:19:55 -05:00
Andrzej Zaborowski 3714eb8acd stk: Handle the Select Item proactive command. 2010-07-30 17:19:55 -05:00
Andrzej Zaborowski 47b95122cc stk: Handle the main menu. 2010-07-30 17:19:55 -05:00
Andrzej Zaborowski 5faa3951c2 stk: Utilities to deal with menus. 2010-07-30 17:19:55 -05:00
Andrzej Zaborowski 9654c69d7d stk: Add STK agent registration api. 2010-07-30 17:19:54 -05:00
Andrzej Zaborowski 7c6758af20 stk: Remove an unneeded check. 2010-07-15 15:41:54 -05:00
Denis Kenzior 465a4f5ef5 stk: Simplify poll interval logic 2010-07-08 14:27:35 -05:00
Denis Kenzior 7d98e604c7 stk: Be more paranoid of enums from stk 2010-07-08 14:27:35 -05:00
Andrzej Zaborowski 45d535b802 stk: Handle the Poll Interval proactive command 2010-07-08 14:27:35 -05:00
Denis Kenzior 00cb839c83 style: Use more understandable syntax 2010-07-08 14:27:34 -05:00
Denis Kenzior ea1f6e11f6 stk: Get rid of gratuitous goto abuse 2010-07-08 14:27:34 -05:00
Denis Kenzior 5094b677ca style: Prefer initialized variables on top 2010-07-08 14:27:34 -05:00
Denis Kenzior 84e73a8b7c sms: Refactor ofono_sms_submit introduced by stk
Simplify the logic and get rid of duplicated code
2010-07-08 14:27:34 -05:00