11
0
Fork 0
mirror of git://git.sysmocom.de/ofono synced 2024-08-21 17:22:11 +00:00
Commit graph

1384 commits

Author SHA1 Message Date
Denis Kenzior
e246b414c9 Fix: Use g_try_malloc when parsing stk address 2010-03-16 17:42:08 -05:00
Denis Kenzior
213e1ed65a Fix: Use g_try_malloc instead of g_malloc in util
In these cases we were checking for NULL return, but the function used
should have been g_try_malloc instead.
2010-03-16 17:21:06 -05:00
Denis Kenzior
68b01ce93e Refactor: create_dirs logic
- Remove reference to g_malloc and replace with g_try_malloc
- Be extra pedantic on the inputs
- Refactor the logic to make it slightly easier to follow
2010-03-16 17:19:01 -05:00
Denis Kenzior
62007cd074 Fix: Fixup error paths in sim_op_check_cached 2010-03-16 15:45:04 -05:00
Denis Kenzior
b025179101 Fix: avoid assigning to return structure on error 2010-03-16 15:30:07 -05:00
Denis Kenzior
66557e0d2b Style: Spaces before / after arithmetic operations 2010-03-16 15:30:07 -05:00
Denis Kenzior
d18d66b712 Style: Align the enum values to be easier to read 2010-03-16 15:30:07 -05:00
Yang Gu
26f28df18a Handle the conversion failure when parsing item 2010-03-16 15:30:06 -05:00
Yang Gu
69846439e6 Fix the structure of stk_subaddress 2010-03-16 15:30:06 -05:00
Denis Kenzior
79630b2bd4 Add stk tone type enum 2010-03-15 21:11:11 -05:00
Denis Kenzior
e64596f1dc Add parser for STK send sms proactive commands 2010-03-15 21:02:06 -05:00
Denis Kenzior
a16f270eb1 Refactor: stk send_sms datastructure 2010-03-15 21:02:06 -05:00
Denis Kenzior
6986cc4760 Refactor: stk result dataobject 2010-03-15 21:02:06 -05:00
Denis Kenzior
a74bd04edf Reorder: stk response length structure
Follow the order of the specification
2010-03-15 21:02:06 -05:00
Denis Kenzior
12e411e6fc Refactor: stk item id dataobj 2010-03-15 21:02:06 -05:00
Denis Kenzior
6404e7c4bd Refactor: stk item dataobject 2010-03-15 21:02:06 -05:00
Denis Kenzior
44476dac9e Refactor: stk configuration capability parameters 2010-03-15 21:02:06 -05:00
Denis Kenzior
e5dff20ff5 Refactor: Update the subaddress structure 2010-03-15 21:02:06 -05:00
Denis Kenzior
bbf67bd4a0 Refactor: stk alpha identifier object
Style issues, we must also return FALSE in case conversion fails
2010-03-15 21:02:02 -05:00
Denis Kenzior
1dfb59b610 Refactor: stk address structure 2010-03-10 13:17:22 -06:00
Yang Gu
ea1dc4811f Add parser for tone objects 2010-03-10 13:14:12 -06:00
Yang Gu
3a826529e9 Add parser for sms tpdu objects 2010-03-10 13:14:12 -06:00
Yang Gu
81e01f82cc Add parser for result objects 2010-03-10 13:14:12 -06:00
Yang Gu
a2beff9011 Add parser for item identifier objects 2010-03-10 13:14:12 -06:00
Yang Gu
08faed2287 Add parser for item objects 2010-03-10 13:14:12 -06:00
Yang Gu
cb33d07764 Add parser for capability configuration parameters objects 2010-03-10 13:14:12 -06:00
Yang Gu
7b663e9474 Add parser for subaddress objects 2010-03-10 13:14:12 -06:00
Yang Gu
94848b6feb Add parser for alpha identifier objects 2010-03-10 13:14:11 -06:00
Yang Gu
ec31f1eabb Add parser for address objects 2010-03-10 13:14:11 -06:00
Denis Kenzior
4c5aaabca4 Fix: warning
src/stkutil.c: In function ‘parse_dataobj_imm_resp’:
src/stkutil.c:191: error: unused variable ‘data’
2010-03-02 12:39:15 -06:00
Denis Kenzior
b06cce24d8 stk: Validate src/dst combination 2010-03-01 18:16:23 -06:00
Denis Kenzior
2ea8877b48 Add support for Get Input proactive command 2010-03-01 18:00:57 -06:00
Denis Kenzior
700a0ece69 Support Default Text data objects 2010-03-01 18:00:57 -06:00
Denis Kenzior
2c1cdebd1a Add parser for Response Length objects 2010-03-01 18:00:54 -06:00
Denis Kenzior
704d6175b7 Cleanup: Move some stuff around to be more logical 2010-03-01 17:56:16 -06:00
Denis Kenzior
54ac375066 Add support for GET INKEY proactive command 2010-03-01 17:42:02 -06:00
Denis Kenzior
f4f6284f26 Add parser for Frame Identifier object 2010-03-01 17:21:47 -06:00
Denis Kenzior
c8c318d8b9 Add parser for text attribute objects 2010-03-01 16:18:17 -06:00
Denis Kenzior
e0501c4930 Add parser for Duration objects 2010-03-01 16:02:33 -06:00
Denis Kenzior
36c9201246 Style: add relevant sections for dataobj parsers 2010-03-01 15:26:33 -06:00
Denis Kenzior
95d44f76b5 Add parser for STK Immediate Response objects 2010-03-01 15:26:31 -06:00
Denis Kenzior
e8fab61c16 Add parsing for Icon Identifier objects 2010-03-01 15:15:37 -06:00
Andrzej Zaborowski
3a9cd4fc03 Use stk_envelope_type constant name in sim.c 2010-02-27 11:40:16 -06:00
Andrzej Zaborowski
9ee8e9f8f0 Fix: Enter RESPONSE_SENT state in ussd response cb 2010-02-27 11:22:31 -06:00
Denis Kenzior
172c68edf5 stk: Refactor proactive command parser
Make it a bit easier to extend by using va_args
2010-02-27 10:20:23 -06:00
Denis Kenzior
6497d29719 stk: Add text attribute structure 2010-02-27 10:19:51 -06:00
Denis Kenzior
5144254f62 stk: Add Duration structure 2010-02-27 10:19:19 -06:00
Denis Kenzior
4603965fc3 stk: Add icon identifier structure 2010-02-27 10:17:22 -06:00
Denis Kenzior
0418a682b8 Add duration type enum 2010-02-27 10:09:30 -06:00
Denis Kenzior
d90aa1561f Add basic support for USAT/CAT proactive commands
Only display_text with mandatory fields is currently supported.
2010-02-23 17:10:26 -06:00
Denis Kenzior
19a20e4ccd Add COMPREHENSION TLV iterator utilities 2010-02-23 12:03:04 -06:00
Denis Kenzior
d98be70fa9 Add Simple TLV iterator utilities 2010-02-23 12:03:03 -06:00
Denis Kenzior
0db0108120 Fix: EFspdi parsing
EFspdi is a nested BER-TLV structure.  The outside BER-TLV has the tag
A3, and the inside contains the PLMN list TLV with tag 0x80.
2010-02-23 12:03:03 -06:00
Denis Kenzior
5a86a7408a Rewrite ber_tlv_find_tag to use ber_tlv iterator 2010-02-23 12:03:03 -06:00
Denis Kenzior
077cfe284e Move from header to implementation 2010-02-23 12:03:03 -06:00
Denis Kenzior
0d163e6295 Add BER-TLV iterator utilities 2010-02-23 12:03:00 -06:00
Denis Kenzior
6e03aa7c0b Add STK device identity enum 2010-02-18 16:21:48 -06:00
Denis Kenzior
3bc0024817 Add enumeration for STK Comprehension TLV objects 2010-02-18 10:58:22 -06:00
Denis Kenzior
1da0ea3b1d Add Sim Toolkit Envelope type enum 2010-02-17 18:23:56 -06:00
Denis Kenzior
32a9931056 Add Sim Toolkit Proactive Command enum 2010-02-17 18:23:53 -06:00
Denis Kenzior
9aeed6dbcc Add stubs files for Sim Toolkit Utilities 2010-02-17 15:10:33 -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
Andrzej Zaborowski
0bac79f1a2 Fix: Use g_dbus_emit_signal in call-barring,meter 2010-02-15 14:57:25 -06:00
Denis Kenzior
1ab40c469b Cleanup: Get rid of USSD_FLAG_PENDING 2010-02-15 11:04:08 -06:00
Denis Kenzior
af4d4aeaeb Fix: Trivial mistake 2010-02-12 18:48:32 -06:00
Denis Kenzior
d87f285fdf Add support for modem names 2010-02-12 18:29:41 -06:00
Inaky Perez-Gonzalez
ec7b597bd9 Fix: plugin version mismatch warning
When complaining about plugin version mismatch, print the
version information
2010-02-10 23:52:13 -06:00
Inaky Perez-Gonzalez
8b54792cdd Clean: no error path needed
Remove unneeded error path and document the rationale behind it in
__ofono_modem_get_list() and manager_get_properties().
2010-02-10 18:06:46 -06:00
Denis Kenzior
4b81513d95 Style: if statement 2010-02-10 16:41:31 -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
ea771ec186 Fix: Tweak gprs attach logic
We use driver_attached to track whether the driver is attached /
attaching.  Unfortunately we only set it when set_attached succeeds.
Instead we should set it right away when calling set_attached, so we
cover pending attaches as well.
2010-02-08 15:33:17 -06:00
Denis Kenzior
d11505f751 Fix: Add recheck flag to gprs
When a powered is toggled quickly, we ignore the second request.  This
flag tells us that we should recheck what the attach status should be
once the current operation finishes
2010-02-08 15:32:04 -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
Denis Kenzior
dc16aa7937 Fix: Use snprintf instead of sprintf in the core 2010-02-05 10:33:58 -06:00
Aki Niemi
8d4004d182 Add radio settings atom and driver API
This interface exposes a read-write property for radio access technology
selection mode.
2010-02-04 23:43:18 +02:00
Denis Kenzior
ad5b2fd26f Fix: Unnecessary initializations 2010-02-04 00:24:14 -06:00
Denis Kenzior
08b26238c1 Fix: missing break statement 2010-02-04 00:05:57 -06:00
Denis Kenzior
e5bcf50a0c Fix: Wrong variables use
Copy/paste error from above resulted in incorrect variables being used
for comparison.
2010-02-03 23:58:27 -06:00
Denis Kenzior
fa433a6acc Fix: Check for \r in UCS2 alphabets 2010-02-03 23:28:41 -06:00
Marcel Holtmann
7d7a61f933 Fix some leftover oudated copyrights 2010-01-28 22:10:51 +01:00
Marcel Holtmann
a82a62bd31 Remove empty block for SIGPIPE handling 2010-01-26 10:07:56 +01:00
Marcel Holtmann
e4850f2eeb Add support for dynamic debug feature 2010-01-26 10:06:53 +01:00
Denis Kenzior
675ef623c7 Fix: Process CBS settings even if no EFcbmid
If EFcbmid is not present, corrupt or empty the code that bootstraps the
CBS settings is never called.
2010-01-20 21:35:33 -06:00
Denis Kenzior
03fd69ace9 Fix: Print errors for unlikely CBS failures
These indicate driver / hardware issues rather than anything else.
2010-01-20 21:34:19 -06:00
Denis Kenzior
ea6ab1ea2b Fix: NULL check both set_topics and clear_topics 2010-01-20 21:08:52 -06:00
Denis Kenzior
11de395af9 Fix: Make the powered setting actually work 2010-01-20 21:03:17 -06:00
Denis Kenzior
e829727224 Fix: Default to powered=true for CBS 2010-01-20 10:26:02 -06:00
Marcel Holtmann
e433ddc100 Add command line option for printing version number 2010-01-16 19:29:43 -08:00
Denis Kenzior
d9bb71e521 Fix: Don't try to unregister a null mcc/mnc
Network operators with null MCC & MNC are not registered, but we try to
unregister them.  Don't do this as it causes a crash.
2010-01-13 11:40:15 -06:00
Denis Kenzior
506eb11b02 Make setting CPHS MWIS actually work 2010-01-12 18:20:51 -06:00
Andrzej Zaborowski
6c1a997902 Persist CBS Topics list, handle EF-CBMI, EF-CBMIR.
The two SIM files are only used to bootstrap the topics list value
if there's no previous value.
2010-01-12 18:03:34 -06:00
Denis Kenzior
9bed04ca2f Style: Trailing whitespace & extra lines 2010-01-12 17:54:37 -06:00
Denis Kenzior
bb0dfd9b6d Fix: Make the CPHS MWIS version actually work 2010-01-12 17:54:18 -06:00
Denis Kenzior
0fb3873e6d Refactor: Move copy-pasted code into a function 2010-01-12 17:53:56 -06:00
Denis Kenzior
5206f9a9dc Fix: Refactor error conditions 2010-01-12 15:57:23 -06:00
Denis Kenzior
deb9d88669 Reorder CPHS initializatin order
Two issues
  - CPHS MWIS file must always be read, the specification isn't clear
    whether it depends on the Mailbox service to be available
  - CPHS MBDN file must be read after we read EFmbdn, otherwise it will
    not be processed properly
