Commit Graph

203 Commits

Author SHA1 Message Date
Denis Kenzior 5a24916aae Fix: Go to online state if set_online is NULL 2010-05-26 21:03:15 -05:00
Denis Kenzior 7705cebd3f Refactor: no need for dummy_online_callback 2010-05-26 21:03:15 -05:00
Denis Kenzior f2a2573cd0 Fix: Don't allow setting online before sim ready 2010-05-26 21:03:15 -05:00
Denis Kenzior adefe451a2 Refactor: Break up set_online_callback
- Break up into two functions, one for online and one for offline
- No longer the need for online_pending variable
2010-05-26 21:03:15 -05:00
Denis Kenzior 5da54eea44 Refactor: flush_atoms
The current implementation did not take care of the case where the head
of the list was removed
2010-05-26 21:03:14 -05:00
Denis Kenzior 5890c38a37 Refactor: Don't use ofono_ prefix
Only meant for oFono public API
2010-05-26 21:03:14 -05:00
Denis Kenzior 53dc160362 Refactor: The macros are no longer needed 2010-05-26 21:03:14 -05:00
Denis Kenzior d3b9f42ed4 Refactor: Don't use ofono_ prefix
Only to be used for ofono public API
2010-05-26 21:03:14 -05:00
Denis Kenzior 1b34af054d Refactor: Don't use ofono_ prefix
only meant for public API
2010-05-26 21:03:14 -05:00
Denis Kenzior c53d084234 Refactor: Don't use ofono_ prefix
ofono_ prefix is meant for public API
2010-05-26 21:03:14 -05:00
Denis Kenzior e7529bfa70 Fix: minor style issues 2010-05-26 21:03:12 -05:00
Pekka Pessi 4f1506ba25 Add: Online property to modem
The online/offline state is changed with the new set_online() modem driver
method.

In order to track atoms, there are modem states as follows:
- OFONO_MODEM_STATE_POWER_OFF
- OFONO_MODEM_STATE_PRE_SIM
- OFONO_MODEM_STATE_OFFLINE
- OFONO_MODEM_STATE_ONLINE

Atoms are added with driver methods pre_sim(), post_sim() and post_online().
Atoms are removed by modem core when the state changes.
2010-05-26 14:24:11 -05:00
Denis Kenzior 83fc72c95a core: Trivial whitespace error 2010-05-19 05:26:35 -05:00
Aki Niemi b8ec7553ef Add network time support
Adding a new notify function in the netreg atom for notifying a
received Network Identification and Timezone (NITZ) indication. This
data is consumed via a nettime plugin, of which there is also an
example.
2010-05-19 10:46:18 +03:00
Andrzej Zaborowski 018ee10f92 Fix: Don't remove wrong atoms
When the state goes from INSERTED to NOT PRESENT and we have not
advanced past the SIM PIN entry, we remove the pre_sim atoms.

Similarly, if we advanced past the SIM PIN stage and subsequently
removed the SIM, the pre_sim atom list should not be tampered with.
2010-05-10 15:26:09 -05:00
Denis Kenzior 88be6109a2 Fix: Don't crash by calling sim watch too early
The modem sim watch is only watching for removed and ready conditions,
so no need to call it prematurely
2010-04-15 16:49:43 -05:00
Denis Kenzior 214c7dd776 Fix: Make distcheck happy 2010-04-15 16:49:43 -05:00
Denis Kenzior 9a9a05095d Refactor: Keep separate lists for pre/post atoms 2010-04-15 16:49:42 -05:00
Denis Kenzior 0ac64d66e8 Refactor: use a switch/case to make more readable 2010-04-15 16:49:42 -05:00
Andrzej Zaborowski f27946b4b0 Remove post-sim atoms after SIM is extracted. 2010-04-15 16:49:42 -05:00
Andrzej Zaborowski aad4d0de78 Add Sim Toolkit atom
- Add ofono_stk atom in stk.c
- Move envelope command from sim driver to stk driver
2010-04-15 16:49:40 -05:00
Andrzej Zaborowski 22cbe98146 Extend sim-ready watch with card insert/eject 2010-04-15 16:49:40 -05: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 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 1b5c314f9a Refactor: Allow persisent modem names 2010-01-06 15:50:25 -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
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 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 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
Zhenhua Zhang 7254f8ac86 Fix: Reset call_ids when modem is powered off 2009-11-26 08:08:17 -06:00
Denis Kenzior 7600c4b3ac Fix: Emit Manufacturer, not Serial 2009-11-11 22:09:36 -06:00
Denis Kenzior 274cd012c4 Fix: Report registered modems properly 2009-09-28 11:18:50 -05:00
Denis Kenzior 863210f7c0 Fix: Comparison should be against negative errno 2009-09-22 09:36:55 -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 5e754c6518 Create watchlists during register 2009-09-11 14:06:18 -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
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
Marcel Holtmann 154102e873 Add modem properties for booleans 2009-09-08 09:12:19 +02: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 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 c7d35dd039 Add vendor flag capability to devinfo 2009-09-01 18:14:58 -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 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
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 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 f19d0cba4e Remove traces of sim_manager from modem.c 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 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 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
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 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 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 03e90fff16 Add ofono atom routines 2009-08-13 10:08:32 -05:00
Denis Kenzior 055c5c7450 No need to use g_timeout_add here 2009-08-07 19:51:23 -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 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 cb75833fc8 Rename ofono_modem_userdata 2009-07-29 16:44:16 -05:00
Denis Kenzior 4fbca244ea Make plugins use ofono_modem_get_path 2009-07-29 16:44:16 -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 be064f92a5 Rename modem_alloc_callid, modem_release_callid 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 9cd9338ba1 Rename dbus_gsm_dict_append_array 2009-07-29 12:26:05 -05:00
Denis Kenzior 6728542a01 Rename dbus_gsm_dict_append 2009-07-29 12:26:05 -05:00
Denis Kenzior d9025e13e1 Move & Rename PROPERTIES_ARRAY_SIGNATURE 2009-07-29 12:26:05 -05:00
Denis Kenzior 55787fe876 Rename dbus_gsm_signal_array_property_changed 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 db2a98ae5a Cleanup SimManager interface
Future-Proof own numbers support.  For now we only report voice numbers
Rename attributes to be a bit better
2009-05-26 18:20:03 -05:00
Andrzej Zaborowski 70fce6b551 Add SimManager interface.
Implement basic SIM filesystem utilities.

Obtain Service Provider Name EF-SPN record.

Make NetworkRegistration use SPN for PLMN display. This implements PLMN
display rules in 31.102 "EFSPN".
2009-05-26 18:15:51 -05:00
Andrzej Zaborowski e63c82e648 Add an API for a CSSI/CSSU notifications. 2009-05-12 19:09:57 -07:00
Denis Kenzior 95e9c0dcf2 Remove some other unused variables 2009-05-12 19:09:57 -07:00
Denis Kenzior a78b36290b Add implementation of telephony daemon 2009-05-05 21:14:19 -07:00