Commit Graph

65 Commits

Author SHA1 Message Date
Denis Kenzior 70c70a67b0 util: Use bool instead of gboolean 2018-12-27 18:18:51 -06:00
Jonas Bonn 3beeff758d treewide: Remove superfluous use of _GNU_SOURCE
There are a large number of files in the tree that define _GNU_SOURCE
despite not actually using features hidden behind this flag.  This patch
removes all these definitions in one fell swoop...
2018-10-17 10:01:57 -05:00
Slava Monich ecc3f1bf73 ussd: Cancel pending requests when unregistering
And reset state to idle before unregistering the D-Bus interface.
This may occur e.g. when we receive REFRESH from STK.
2018-05-23 10:23:25 -05:00
Slava Monich 0f171dac45 ussd: Don't ignore data from TERMINATED response
Typically responses to USSD requests are coming with status
zero (NOTIFY) but some are coming with status 2 (TERMINATED).
If those contain data, the data should be presented to the user.
2018-04-23 13:49:36 -05:00
Slava Monich 980bb705d1 ussd: Switch the state from USER_ACTION to IDLE
... when a USSD notification is received. Some networks
send 0 (no further user action required) after the response
timeout expires. That should result in the user input form
getting removed from the ME screen.
2017-08-07 14:50:57 -05:00
John Ernberg 1326026c6d ussd: Use g_slist_free_full 2016-04-22 15:36:11 -05:00
Philippe Nunes 25d51ba03b ussd: Recover idle state after a transaction error
The "USSD terminated by network" notification is handled to recover
the idle state in case of USSD transaction error.
2012-09-11 22:33:43 -05:00
Denis Kenzior 4d49f5cd34 ussd: send NotRecognized error for invalid USSD 2012-06-18 09:23:20 -05: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
Denis Kenzior 688a788da5 ussd: Use __ofono_atom_find 2012-01-18 12:21:36 -06:00
Marcel Holtmann 7e6afe37bf core: Update copyright information 2011-10-10 13:39:42 -07:00
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