2010-01-12 15:55:19 -06:00
Denis Kenzior
0d7f8933ff Fix: Create a dedicated callback for syncs
When synchronizing CPHS MBDN, create a separate callback that doesn't
try to emit signals, etc since the main work has already been done when
EFmbdn was set successfully.
2010-01-12 15:53:19 -06:00
Denis Kenzior
476bd84b98 Remove #if 0 2010-01-12 15:51:28 -06:00
Denis Kenzior
e9b40dbe7a Fix: Don't recurse infinitely
We try to keep the CPHS MBDN elementary file in sync with EFmbdn,
unfortunately we share the same callback, which leads to infinite
recursive writes.

Also cleanup the set_mbdn_request structure if the write fails.
2010-01-12 15:45:30 -06:00
Denis Kenzior
0382f64353 Refactor: Rename & Restructure cphs_support
- Rename to cphs_service_table to be more inline with the specification.
- Since the spec allows arbitrary length service tables, use an unsigned
  char * return instead of a short.
- Use bit_field function instead of defining an enum
2010-01-12 11:27:31 -06:00
Denis Kenzior
2b231c3f84 Rename: Rename CPHS Phase enums
Be more consistent with the 3GPP Phase names
2010-01-12 11:23:21 -06:00
Andrzej Zaborowski
96a93b5829 If EF-MWIS is not available use the CPHS version. 2010-01-12 11:12:41 -06:00
Andrzej Zaborowski
f97d203392 Use CPHS version of mailbox numbers on SIM if 3GPP version not available.
Otherwise just try to keep the CPHS version of the files in sync.
2010-01-12 11:12:01 -06:00
Andrzej Zaborowski
637ca18af4 Retrieve CPHS phase (if any) from SIM. 2010-01-12 10:35:51 -06:00
Aki Niemi
8f99e50ce5 Remove trailing/leading whitespace 2010-01-11 11:08:42 +02:00
Denis Kenzior
20db731484 Make primary context ids persistent 2010-01-07 14:43:21 -06:00
Denis Kenzior
230bddf30e Fix: Be paranoid and check that last is in range 2010-01-07 14:42:46 -06:00
Denis Kenzior
bdfa90bd14 Add idmap_take utility 2010-01-07 14:42:29 -06:00
Denis Kenzior
bf209425e5 Use idmap to allocate primary context ids 2010-01-07 14:07:52 -06:00
Denis Kenzior
4e621f3ad3 Change the semantics to return id > max on failure 2010-01-07 14:06:45 -06:00
Denis Kenzior
0ed5c70010 Fix: Fail if no driver or id range set 2010-01-07 13:25:32 -06:00
Denis Kenzior
cdfe6dd342 Use the new from_range idmap constructor 2010-01-07 13:25:10 -06:00
Denis Kenzior
af007cde66 Add idmap_from_range constructor 2010-01-07 13:20:48 -06:00
Denis Kenzior
6051d0bdde Refactor: Use idmap to allocate CIDs 2010-01-07 13:01:12 -06:00
Denis Kenzior
35cbb135f6 Add initial implementation of idmap utilities 2010-01-07 12:59:51 -06:00
Denis Kenzior
1b5c314f9a Refactor: Allow persisent modem names 2010-01-06 15:50:25 -06:00
Denis Kenzior
45f2f9315f Set phase to unknown until we probe it 2010-01-06 14:17:27 -06:00
Denis Kenzior
beb3e032e4 Refactor: Preserve Phase obtained from the SIM 2010-01-06 13:19:47 -06:00
Andrzej Zaborowski
b4c3e1c1cc Index SIM cache by phase also. 2010-01-06 13:14:20 -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
Denis Kenzior
7ffd9cb8e8 Style: Flip the if statement
The if case should have the multiple expressions
2009-12-17 21:45:39 -06:00
Denis Kenzior
3b9b6201c1 Style: Add empty lines where needed 2009-12-17 21:45:39 -06:00
Andrzej Zaborowski
8365fc1206 Add Powered property to CbsManager. 2009-12-17 21:45:39 -06:00
Denis Kenzior
0bd6739766 Style: Fixup style issues 2009-12-17 21:45:39 -06:00
Andrzej Zaborowski
da6f3e63e0 Handle EF-CBSMID contents. 2009-12-17 21:45:39 -06:00
Andrzej Zaborowski
a964411180 Add utility for checking if CBS topic is in range 2009-12-17 21:45:38 -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
7a5de89f32 Fix: Concatenation of datagram SMS messages
The 16 bit port address was not being computed correctly.
2009-12-14 10:14:29 -06:00
Denis Kenzior
70e1d47baa Add context-id allocation / deallocation code
This also disables attempts to use multiple active contexts.  The code
isn't setup to do this yet.
2009-12-09 21:02:47 -06:00
Denis Kenzior
8495e047e6 Refactor: use unsigned ints for cids 2009-12-09 21:02:47 -06:00
Denis Kenzior
58c8a33adf Fix: Reset active contexts if gprs is detached
When we lose network registration or are forcefully detached from the
network we must reset all active contexts to inactive.
2009-12-08 17:19:40 -06:00
Denis Kenzior
2ac70c7f27 Reset context settings when context is deactivated 2009-12-08 17:19:23 -06:00
Denis Kenzior
a1ea26cd9d Style: Remove extra blank line 2009-12-08 17:11:35 -06:00
Denis Kenzior
bea0fd608e Fix: Be more paranoid even during shutdown 2009-12-08 04:25:43 -06:00
Denis Kenzior
430e8755dc Fix: Print a warning in set_powered
If ofono_modem_set_powered is used with no driver set, print a warning
2009-12-08 04:24:38 -06:00
Zhenhua Zhang
06d17397c5 Fix remove all atoms in ofono_modem_set_powered
We should remove all atoms when we disable the modem. In function
set_powered, we remove all atoms if modem is powered down by dbus
call.
2009-12-08 04:05:10 -06:00
Denis Kenzior
070ea1d339 Remove: Unused code related to modem powered prefs 2009-12-08 04:03:30 -06:00
Denis Kenzior
b15eccf0f4 Revert: Previous powered patch 2009-12-08 03:44:55 -06:00
Alexander Kanavin
81d7cd4e12 Fix a crash during isimodem initialization 2009-12-08 17:09:15 +02:00
Denis Kenzior
5745292cca Don't generate multiple g_sources, 1 is enough 2009-12-04 20:51:19 -06:00
Denis Kenzior
adfb6c9d60 Use signalfd for signal handling 2009-12-04 20:44:04 -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
c7ac706de1 Refactor: call id allocation / release 2009-12-04 16:52:30 -06:00
Denis Kenzior
bcef5a1dd6 Fix: Exit right away
If no plugin needs to run the eventloop to shutdown cleanly, exit right
away.
2009-12-03 00:42:59 -06:00
Denis Kenzior
0500fadc63 Fix: Be a bit more signal-handler safe 2009-12-02 20:10:18 -06:00
Denis Kenzior
39568bbef7 Fix: Paste error 2009-12-02 19:24:37 -06:00
Denis Kenzior
b0f0e248e9 When SIGTERM is received, run the event loop
This feature will continue running the event loop for another 10 seconds
or so or until all the modems have been shut down.  This will allow the
modem drivers to properly shutdown their respective devices.
2009-12-02 19:11:36 -06:00
Denis Kenzior
9c63c7dc20 Refactor: Set powered to false if disable timedout 2009-12-02 19:11:32 -06:00
Denis Kenzior
b787745b00 Fix: unregister modem when unregistering driver 2009-12-02 19:10:07 -06:00
Denis Kenzior
6266e3f679 Refactor: modem de-registration 2009-12-02 19:10:07 -06:00
Denis Kenzior
dac0ccc8a8 Fix: Remove all atoms when attempting to power off
The current behavior is to remove atoms when the modem has powered off
successfully.  The modem driver must now take special precautions to
cancel all pending actions of the atom drivers, since they would have
been destroyed.
2009-12-02 19:10:07 -06:00
Denis Kenzior
83a03d5fbf Fix: Store refs as 16 bits, not 8
Refs are handled as 16 bits properly everywhere, yet are stored as 8
bits in the assembly.
2009-12-02 09:55:57 -06:00
Denis Kenzior
da496112b7 Fix: Don't forget to cleanup the atom watch 2009-12-01 22:53:45 -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
55572b6e69 Style: Use unsigned int instead of unsigned 2009-12-01 12:42:23 -06:00
Zhenhua Zhang
7254f8ac86 Fix: Reset call_ids when modem is powered off 2009-11-26 08:08:17 -06:00
Zhenhua Zhang
c77f1d0cc9 Fix: Add check for register_auto method
Add check for register_auto method to avoid crash. HFP backend
does not provide implementation for register_auto.
2009-11-24 20:36:56 -06:00
Zhigang Li
3aec8d4ac7 Fix: Send all SMS segments 2009-11-24 14:49:48 -06:00
Marcel Holtmann
231aca4a69 Get rid of the pointless checks before g_free in GPRS engine 2009-11-24 00:27:22 +01:00
Marcel Holtmann
5253d82057 Add support bringing GPRS interfaces up and down as needed 2009-11-24 00:26:09 +01:00
Martin Xu
040d660d41 Emit settings signal before active signal 2009-11-23 09:07:57 +01:00
Denis Kenzior
9777d244ec Report AttachInProgress Error
If one tries to activate a context and we're currently attaching or
detaching from GPRS, report the AttachInProgress error
2009-11-18 13:24:20 -06:00
Denis Kenzior
e1e44e772a Refactor: Send NotAttached error
If one tries to activate the context and we're currently not attached to
GPRS, report a NotAttached error instead of a failure
2009-11-18 13:23:13 -06:00
Denis Kenzior
06632f8192 Add ProposeScan method
This is the replacement for automatic operator scanning
2009-11-18 12:49:26 -06:00
Denis Kenzior
ac144e40a2 Fix: Use a different function for initial register
Just in case pending variable gets set to something
2009-11-18 12:28:45 -06:00
Denis Kenzior
d87e0e86f7 Refactor: Reshuffle bit flags 2009-11-18 12:21:45 -06:00
Denis Kenzior
bbfb17366c Refactor: Remove period operator scan 2009-11-18 12:21:30 -06:00
Denis Kenzior
cd9b7c07b6 Refactor: Get rid of PENDING flag in netreg 2009-11-18 12:20:39 -06:00
Denis Kenzior
41050ef7b1 Implement CGREG query
Some modems do not properly send CGREG notifications when the context is
attached / detached.  We manually query the registration state of GPRS
to make sure that if the modem is indeed attached, the state is
reflected properly
2009-11-18 10:34:23 -06:00
Denis Kenzior
d111fc3cee Refactor: Move functions up to avoid declaration 2009-11-18 10:34:00 -06:00
Denis Kenzior
ec7f95de7e Fix: Again, uncross the wires 2009-11-18 10:33:09 -06:00
Denis Kenzior
acb4e127c6 Fix: Uncross the wires 2009-11-18 10:00:04 -06:00
Denis Kenzior
9b4e898702 Support Settings property of PrimaryContext 2009-11-17 18:55:32 -06:00
Martin Xu
26413141be Add ofono_gprs_context_get_modem 2009-11-17 15:56:31 -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
0b4b41c6a9 Style: add new line 2009-11-13 00:05:42 -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
7600c4b3ac Fix: Emit Manufacturer, not Serial 2009-11-11 22:09:36 -06:00
Zhenhua Zhang
0825070655 Fix: Invoke microphone_volume, not speaker 2009-11-11 15:51:23 -06:00
Denis Kenzior
a4189db20f Add basic state saving for SMS atom
Message ID and Reference number for concatenated messages should be
persisted.
2009-11-05 17:06:21 -06:00
Denis Kenzior
f14e7c30bc Add hooks to call into sms history for SMS atom 2009-11-05 16:47:12 -06:00
Denis Kenzior
9afdf1a35b Add SMS history capability 2009-11-05 16:46:43 -06:00
Denis Kenzior
61260c298f Refactor: Make SendMessage async
This commit does two things.  First it makes SendMessage an async
method, which returns only when the SMS message has been successfully
sent or failed.

