Commit Graph

51 Commits

Author SHA1 Message Date
Marcel Holtmann d1ebb6f379 ussd: Use global definition of supplementary services interface 2011-01-23 10:17:05 +01: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
Jeevaka Badrappan 2d0cb92155 src: coding style fixes - rule M6 2010-11-22 05:07:52 -06:00
Pekka Pessi b654e723c7 ussd: pass call_in_progress to valid_ussd_string
Query the voicecall atom whether a call is in progress and pass this
information along to valid_ussd_string.
2010-10-10 05:52:30 -05:00
Pekka Pessi 919e305aa1 common: fixup logic of valid_ussd_string()
The logic of valid_ussd_string was not quite correct as it didn't take
care of size 1 USSD strings.  In addition, call_in_progress parameter is
passed in to take care of size 2 USSD strings which might start with a
'1' according to the rules of 22.030.

The comment about USSD routing is removed, it is out of scope of oFono.
The cellular network routes the USSD requests based on the rules laid
out in the 22.090, however, any string that can be encoded according to
the rules of 23.030 is valid USSD.
2010-10-10 05:48:25 -05:00
Pekka Pessi f1be4b2375 ussd: check g_try_new0 return value 2010-10-06 17:27:20 +02:00
Jeevaka Badrappan 4196182770 Fix multi-line comment style issues 2010-09-21 21:16:01 -05:00
Pekka Pessi 217c161cf5 ussd: debug log notifys 2010-09-16 13:46:25 -05:00
Denis Kenzior 98e2b6b426 ussd: Give proper errors 2010-09-15 11:45:18 -05:00
Denis Kenzior 165fa52cdf ussd: No need for these structure members 2010-09-15 11:37:23 -05:00
Jeevaka Badrappan 77361655c0 ussd: Add __ofono_ussd_initiate internal api 2010-09-15 11:36:03 -05:00
Denis Kenzior 3114a907ff ussd: Fix up minor style issue 2010-09-15 10:03:53 -05:00
Jeevaka Badrappan eb425a281f ussd: Driver API changes
To support 8bit and UCS2 formatted USSDs as well as Send USSD Proactive
Command.
2010-09-14 17:01:49 -05:00
Yang Gu 41d38d76bc ussd: Add __ofono_ussd_is_busy
Send SS requires Call Forwarding / Call Settings / Call Barring to check
whether USSD is currently busy.  If it is, then the SIM should be
notified appropriately.

We introduce a function __ofono_ussd_is_busy to help with this.
2010-09-09 08:57:36 -05:00
Denis Kenzior cc67a29551 ussd: Be extra pedantic trying to Cancel
If we initiated a Respond() transaction, but have not returned from the
callback.  Or if we already called Cancel and it hasn't returned yet.
2010-08-16 11:02:05 -05:00
Denis Kenzior 0699de64eb ussd: Properly handle cancellations 2010-08-16 10:41:35 -05:00
Andrzej Zaborowski b6d4dd78c4 Refactor: Return a string from USSD Respond method
Return network's USSD reponses from the Respond method instead of
signaling over D-Bus.  This should make the UI writer's job a little
easier.
2010-03-31 13:49:31 -05:00
Andrzej Zaborowski 9ee8e9f8f0 Fix: Enter RESPONSE_SENT state in ussd response cb 2010-02-27 11:22:31 -06:00
Denis Kenzior 1c3aaaacc6 Refactor: ussd user response
When the user sends a response, the network can still continue the
dialog, it is not a final response and we cannot transition to an idle
state when the command finishes.  Instead we set it back to a special
state and treat subsequent network responses as unsolicited.
2010-02-16 10:18:04 -06:00
Denis Kenzior 1bebc1b469 Cleanup: Minor API tweaks for USSD 2010-02-16 10:17:52 -06:00
Andrzej Zaborowski 740f8e3f09 Handle network-initiated ussd requests.
This adds the methods on the D-bus interface to allow the
client to handle USSD requests from the network, according to 22.090.
Unfortunately this document is not clear on every point and some
details can't be implemented.  This includes reporting unsupported
request to the network, unsupported language, ME busy etc, because
there isn't an AT command for that.
2010-02-16 10:17:40 -06:00
Denis Kenzior 1ab40c469b Cleanup: Get rid of USSD_FLAG_PENDING 2010-02-15 11:04:08 -06:00
Aki Niemi 02acd8441d Enable USSD_STATE_USER_ACTION
If the network requests user action in the response to an MO USSD, we
cannot immediately return to USSD_STATE_USER_IDLE. Instead,
USSD_STATE_USER_ACTION is entered.