This also adds a set number of tries that oFono will resubmit the PDU to
the SMSC.  If any fragment fails to be submitted, the entire send
message attempt is deemed a failure and an error is returned to the caller.
2009-11-05 16:44:22 -06:00
Denis Kenzior
1fb5d7191e Rename sms assembly path to sms_assembly from sms
Not to interfere with sms settings storage
2009-11-05 16:42:15 -06:00
Denis Kenzior
1cabf97fe8 Use localtime_r instead of localtime 2009-11-05 16:00:34 -06:00
Denis Kenzior
3c4dfdcb7f Refactor: Move SMS SendMessage to 1 recipient only 2009-11-05 10:27:25 -06:00
Denis Kenzior
e75fef59f2 Fix: Load GPRS settings before finding netreg
GPRS Settings should be loaded before we try to find netreg atom and
potentially try to make the attach/detach decisions.
2009-11-05 10:25:59 -06:00
Denis Kenzior
24a7d9a673 Fix: Handle the case where only PLMN name is given
HFP does not allow the use of register / unregister or scan for operator
functionality.  It only allows the name of the operator to be given, not
even an MCC/MNC.  Handle this situation inside netreg atom.
2009-11-04 11:43:57 -06:00
Denis Kenzior
ac5f67c46d Add ability to restore GPRS contexts from settings 2009-11-02 16:02:09 -06:00
Denis Kenzior
8d7f5245b4 Save GPRS context settings 2009-11-02 16:02:09 -06:00
Denis Kenzior
1ff069be5a Add Basic save/restore code for GPRS setting 2009-11-02 16:02:09 -06:00
Denis Kenzior
3c702b4d99 Limit the number of contexts that we manage 2009-11-02 16:02:09 -06:00
Denis Kenzior
708f7481b0 Update CreateContext API 2009-11-02 16:02:09 -06:00
Denis Kenzior
1f73c18257 Add utility to convert strings to context type 2009-11-02 16:02:09 -06:00
Denis Kenzior
bf8e486f02 Fix: Default to type internet 2009-11-02 16:02:09 -06:00
Denis Kenzior
cbe52b9a44 Fix: Quiet compiler warnings 2009-10-30 16:09:59 -05:00
Denis Kenzior
26804de94b Add checking for valid APN format 2009-10-30 15:54:32 -05:00
Denis Kenzior
ee92dc0b62 Add utility to test for valid APN names 2009-10-30 15:52:29 -05:00
Denis Kenzior
cc5701c76f Add saving / restoring of netreg settings 2009-10-30 15:23:27 -05:00
Denis Kenzior
6b46d7d363 Add utilities for settings management 2009-10-30 15:22:06 -05:00
Denis Kenzior
6b19de8c07 Fix: Remove unused header include 2009-10-30 13:20:31 -05:00
Denis Kenzior
66653ecfb7 Add Mode property to NetworkRegistration 2009-10-30 12:38:12 -05:00
Denis Kenzior
fa33588d40 Fix: style issues 2009-10-30 12:37:23 -05:00
Denis Kenzior
c5600c1be2 Fix: Refine the logic for CHLD=1 and CHLD=2 2009-10-30 12:02:43 -05:00
Denis Kenzior
252fd9eb52 Fix: Properly update technologies
When current operator is reported, update the technology list if the
tech information is available
2009-10-29 16:38:25 -05:00
Denis Kenzior
a53440d648 Compress the operator list before processing 2009-10-29 16:33:29 -05:00
Denis Kenzior
22dc4e229f Add utility to compress plmns that vary by tech 2009-10-29 15:58:32 -05:00
Denis Kenzior
40adc85174 Refactor: Get rid of useless netreg parameter 2009-10-29 15:58:09 -05:00
Denis Kenzior
4e69a94a86 Refactor: Use Technologies instead of Technology 2009-10-29 15:57:02 -05:00
Denis Kenzior
47fa0fb883 Add utility to create a list of supported techs 2009-10-29 15:54:23 -05:00
Denis Kenzior
694cacf4f8 Refactor: Operator registration to DBUS 2009-10-29 15:48:37 -05:00
Denis Kenzior
9f8bc8e6cd Refactor: Internal data structures
This is in preparation to coalescing multiple operators reported by the
driver that vary only by technology into a single operator with multiple
technologies
2009-10-29 15:33:57 -05:00
Denis Kenzior
fd6d9f9fc7 Fix: Don't pass ofono_network_operator structures 2009-10-29 15:28:26 -05:00
Denis Kenzior
177c9672d1 Fix: Also auto register when status is unknown 2009-10-29 14:21:04 -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
24d8a5722b Refactor: replace netreg get_operator with mcc/mnc
The full operator information is useless as only mcc/mnc are really
required.  The internal structures will be changing soon
2009-10-27 19:47:52 -05:00
Denis Kenzior
ed813455c2 Fix: Don't emit spurious Base Station Name signal 2009-10-27 14:41:43 -05:00
Denis Kenzior
ed1d8a6fab Fix: Skip empty emergency numbers 2009-10-27 12:47:42 -05:00
Denis Kenzior
25ef3f8b18 Fix: Obscure crash when GPRS is not supported 2009-10-27 12:39:20 -05:00
Denis Kenzior
30609627bf Fix: Properly unregister context on exit 2009-10-27 12:39:09 -05:00
Denis Kenzior
fa8eb23d3f Fix: Use driver_attached instead of attached 2009-10-26 18:30:41 -05:00
Denis Kenzior
e63ea23557 Make netreg_update based on CREG, not CGREG 2009-10-26 17:26:19 -05:00
Denis Kenzior
4f85ee5c97 Simplify logic in netreg_update 2009-10-26 17:25:52 -05:00
Denis Kenzior
078e2bdc2a Fix unused variable warning 2009-10-26 17:00:35 -05:00
Denis Kenzior
4552b0c26a Don't cause an infinite loop 2009-10-26 17:00:18 -05:00
Denis Kenzior
ae1192ba99 Get rid of the AFTER_ROAMING stuff 2009-10-26 16:58:24 -05:00
Denis Kenzior
c7a113dbd2 Ignore gprs status when not attached/attaching 2009-10-26 16:57:21 -05:00
Denis Kenzior
d5fe6dce96 Update attached status when gprs status changes 2009-10-26 16:56:52 -05:00
Denis Kenzior
bc72cca91b Fix: notify_attached was only used when detached
The standard only specifies that the context might have been detached by
the network / mobile equipment.  Not attached.
2009-10-26 16:55:03 -05:00
Denis Kenzior
e0603f0c68 Add a master function for updating attached state 2009-10-26 16:54:18 -05:00
Denis Kenzior
fe974ea4f2 Fixup initialization logic 2009-10-26 16:20:36 -05:00
Denis Kenzior
ca4f75ca0b Fix: Initialize registration statuses 2009-10-26 16:19:54 -05:00
Denis Kenzior
6f9b5be3d5 Fix: Reset netreg to 0 when unregistered 2009-10-26 16:18:17 -05:00
Andrzej Zaborowski
939be2adc2 Refactor: Make GPRS use information from netreg 2009-10-26 13:34:41 -05:00
Andrzej Zaborowski
53414483d3 Fix: Don't attach if searching
Don't ask driver to attach GPRS if modem is already searching for an
operator.
2009-10-26 13:32:26 -05:00
Andrzej Zaborowski
4779ed055a Fix interpretation of new GPRS registration status signal. 2009-10-26 13:29:41 -05:00
Denis Kenzior
50ae504bc6 Fix: Fix segfault from improperly initialized data 2009-10-24 12:39:31 -05:00
Andrzej Zaborowski
87f4e3890d Just return success when value already set in SetProperty. 2009-10-24 10:27:06 -05:00
Denis Kenzior
722204ae6c Fix: Connect up gprs and gprs_context 2009-10-23 17:05:56 -05:00
Denis Kenzior
7faa34d235 Fix: Typo in property name 2009-10-23 17:05:56 -05:00
Denis Kenzior
14c116be36 Remove unused code and make compiler happy 2009-10-23 17:05:56 -05:00
Denis Kenzior
a3b736afe5 Add implementation of GPRS context atom 2009-10-23 17:05:56 -05:00
Denis Kenzior
fa800e5852 Fix: Rename Flag 2009-10-23 17:05:56 -05:00
Denis Kenzior
f9a8ea1b08 Deactivate the context for removal if active 2009-10-23 17:05:56 -05:00
Denis Kenzior
08eda615c5 Refactor/Implement basic activate logic
Not yet tested
2009-10-23 17:05:55 -05:00
Denis Kenzior
a12d252609 Add stub of gprs context deactivated 2009-10-23 17:05:55 -05:00
Denis Kenzior
7587fe0de3 Fix: Style 2009-10-23 17:05:55 -05:00
Denis Kenzior
46dde73ab2 Remove unused functions 2009-10-23 17:05:55 -05:00
Denis Kenzior
369d9f8f33 Refactor: Deactivate all contexts function 2009-10-23 17:05:55 -05:00
Denis Kenzior
752468b16e Remove unused function 2009-10-23 17:05:55 -05:00
Denis Kenzior
8e0797ca24 Refactor: GPRS Remove Context function 2009-10-23 17:05:55 -05:00
Denis Kenzior
b2c2ed5fdd Refactor: GPRS CreateContext function 2009-10-23 17:05:55 -05:00
Denis Kenzior
f80df022d4 Remove unused function 2009-10-23 17:05:54 -05:00
Denis Kenzior
87b5d16c14 Refactor: context object path list 2009-10-23 17:05:54 -05:00
Denis Kenzior
58d44f6be9 Refactor: Context set_property function 2009-10-23 17:05:54 -05:00
Denis Kenzior
7409a6761f Refactor: Context get_properties 2009-10-23 17:05:54 -05:00
Denis Kenzior
cbaf0aacfc Refactor: context finding by path 2009-10-23 17:05:54 -05:00
Denis Kenzior
6f7ef99759 Remove unused function 2009-10-23 17:05:54 -05:00
Denis Kenzior
65f77b2b3a Add CID range function 2009-10-23 17:05:54 -05:00
Denis Kenzior
b745ebcf6f Refactor: Primary Context dbus reg/unreg 2009-10-23 17:05:54 -05:00
Denis Kenzior
7b3ab433eb Refactor: Use ofono_bool_t instead of int 2009-10-23 17:05:54 -05:00
Denis Kenzior
05d7cf9ee1 Refactor: Rename GPRS type enums 2009-10-23 17:05:54 -05:00
Denis Kenzior
bb7945d6aa Refactor: Split up GPRS into two atoms
Split up GPRS into two atoms: GPRS and GPRS Context.  GPRS will handle
the areas of GPRS network registration, basic GPRS capability detection
and attach / detach.

GPRS Context will handle setting up / activating / deactivating the
indicidual contexts.

This will allow us to use the generic GPRS atom for most devices while
customizing the GPRS context accordingly.
2009-10-23 17:05:54 -05:00
Denis Kenzior
729d580692 Add InUse error type 2009-10-23 17:05:53 -05:00
Denis Kenzior
0b68ad7e32 Second round of renaming 2009-10-23 17:05:53 -05:00
Denis Kenzior
88c0f77a58 Refactor: First round of renaming 2009-10-23 17:05:53 -05:00
Denis Kenzior
b2fd75014a Refactor: rename data-connection to gprs
Keep the name specific to GSM, other implementations will probably
require their own interfaces
2009-10-23 17:05:53 -05:00
Andrzej Zaborowski
f43efa8a5f Add GPRS support
This commit implements the GPRS context setup and teardown according to
doc/dataconnectionmanager-api.txt

One issue with the AT implementation of the api is that "Powered" (a
read-write property) can be set independently of "Attached" (read-only
property) and remain set when "Attached" is clear.  The semantics would
be that the network doesn't have resources to let the modem attach,
but the modem waits for the resources to become available and then
attaches.  On AT the modem is in this state only when executing +CGATT,
so currently the code will rerun +CGATT as soon as the previous one
returns with error, probably starving other commands.  A possible
workaround would be for "Powered" to flip back to False after the modem
fails to attach once, or give up on having separate properties.
Alternatively we could re-try to attach periodically but on one modem
I've tried +CGATT fails after about 1 minute (that's the Calypso) and
on another only about 0.5s (Nokia phones with AT emulation).

When "Powered"  is set and "RoamingAllowed" is clear and we manage to
attach and find that we're roaming, ofono resets "Powered".