Note that it is left up to the driver to notify() when the USSD
transaction is closed by the network due to inactivity. Another way to
return to USSD_STATE_IDLE is for the user to cancel() the transaction.
2010-02-09 23:19:11 +02:00
Aki Niemi 8730339f40 Move USSD status enum to header 2010-02-09 22:31:32 +02: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
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 15c07346df Parse +CUSD responses. 2009-10-16 17:46:28 -05:00
Denis Kenzior 422df0edfb change int vendor to unsigned int vendor 2009-09-01 21:39:02 -05:00
Denis Kenzior e5577046f0 Add vendor flag capability to ussd 2009-09-01 18:14:58 -05:00
Denis Kenzior a81852b761 Remove unused function 2009-08-20 15:39:12 -05:00
Denis Kenzior 232e34bca9 Fix cut and paste error 2009-08-19 18:35:06 -05:00
Denis Kenzior fe2dc0292c Move ussd-status enum out of common.h 2009-08-17 15:27:04 -05:00
Denis Kenzior 6d5090eafa Cleanup SSC entries if USSD exits first 2009-08-17 15:08:48 -05:00
Denis Kenzior d5339edc44 Refactor supplementary service control strings
The registration was done by using the storage in the modem.  Refactored
to use the new atom watch APIs and storing the control entries in the
ussd atom itself
2009-08-17 15:08:43 -05:00
Denis Kenzior 229bb3a4ed Evolve the USSD API 2009-08-17 13:45:55 -05:00
Denis Kenzior 00482e341e Make ss_passwd_register slightly more efficient 2009-08-13 10:08:32 -05:00
Denis Kenzior 6f8acce8ec Make ss_control_register slightly more efficient 2009-08-13 10:08:32 -05:00
Denis Kenzior 3e6d4237cb Remove all uses of modem.h 2009-07-29 16:53:19 -05:00
Denis Kenzior 19eeb7f1ba Rename modem_add_interface / modem_remove_interface
Move to ofono_modem_add_interface, ofono_modem_remove_interface
and put in ofono/modem.h
2009-07-29 16:44:16 -05:00
Denis Kenzior 54816de04d Get rid of dbus-gsm.h 2009-07-29 12:26:06 -05:00
Denis Kenzior 1d8785f8bd Rename dbus_gsm_pending_reply 2009-07-29 12:26:06 -05:00
Denis Kenzior 00fb6cce62 Rename dbus_gsm error functions to __ofono_error 2009-07-29 12:26:05 -05:00
Denis Kenzior 99c1c92708 Move & Rename dbus_gsm_connection
Move to ofono/dbus.h ofono_dbus_get_connection
2009-07-29 12:26:04 -05:00
Denis Kenzior fe486efadd Fix another logic bug in SS parser
If the passwords do not match, it is still a recognized string,
but we must return invalid format
2009-06-18 16:58:08 -05:00
Denis Kenzior 0c8aed38d7 Fix logic flow in SS parser 2009-06-18 16:58:03 -05:00
Andrzej Zaborowski f93376229a Teach USSD to recognise password change strings.
This is slightly hacky, part of ussd.c responsible for registering services
is duplicated and parse_ss_control_string is modified to accept a fourth
SI fragment in the input string.
2009-06-18 16:57:58 -05:00
Andrzej Zaborowski 9156607bc9 Move struct ussd_data definition out of the header.
No fuctional change.
2009-06-18 16:57:57 -05:00
Denis Kenzior 8d628ef7f4 Implement callback for the cancel function 2009-05-12 19:09:57 -07:00
Denis Kenzior 95e9c0dcf2 Remove some other unused variables 2009-05-12 19:09:57 -07:00