We may want to catch the user trying to dial *99***1# which is the
backwards compatibility quirk for old modems (same way ofono parses
USSD strings).
2009-10-23 17:05:53 -05:00
Olivier Le Thanh Duong
6d9bd02480 Migrate from RFC2822 to ISO8601 2009-10-21 19:04:47 -05:00
Andrzej Zaborowski
15c07346df Parse +CUSD responses. 2009-10-16 17:46:28 -05:00
Denis Kenzior
eb2c60469c Fix: Don't return NULL if message is empty
Empty SMS messages are in sms_decode_text are returned as NULL, e.g.
error.  This shouldn't be the case, empty messages should be reported
and signaled.
2009-10-16 13:19:11 -05:00
Andrzej Zaborowski
30b86c1dda Fix: Skip over empty messages 2009-10-16 11:50:42 -05:00
Andrzej Zaborowski
2d992d7912 Always return a string from telephony_error_to_str.
So that it can be used as a printf argument directly.
2009-10-16 11:14:02 -05:00
Andrzej Zaborowski
5773e30373 Refactor: Move network registration status utils
Move the status to string functions to common.c so that they can be
reused in data connection related network registration code.
2009-10-16 11:12:43 -05:00
Denis Kenzior
9f9327e1e5 Fix: Quiet a warning on some compilers 2009-10-15 16:15:18 -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
60118757b2 Fix: Don't crash when cached ef structure differs 2009-10-05 16:20:55 -05:00
Marcel Holtmann
647ebdfd13 Fix pointer size problem with GUINT_TO_POINTER and unsigned short 2009-10-04 13:02:56 +02:00
Denis Kenzior
9ab5eba1da Fix: Handle empty SMSes
If an SMS is empty (e.g. nothing to unpack) then we should simply
continue on.
2009-10-02 19:26:11 -05:00
Denis Kenzior
6ef9a4b2dd Fix: Make const correct 2009-10-02 19:25:44 -05:00
Denis Kenzior
f7c97ca10a Fix: Add additional error checking 2009-10-02 18:25:56 -05:00
Denis Kenzior
c8150fc120 Use small caps for 2G/3G functions 2009-10-02 18:25:56 -05:00
Denis Kenzior
8bf64ef07d Add utility to parse 3G get response data
Based on ETSI 102.221
2009-10-02 18:25:56 -05:00
Denis Kenzior
c9a2eedc08 Add utility to parse 2G GET_RESPONSE data
This format is described in 51.011 and the older 11.11.  It is not
supported by newer 3G UICC based devices & sim card combinations
2009-10-02 18:25:56 -05:00
Denis Kenzior
c8e515fef8 Add utility to lookup files in EF db 2009-10-02 18:25:56 -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
6d9ec89259 Add basic elementary file database 2009-10-02 18:25:55 -05:00
Denis Kenzior
128d129ef5 Fix: different signedness comparison 2009-09-29 14:56:23 -05:00
Denis Kenzior
61cecf7256 Fix: Don't try to set a value if already set 2009-09-29 14:56:22 -05:00
Denis Kenzior
853bd2d6da Add Muted property to CallVolume atom 2009-09-29 14:56:22 -05:00
Denis Kenzior
2fca5c7f08 Refactor: Call Volume set_property handling 2009-09-29 14:56:22 -05:00
Denis Kenzior
b8bc7a4c61 Get rid of unused define 2009-09-29 14:56:22 -05:00
Denis Kenzior
16744dc718 Get rid of unused variables 2009-09-29 14:56:22 -05:00
Denis Kenzior
f9d0cd09d4 Refactor: Assume driver will set call volume
Driver should use the ofono_call_volume_set_microphone_volume and
ofono_call_volume_set_speaker_volume functions.
2009-09-29 14:56:22 -05:00
Denis Kenzior
158f9ac1d5 Don't use ofono_ prefix for static functions 2009-09-29 14:56:22 -05:00
Denis Kenzior
6a271dd258 Refactor: Break up call volume notify 2009-09-29 14:56:22 -05:00
Denis Kenzior
d76f674794 Cleanup: Do not expose DBus details to drivers 2009-09-29 14:56:21 -05:00
Zhenhua Zhang
f5e24369ca Add call volume interface to adjust speaker and mic volume 2009-09-29 14:56:21 -05:00
Denis Kenzior
274cd012c4 Fix: Report registered modems properly 2009-09-28 11:18:50 -05:00
Denis Kenzior
bb746b3e9d Fix efli being removed prematurely 2009-09-28 11:18:50 -05:00
Marcel Holtmann
0e9f9d8bc8 Fix segmentation fault from SIM reading on Calypso modem 2009-09-25 14:07:33 -07:00
Denis Kenzior
bbe49a1b6e Fix whitespace 2009-09-24 10:23:37 -05:00
Denis Kenzior
5b2852d8b4 Add initial support for LockedPins property 2009-09-24 10:23:37 -05:00
Denis Kenzior
dc644108bf Ignore EFli if the first entry is empty 2009-09-23 17:28:15 -05:00
Andrzej Zaborowski
c98e99aef2 Remove unused struct field. 2009-09-23 14:27:49 -05:00
Andrzej Zaborowski
cb19aa987f Rename eflp_format to efli_format, semantically opposite. 2009-09-23 14:27:26 -05:00
Denis Kenzior
cfcf7e6516 Simplify: Use dbus_message_iter_get_args 2009-09-22 11:24:21 -05:00
Denis Kenzior
b8dcd905fb Remove unused structure 2009-09-22 11:24:21 -05:00
Marcel Holtmann
5f4340f186 Fix unused variable issue from last commits 2009-09-23 10:47:29 -07:00
Denis Kenzior
863210f7c0 Fix: Comparison should be against negative errno 2009-09-22 09:36:55 -05:00
Denis Kenzior
17cedf0eb7 Don't try to Lock or Unlock SIM PIN2 2009-09-22 00:07:07 -05:00
Denis Kenzior
2c4c27654c Make sure we try to lock/unlock/change only PINs 2009-09-22 00:07:07 -05:00
Denis Kenzior
5fd083f6f4 Refactor: Do not use int instead of enum
27.007 does not define an enumeration for SIM PIN/PUK values.  This
should be handled by ofono enum instead
2009-09-22 00:07:07 -05:00
Denis Kenzior
f599036ed0 Add LockPin and UnlockPin functions 2009-09-22 00:07:06 -05:00
Denis Kenzior
63416e2851 Rearrange sim password enum 2009-09-22 00:07:06 -05:00
Denis Kenzior
d67ded70ea Fix: Make sure pin isn't empty 2009-09-22 00:07:06 -05:00
Denis Kenzior
1faf467d87 Get rid of 1 line function 2009-09-22 00:07:06 -05:00
Denis Kenzior
9f27be58bc Move some stuff around 2009-09-22 00:07:06 -05:00
Andrzej Zaborowski
ee02b14836 Do PIN authentication
This adds checking whether PIN is required during SIM initialisation and
delaying the sim ready notifications until after correct PIN is given.
2009-09-22 00:07:06 -05:00
Denis Kenzior
b1c8b291f5 Assume sms is registered only when sim ready 2009-09-22 00:07:06 -05:00
Denis Kenzior
6914b11269 Assume cbs is registered after sim ready 2009-09-22 00:07:06 -05:00
Denis Kenzior
84515b9d39 Assume netreg is registered when sim ready 2009-09-22 00:07:06 -05:00
Denis Kenzior
91555b9165 Refactor language preference parsing
- Make sure to handle capital / lower case ISO639 strings
- Properly handle the case where files are empty / unused
- Don't emit the signal unless the preferences are useable
- Simplify the logic and be a bit more readable
2009-09-17 14:10:12 -05:00
Denis Kenzior
ef5eb6139a Simplify function logic 2009-09-17 12:18:48 -05:00
Denis Kenzior
ee33bc6ab7 Use g_ascii_isdigit 2009-09-17 12:17:42 -05:00
Denis Kenzior
8dd574d842 Fix potential memory leak 2009-09-17 12:04:56 -05:00
Denis Kenzior
b3ec3f5fef Rename function to be more clear 2009-09-17 12:04:45 -05:00
Denis Kenzior
e2a4c4bee8 Use existing function for converting to iso639 2009-09-17 11:53:37 -05:00
Denis Kenzior
26f15e30a8 Assume CBS is registered when SIM ready 2009-09-17 11:53:19 -05:00
Andrzej Zaborowski
623c23c12f Present list of preferred languages on SimManager interfce.
We try to detect the old (2G / 2G+, 51.011) EFlp format and deal
with the file contents accordingly.
2009-09-17 11:42:49 -05:00
Denis Kenzior
0698fc2788 Split populate modem driver method
Introduce two new methods
	- pre_sim - SIM is not inserted or locked.  This should populate
	  the modem with atoms that can be used without the SIM.
	  Generally this is the devinfo atom, the sim atom and the voice
	  call atom (emergency calls only)
	- post_sim - SIM is ready.  This method should populate the
	  modem with the remaining atoms
2009-09-17 10:14:02 -05:00
Denis Kenzior
971ef1c305 Add reading of various CBS related EFs
- EFcbmi - Cell Broadcast Identifiers
- EFcbmir - Cell Broadcast Identifier Ranges
- EFcbmid - Cell Broadcast Identifiers for Data Download
2009-09-16 17:09:58 -05:00
Denis Kenzior
b83c7acfc9 Fix: do not leak memory, cleanup the topic list 2009-09-16 04:53:41 -05:00
Marcel Holtmann
75719f0c01 Fix compilation error with missing return value 2009-09-12 09:01:05 +02:00
Denis Kenzior
03ce875a7b Support base station name cell broadcasts
If we receive an immediate cell-specific cell broadcast, report it as
the base station id up to netreg atom
2009-09-11 21:38:08 -05:00
Denis Kenzior
6f86a8d0a6 Add utility for setting the netreg base station 2009-09-11 21:35:31 -05:00
Denis Kenzior
d54f588355 Enable registration / location updates for CBS
- This tracks the current Location Area Code / Cell ID and PLMN.  If any
  of these change, the assembly is notified.  This is required to
  implement proper CBS message duplicate detection according to 23.041
2009-09-11 16:25:30 -05:00
Denis Kenzior
f03b97c635 Add network registration status watch capability 2009-09-11 16:25:15 -05:00
Denis Kenzior
227ac8f2e0 Remove extra free of cbs assembly 2009-09-11 15:33:51 -05:00
Denis Kenzior
5e754c6518 Create watchlists during register 2009-09-11 14:06:18 -05:00
Denis Kenzior
8858669857 Port sim ready watch to __ofono_watchlist 2009-09-11 14:05:39 -05:00
Denis Kenzior
32fc30fa02 Refactor various watch functions
Use a common core kernel for all the watcher registrations /
notifications.  This is now done in watch.c
2009-09-11 12:39:53 -05:00
Denis Kenzior
27cfc00eba Add netreg getter functions
- Get Location, CellID
- Current Operator
- Registration Status
- Technology
2009-09-10 18:19:48 -05:00
Denis Kenzior
40ef883fe4 Add ability to expire PLMN wide messages 2009-09-10 17:40:16 -05:00
Denis Kenzior
d498ec9f2a Fix unused variable 2009-09-10 16:29:56 -05:00
Andrzej Zaborowski
6f675b3148 Keep modem->powered_pending up to date after set_powered.
Without this once a request to power up the modem fails, modem.c won't
retry even when asked.
2009-09-10 16:29:56 -05:00
Andrzej Zaborowski
ac5603d225 Fix generation of Message Waiting PropertyChanged signals. 2009-09-10 16:29:55 -05:00
Andrzej Zaborowski
a82c567f0c Fix parsing of Enhanced Voicemail notifications. 2009-09-10 16:29:55 -05:00
Denis Kenzior
78b853a97d Add initial Cell Broadcast atom implementation 2009-09-10 16:13:16 -05:00
Denis Kenzior
2ade0f6b05 Handle empty topic range lists 2009-09-10 16:13:16 -05:00
Denis Kenzior
c559aa42f6 Make cbs_topic_ranges_to_string work with all ids 2009-09-10 16:13:16 -05:00
Denis Kenzior
52d3c235d5 Add CBS topic range functions 2009-09-10 16:13:15 -05:00
Denis Kenzior
1acf350190 Fix make distcheck 2009-09-08 16:52:12 -05:00
Denis Kenzior
3449b2c0b5 Rework SMS fragment backup storage
The SMS address can actually contain other characters than 0-9, +, *, #,
particularly when the alphanumeric address type is used.  This is
commonly used by services such as Google or carrier specific SMS
services.

Rework the SMS address storage to simply re-use the SMS address pdu
format, which consists of up to 12 hex-encoded bytes.
2009-09-08 16:40:56 -05:00
Denis Kenzior
47bcf1ac18 Fix style issue 2009-09-08 16:40:38 -05:00
Denis Kenzior
785686ec6b Fix off by one error in assembly serialize
The proper PDU was not being written out fully
2009-09-08 16:39:16 -05:00
Andrzej Zaborowski
06ea6137a3 Write state of SMS assembly to disk and restore on startup.
This way we can continue receiving segmented messages over a reset or
crash.
2009-09-08 14:44:39 -05:00
Denis Kenzior
110dfb9e2e Fix style issue 2009-09-08 14:15:40 -05:00
Andrzej Zaborowski
17cb0ce3c4 Move create_dirs to storage.c, add file read/write utilities 2009-09-08 13:34:07 -05:00
Denis Kenzior
b2bde46bfb Do supported dialect detection in sms.c 2009-09-08 12:45:04 -05:00
Denis Kenzior
b1932334da Refactor SMS language dialect encoding / decoding
- Introduce new enum gsm_dialect instead of unsigned char arguments
- Use ISO639 3 letter codes for conversion tables
- Use a single lookup table instead of 4 different ones
2009-09-08 12:44:51 -05:00
Denis Kenzior
bfbe142774 Fix style issues 2009-09-08 09:42:29 -05:00
Aki Niemi
dab84882af Use SMS national language identifier when decoding
Adds support for decoding SMSs encoded using national language single
shift and locking shift tables.
2009-09-08 14:16:24 +03:00
Aki Niemi
462b0b8249 Add support for national language variants
Add API for supporting character conversion using national language
variants. Also, add conversion tables for Turkish, Spanish and
Portuguese, and fix the default table. The lookup algorithms were
tweaked to support multiple tables.
2009-09-08 14:16:23 +03:00
Marcel Holtmann
154102e873 Add modem properties for booleans 2009-09-08 09:12:19 +02: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
05d62d82a5 Get rid of stupid debug message 2009-09-03 23:20:22 -05:00
Denis Kenzior
e9a87abdc5 Fix emitting Modems Property in the wrong place 2009-09-02 19:49:03 -05:00
Denis Kenzior
76b6e52d40 Squash compiler warning 2009-09-02 17:39:23 -05:00
Denis Kenzior
7a95c41fab Get rid of node argument in ofono_modem_create 2009-09-02 17:39:23 -05:00
Denis Kenzior
03a0fde2f4 Add simple utility to validate paths 2009-09-02 17:39:23 -05:00
Denis Kenzior
8e62522575 Add modem property capability
Add ofono_modem_set_string & ofono_modem_get_string
Add ofono_modem_set_integer & ofono_modem_get_integer
2009-09-02 17:39:23 -05:00
Denis Kenzior
422df0edfb change int vendor to unsigned int vendor 2009-09-01 21:39:02 -05:00
Denis Kenzior
5ce0de14dc Add ofono_modem_get_powered 2009-09-01 20:10:31 -05:00
Denis Kenzior
4064f4ba73 Add vendor flag capability to voicecalls 2009-09-01 18:14:59 -05:00
Denis Kenzior
e5577046f0 Add vendor flag capability to ussd 2009-09-01 18:14:58 -05:00
Denis Kenzior
afb0e2b854 Add vendor flag capability to ssn 2009-09-01 18:14:58 -05:00
Denis Kenzior
8d380f8fa0 Add vendor flag capability for sms 2009-09-01 18:14:58 -05:00
Denis Kenzior
aecf42646e Add vendor flag capability to sim 2009-09-01 18:14:58 -05:00
Denis Kenzior
1fb9ecca46 Add vendor flag capability to phonebook 2009-09-01 18:14:58 -05:00
Denis Kenzior
271b042488 Add vendor flag capability to netreg 2009-09-01 18:14:58 -05:00
Denis Kenzior
c7d35dd039 Add vendor flag capability to devinfo 2009-09-01 18:14:58 -05:00
Denis Kenzior
933f803967 Add vendor flag to call-settings 2009-09-01 18:14:58 -05:00
Denis Kenzior
390bd82109 Add vendor parameter to call-meter 2009-09-01 18:14:57 -05:00
Denis Kenzior
7ee954b28a Add vendor flag to call-forwarding 2009-09-01 18:14:57 -05:00
Denis Kenzior
15b1a733b0 Introduce vendor parameter to call-barring 2009-09-01 18:14:57 -05:00
Denis Kenzior
a4e5c27e1a Fix being able to set powered after failure
If enable failed, subsequent attempts will also fail.
2009-08-31 23:03:37 -05:00
Denis Kenzior
aeebbfa67e Don't return sdn numbers until ready 2009-08-31 15:12:38 -05:00
Denis Kenzior
d1ab58479d Simplify EFsdn reading code 2009-08-31 15:12:38 -05:00
Denis Kenzior
a7202d8d83 Rename MNCLength to MobileNetworkCodeLength 2009-08-31 15:12:37 -05:00
Denis Kenzior
37deaa6651 Refactor sim mnc length 2009-08-31 15:12:37 -05:00
Denis Kenzior
526e1a6164 Style Fix 2009-08-31 15:12:37 -05:00
Denis Kenzior
efdf84b62c Simplify nested ifs 2009-08-31 15:12:37 -05:00
Denis Kenzior
a96fde1362 Simplify overly complicated code 2009-08-31 15:12:37 -05:00
Andrzej Zaborowski
7ecebc9a31 Expose service dialling numbers stored on SIM through SimManager. 2009-08-31 15:12:37 -05:00
Andrzej Zaborowski
f21930f04e Decode and encode alpha-identifier fields
Add identifier argument to sim_adn_parse and sim_adn_build.

Also fix the number length passed to extract_bcd_number in sim_adn_parse.
2009-08-31 15:12:37 -05:00
Andrzej Zaborowski
6552bc668d Read EFad and expose the IMSI MNC length (2-3) 2009-08-31 15:12:37 -05:00
Denis Kenzior
45e03f4173 Add debug to modem_create 2009-08-30 13:29:44 -05:00
Denis Kenzior
96dc40b107 Make history drivers work again 2009-08-29 10:47:26 -05:00
Aki Niemi
4148f82e4e Fix typo in technology name 2009-08-25 10:47:19 +03:00
Marcel Holtmann
70aab2a826 Convert to fully non-recursive build system 2009-08-24 23:49:40 -07:00
Marcel Holtmann
7d3d52009d Use script to generate list of builtin plugin symbols 2009-08-24 19:05:41 -07:00
Marcel Holtmann
d9a2bb1337 Use proper variables for various commands 2009-08-24 18:51:39 -07:00
Andrzej Zaborowski
64ade1c7c8 Fix getting the offset into sms fragment bitmap.
Otherwise only 64 fragments fit.
2009-08-21 19:46:39 -05:00
Denis Kenzior
038251eac5 Introduce the Modem driver API 2009-08-21 19:25:51 -05:00
Denis Kenzior
28b9d5d747 Fix unused variable l 2009-08-20 18:20:14 -05:00
Denis Kenzior
e0ff90e6da Rename ofono_modem_*_userdata
Rename ofono_modem_get_userdata to ofono_modem_get_data
Rename ofono_modem_set_userdata to ofono_modem_set_data

For consistency with other drivers
2009-08-20 18:19:21 -05:00
Denis Kenzior
4fac5d1c73 Hide the ofono_modem datastructure 2009-08-20 16:58:01 -05:00
Denis Kenzior
ca95c87dae Port history to the new atom API
Use __atom_foreach
2009-08-20 16:29:18 -05:00
Denis Kenzior
2fea7be017 Add __ofono_modem_foreach_atom function 2009-08-20 15:59:50 -05:00
Denis Kenzior
b8589c7cdf Fix unused variable modem 2009-08-20 15:39:13 -05:00
Denis Kenzior
919aae6cd9 Fix unused function remove_all_watches 2009-08-20 15:39:13 -05:00
Denis Kenzior
6261b83dbf Fix unused variable modem 2009-08-20 15:39:13 -05:00
Denis Kenzior
a81852b761 Remove unused function 2009-08-20 15:39:12 -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
e711b0e62a Break out device info into a separate driver
The modem info ops (Serial, Manufacturer, etc) are broken into a
separate oFono atom.  This is mainly to support a proper modem device
driver infrastructure.  As a result the data structures have been
tweaked a little.

driver.h is now empty and has been removed.
2009-08-20 12:48:29 -05:00
Denis Kenzior
7abeb8e4a0 Use types.h instead of driver.h here 2009-08-20 12:48:28 -05:00
Denis Kenzior
8bbd68b2fd Remove unused variables 2009-08-20 12:48:28 -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
Denis Kenzior
5b1f5ba084 Evolve the netreg driver 2009-08-19 18:35:07 -05:00
Denis Kenzior
a5617250a1 Move mcc & mnc defines to types.h 2009-08-19 18:35:07 -05:00
Denis Kenzior
99cf14efcf Refine errors returned by message-waiting
If we have not initialized fully yet, return sim_not_ready error.
If we couldn't read EFmbi or not able to stat EFmbdn size properly, then
set mbdn_not_present to TRUE and always return not_supported error
2009-08-19 18:35:07 -05:00
Denis Kenzior
5999b418e8 Evolve message waiting low level API 2009-08-19 18:35:07 -05:00
Denis Kenzior
a45007f91d Add a new SIM not ready error 2009-08-19 18:35:07 -05:00
Denis Kenzior
2b7cd7dede Update voicecalls to the new SIM API 2009-08-19 18:35:07 -05:00
Denis Kenzior
3f17e3eb79 Update network registration to the new SIM API 2009-08-19 18:35:07 -05:00
Denis Kenzior
2bf3e20d48 Update message waiting to the new SIM API 2009-08-19 18:35:06 -05:00
Denis Kenzior
f19d0cba4e Remove traces of sim_manager from modem.c 2009-08-19 18:35:06 -05:00
Denis Kenzior
5e72405120 Evolve SIM driver 2009-08-19 18:35:06 -05:00
Denis Kenzior
3b043e9b1a Move ofono_destroy_fun to types.h 2009-08-19 18:35:06 -05:00
Denis Kenzior
1cd48d1abe Remove unneeded variable 2009-08-19 18:35:06 -05:00
Denis Kenzior
232e34bca9 Fix cut and paste error 2009-08-19 18:35:06 -05:00
Denis Kenzior
f59aab7f15 Fix whitespace and style issues 2009-08-19 18:35:06 -05:00
Denis Kenzior
56e97cb406 Refactor ECC: Free the new_en_list
Avoid a potential memory leak in case the interface is removed during
the SIM read operation.
2009-08-19 18:35:06 -05:00
Denis Kenzior
c4a349fdf9 Evolve SMS driver API 2009-08-19 18:35:06 -05:00
Denis Kenzior
21588cc5f8 Remove the use of driver.h 2009-08-17 17:14:01 -05:00
Denis Kenzior
60988bed9d Remove unused header 2009-08-17 17:12:12 -05:00
Denis Kenzior
56f1e412a0 Make distcheck happy 2009-08-17 17:08:03 -05:00
Denis Kenzior
a3d9123ca0 Refactor ECC Support: Update when EFecc is read
We should start with a default set of ECC numbers which are always
available according to 22.101, even if no SIM present.  Then when
EFecc is read, we update the EmergencyNumbers property.  According to
22.101 the 112 and 911 numbers must always be available.  Since these
numbers can also be stored on the SIM itself, we must avoid duplication.
2009-08-17 17:06:38 -05:00
Denis Kenzior
2ebef58855 Refactor ECC Support: Don't bother with g_source
Don't bother playing the g_source tricks for EmergencyNumbers property
changed signal emission.  The list is not bound to change more than
once.
2009-08-17 16:03:01 -05:00
Denis Kenzior
2e432b6ca0 Refactor ECC Support: Free in right spot
The freeing of the emergency list should be in voicecalls_destroy
function, where the rest of the datastructure is being freed
2009-08-17 16:02:53 -05:00
Yang Gu
5a0d8709af Support emergency numbers 2009-08-17 15:51:40 -05:00
Denis Kenzior
72182c2e8f Get rid of unused enum 2009-08-17 15:33:50 -05:00
Denis Kenzior
95573a4d8d Move network-operator status enum out of common.h 2009-08-17 15:32:34 -05:00
Denis Kenzior
00f606b3e8 Move colr-status enum out of common.h 2009-08-17 15:31:46 -05:00
Denis Kenzior
29c122a9a9 Move colp-status enum out of common.h 2009-08-17 15:31:17 -05:00
Denis Kenzior
f989e7844d Move clip-status enum out of common.h 2009-08-17 15:30:34 -05:00
Denis Kenzior
1e6bdb36ec Move clir-status enum out of common.h 2009-08-17 15:29:01 -05:00
Denis Kenzior
fe2dc0292c Move ussd-status enum out of common.h 2009-08-17 15:27:04 -05:00
Denis Kenzior
75510e7cd5 Move call-forwarding-type enum out of common.h 2009-08-17 15:26:24 -05:00
Denis Kenzior
21b032d3f1 Fix invalid watch id being returned the first time
Should use pre-increment instead of post increment
2009-08-17 15:23:39 -05:00
Denis Kenzior
255c6ba0d9 Cleanup atom watches properly 2009-08-17 15:14:05 -05:00
Denis Kenzior
6d5090eafa Cleanup SSC entries if USSD exits first 2009-08-17 15:08:48 -05:00
Denis Kenzior
5abd3c14d8 Port call-settings to the new USSD API 2009-08-17 15:08:48 -05:00
Denis Kenzior
91789b2680 Port call-forwarding to new USSD API 2009-08-17 15:08:48 -05:00
Denis Kenzior
c4d9393fa3 Get rid of unneeded variable 2009-08-17 15:08:48 -05:00
Denis Kenzior
65eb5e2089 Refactor call barring to the new USSD API 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
5fdc6fd395 Get rid of unused functions 2009-08-17 11:38:36 -05:00
Marcel Holtmann
6d73540f22 Use $(AM_V_GEN) for symbol export generation 2009-08-16 14:51:40 -07:00
Denis Kenzior
314c0facc3 Refactor cssn into ofono_ssn
Make this into a fully fledged entity, with a driver instead of the
current kludge.  This means modem drivers can actually choose whether
to instantiate a CSSN atom or not

Move the notification functions from voicecall.c into ssn.c.

Move the cssn.h header into include/ssn.h and refactor

Update call barring to utilize ofono_ssn and use the new atom_watch
functionality to detect when ssn has been added or removed
2009-08-14 18:49:01 -05:00
Denis Kenzior
6482d98e56 Add atom get_registered function 2009-08-14 18:47:12 -05:00
Denis Kenzior
e36c8b1d5d Follow the more common glib convention for destroy 2009-08-14 17:06:59 -05:00
Yang Gu
3c6b6b908f Remove trailing whitespace 2009-08-14 16:35:34 -05:00
Denis Kenzior
c48e739669 Fix whitespace issue 2009-08-14 16:35:02 -05:00
Denis Kenzior
9ca3c0e321 Utilize call_watches 2009-08-14 16:33:48 -05:00
Denis Kenzior
99e3fe8285 Move CALL_SETTINGS_INTERFACE define to dbus.h 2009-08-14 16:33:48 -05:00
Denis Kenzior
ed1720ea36 Move PHONEBOOK_INTERFACE define to dbus.h 2009-08-14 16:33:48 -05:00
Denis Kenzior
b82042c5e9 Move CALL_METER_INTERFACE define to dbus.h 2009-08-14 16:33:48 -05:00
Denis Kenzior
f82b9a32fd Move CALL_FORWARDING_INTERFACE define to dbus.h 2009-08-14 16:33:48 -05:00
Denis Kenzior
ae4ea4cd5e Move CALL_BARRING_INTERFACE definition to dbus.h 2009-08-14 16:33:48 -05:00
Denis Kenzior
2da0fc6070 Add call_watches utility 2009-08-14 16:33:48 -05:00
Denis Kenzior
c1c04e8c8d Add atom_watch functions 2009-08-14 16:33:43 -05:00
Denis Kenzior
c5f3388c36 Use atom's modem in phonebook 2009-08-14 16:31:48 -05:00
Denis Kenzior
fff46fd758 Use atom's modem storage in call settings 2009-08-14 16:31:48 -05:00
Denis Kenzior
3e50c22f57 Use atom's modem in call meter 2009-08-14 16:31:48 -05:00
Denis Kenzior
8a64f93f30 Use atom's modem in call-forwarding 2009-08-14 16:31:48 -05:00
Denis Kenzior
31a940825b Use atom's modem storage in call barring 2009-08-14 16:31:48 -05:00
Denis Kenzior
9ad3ad6664 Update to use the new atom_free API 2009-08-14 16:31:46 -05:00
Denis Kenzior
6119c08c28 Rework ofono_modem_remove_atom
Change to ofono_atom_free since the atom now carries all necessary
information about the modem it is attached to
2009-08-14 16:31:34 -05:00
Denis Kenzior
9020b1dc7e Add getter functions for atoms 2009-08-14 16:24:46 -05:00
Denis Kenzior
a6ef7f8711 Sanity check the atom register/unregister funcs 2009-08-14 15:15:06 -05:00
Denis Kenzior
622221e90f Fix passing in modem where call_barring expected 2009-08-14 15:15:06 -05:00
Denis Kenzior
ecdfbebc51 Evolve the phonebook driver 2009-08-14 11:19:10 -05:00
Denis Kenzior
0e3cc07966 Remove defunct pointer to call waiting data
Doesn't exist anymore
2009-08-14 11:19:10 -05:00
Denis Kenzior
04926379e5 Evolve call settings driver 2009-08-14 11:19:10 -05:00
Denis Kenzior
6342e1b2dc Move clir and cug option enums to types.h 2009-08-14 11:19:10 -05:00
Denis Kenzior
521039596a Evolve the call meter driver API 2009-08-14 11:19:09 -05:00
Denis Kenzior
872a24690d Evolve the call-forwarding driver 2009-08-14 11:19:09 -05:00
Denis Kenzior
67e19dc14c Evolve the call-barring driver
- Move call barring related functionality out of driver.h into a
  dedicated file, call-barring.h
- Update to use the new atom framework
- Remove over-reliance on the modem structure, call-barring structure
  should now be used instead whenever possible
2009-08-14 11:19:09 -05:00
Denis Kenzior
01b4c49447 Move certain parts of driver.h to types.h 2009-08-13 10:08:32 -05:00
Denis Kenzior
03e90fff16 Add ofono atom routines 2009-08-13 10:08:32 -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
b1d0bda4b3 Always output useable FN in VCard
If text is NULL or empty, use the number field for the FN VCard entry
instead.
2009-08-12 19:49:23 -05:00
Denis Kenzior
715067d38d Fix a segfault in need_merge 2009-08-12 19:49:23 -05:00
Denis Kenzior
70b758f8be Bail out early if text & number are empty 2009-08-12 19:49:23 -05:00
Marcel Holtmann
5641f1974a Fix comment 2009-08-12 17:40:41 -07:00
Marcel Holtmann
08f6629d60 Add function for printing warnings 2009-08-12 17:33:44 -07:00
Denis Kenzior
19858da361 Fix compile warning 2009-08-08 22:39:50 -05:00
Denis Kenzior
07cca7ab13 Quiet an error if a modem is removed quickly 2009-08-07 20:11:34 -05:00
Denis Kenzior
6db2762d75 Fix segfault upon modem removal due to g_source
Network registration was not removing operator list scan g_source,
which was causing a crash in one of two potential places.
2009-08-07 20:06:05 -05:00
Denis Kenzior
b951aa9a32 Refactor SIM file cache 2009-08-07 19:51:30 -05:00
Denis Kenzior
f12af3728c Re-enable reading of SPN & PNN on phonesim 2009-08-07 19:51:29 -05:00
Denis Kenzior
2cfd8a9894 Make the sim op queue have a removable gsource 2009-08-07 19:51:29 -05:00
Denis Kenzior
32e4232b7c Don't use g_timeout_add to retrieve imsi 2009-08-07 19:51:29 -05:00
Denis Kenzior
055c5c7450 No need to use g_timeout_add here 2009-08-07 19:51:23 -05:00
Denis Kenzior
fef502bab2 No need to use g_timeout_add here 2009-08-07 17:40:54 -05:00
Denis Kenzior
f8d5b16e4e No need to use g_timeout_add here 2009-08-07 17:36:26 -05:00
Denis Kenzior
d7a5e7d017 No need to use g_timeout_add here 2009-08-07 17:30:28 -05:00
Denis Kenzior
6b9d8567b4 No need to use g_timeout_add
Simply calling the function here should be sufficient
2009-08-07 16:33:31 -05:00
Denis Kenzior
ebce9fbd4d Store the tx_next g_source so it can be removed 2009-08-07 16:14:49 -05:00
Denis Kenzior
44e56bf752 Use g_source instead of flag for mpty list changes 2009-08-07 16:14:46 -05:00
Denis Kenzior
eae2f2b3fb Use g_source instead of flag for call list changes 2009-08-07 16:14:40 -05:00
Denis Kenzior
f4037d77f7 Fix sim ADN type of number handling
The type of number stored here is not quite the same as SMS number,
and should be parsed differently
2009-08-07 15:49:30 -05:00
Denis Kenzior
f93962078c Refactor setting MSISDN
- Empty lists should be supported, as clearing the MSISDN is OK
- Initialization of empty MSISDN record should also be possible
- Overwriting of unused records should be possible
- Simplify resource cleanup
2009-08-07 15:49:30 -05:00
Denis Kenzior
6f9e386424 Keep new numbers in the main sim data structure
No sense to allocate / free memory for a single pointer
2009-08-07 15:49:30 -05:00
Denis Kenzior
7eb440e864 Move error label to a more logical place 2009-08-07 15:49:30 -05:00
Denis Kenzior
e5082b4b78 Move variable declarations to a move logical place 2009-08-07 15:49:30 -05:00
Andrzej Zaborowski
988f0ffbed Make SubscriberNumbers writable.
This implements writing SubscriberNumbers if the SIM allows this
(optional to the SIM provider).  Because the property is an array
of phone numbers, setting the property needs to write multiple
records on the SIM so it's not atomic and potentially can fail
partially.  In this case we have to report a write error to DBus
client but at the same time file may be changed and we send a
PropertyChanged.
2009-08-07 15:49:30 -05:00
Andrzej Zaborowski
d6aae60983 Make SIM op queue more robust.
This allows ofono_sim_read and ofono_sim_write callbacks to queue new
read or write operations.  The callback must not be called between
removing the operation from queue and checking queue length.
2009-08-07 15:49:30 -05:00
Denis Kenzior
572a89cce2 Fix style 2009-08-06 17:33:44 -05:00
Denis Kenzior
6989732e3a Fix style 2009-08-06 17:33:00 -05:00
Denis Kenzior
c2144be486 Add whitespace properly 2009-08-06 17:29:55 -05:00
Denis Kenzior
d4ccad4b72 Fix trailing whitespace 2009-08-06 17:29:11 -05:00
Denis Kenzior
24ded594ef No spaces between variable and ++/-- 2009-08-06 17:26:36 -05:00
Denis Kenzior
a7cfcae752 Fix trailing whitespace 2009-08-06 17:24:46 -05:00
Denis Kenzior
89effa1723 Squash warning 2009-08-06 15:42:22 -05:00
Denis Kenzior
d6c58caadc Squash warning 2009-08-06 15:42:22 -05:00
Denis Kenzior
ee2a88c678 Squash warning 2009-08-06 15:42:22 -05:00
Andrzej Zaborowski
d0b91bfbc8 Attempt to update MBDN based on Enhanced VM IEI 2009-08-05 13:33:35 -05:00
Andrzej Zaborowski
9a55de9cd0 Implement committing the EF-MBDN records to SIM 2009-08-05 13:32:49 -05:00
Andrzej Zaborowski
e8552dde07 Add utility for building ADN records
Used to populate MSISDN, MBDN, etc records on the SIM
2009-08-05 13:25:31 -05:00
Andrzej Zaborowski
ad6b8adebb Expose address encode/decode utilities
These can be used elsewhere, in particular for decoding the
enhanced message waiting notification ieis
2009-08-05 13:19:54 -05:00
Andrzej Zaborowski
4c3ae72b36 Add encode_bcd_number utility function 2009-08-05 13:17:08 -05:00
Denis Kenzior
965fc09e6a Don't emit signals for unexposed properties
Signals shouldn't be emitted, but we should still track the information
so it can be written to the SIM reliably
2009-08-05 12:45:55 -05:00
Denis Kenzior
2d12b296e0 Don't hardcode info len to 6 2009-08-05 12:35:08 -05:00
Denis Kenzior
fdc129e3e2 Make method async 2009-08-05 12:33:57 -05:00
Denis Kenzior
b7c51f9028 Remove unused declaration 2009-08-05 12:33:01 -05:00
Andrzej Zaborowski
d36f8d868a Use invalid_args instead of invalid_format 2009-08-05 12:20:28 -05:00
Denis Kenzior
e117f3112a Refactor how mwis updates are done 2009-08-04 15:10:50 -05:00
Denis Kenzior
c7d29c44a8 Name the callback properly 2009-08-04 15:10:50 -05:00
Denis Kenzior
28817cc671 Don't emit SubscriberNumbers multiple times
We would emit the signal even if the record could not be parsed
2009-08-04 15:10:49 -05:00
Denis Kenzior
36a57c366d Refactor how MBDN set is done 2009-08-04 15:10:49 -05:00
Denis Kenzior
876ef77adb Don't gmalloc something that is max 140 bytes 2009-08-04 15:10:49 -05:00
Denis Kenzior
f6628b81b9 Get rid of message-waiting.h 2009-08-04 15:10:49 -05:00
Denis Kenzior
c6bef71617 Fix minor style issues 2009-08-04 15:10:49 -05:00
Denis Kenzior
66e5eeeae0 Use invalid_args instead of invalid_format 2009-08-04 15:10:49 -05:00
Andrzej Zaborowski
203ed17cec Add a MessageWaiting interface to track message waiting indications.
The state of the indications is kept in memory and written back to
the SIM after any changes.
2009-08-04 15:08:11 -05:00
Denis Kenzior
ba8ef5c3e4 Fix segfault when pnn record doesn't exist 2009-08-04 15:08:08 -05:00
Denis Kenzior
2ce16d2b0c Put defines near the top 2009-08-04 15:08:06 -05:00
Denis Kenzior
d145a47108 Port Andrew's TFR patch 2009-08-04 15:01:52 -05:00
Denis Kenzior
090b771762 Make sim_op_info_cb caching a bit more readable 2009-08-04 15:01:49 -05:00
Denis Kenzior
320defb9c6 Make cache a gboolean 2009-08-04 15:01:46 -05:00
Denis Kenzior
6182c92ef7 Make sim_op_retrieve_cb a bit more readable 2009-08-04 15:01:42 -05:00
Andrzej Zaborowski
749a83d033 Check write() return values in sim.c for errors. 2009-08-04 15:01:39 -05:00
Andrzej Zaborowski
3cb6e1c90b Fix invalid queue use in sim_write_cb
Since we pop the queue's head, we can't use sim_op_error
2009-08-04 15:01:36 -05:00
Marcel Holtmann
bbc2a56986 Fix over-complicated code flow that results in uninitialized variables 2009-08-03 11:20:46 -07:00
Andrzej Zaborowski
fbec2de660 Make sure SIM read callbacks die cleanly. 2009-08-03 12:43:32 -05:00
Denis Kenzior
a11bce5467 Make is_read a gboolean 2009-08-03 12:41:44 -05:00
Andrzej Zaborowski
4cdf56cabe Implement ofono_sim_write
Writes use sim->simop_q queue together with reads.
2009-08-03 12:40:39 -05:00
Andrzej Zaborowski
0809e33659 Fix possible memory leak on SIM reading error.
This would also stall the SIM op queue if there's a read error for a record
other than the first.  The other solution would be "goto next;" (keep
reading further records).
2009-07-31 09:56:44 -05:00
Andrzej Zaborowski
cfce4413c6 Don't use g_slist_length to check for empty lists.
A glib Anti-pattern according to http://www.burtonini.com/blog
2009-07-31 09:56:21 -05:00
Andrzej Zaborowski
ebf6fca07a Clean up in sim.c.
Remove unused variables and fields.
Move EFadn format parsing to a common function because various files use
this same format.
2009-07-31 09:55:46 -05:00
Andrzej Zaborowski
049e573691 Use STORAGEDIR autoconf voodoo from Bluez. 2009-07-29 17:22:12 -05:00
Denis Kenzior
3e6d4237cb Remove all uses of modem.h 2009-07-29 16:53:19 -05:00
Denis Kenzior
8e4d029d84 Get rid of modem.h 2009-07-29 16:44:17 -05:00
Denis Kenzior
98436eb539 Get rid of unnecessary function 2009-07-29 16:44:17 -05:00
Denis Kenzior
a2d310642f Move ofono_modem functions to modem.c 2009-07-29 16:44:17 -05:00
Denis Kenzior
ea4886816f Move MODEM_INTERFACE to dbus.h 2009-07-29 16:44:17 -05:00
Denis Kenzior
b50291466d Move MANAGER_PATH to dbus.h 2009-07-29 16:44:17 -05:00
Denis Kenzior
1e9580a044 Move MANAGER_INTERFACE to dbus.h 2009-07-29 16:44:16 -05:00