Commit Graph

3500 Commits

Author SHA1 Message Date
Aleksander Morgado
74145f5af7 port-probe: new MMPortProbe object 2012-03-15 14:14:20 +01:00
Aleksander Morgado
916cf5dd3e manager: integrate the Plugin Manager
All plugin handling and port support checks now done by the Plugin Manager.
2012-03-15 14:14:20 +01:00
Aleksander Morgado
fad89b1d7e plugin-manager: new methods to check for ongoing port support operations
The new mm_plugin_manager_is_finding_port_support() allows to check whether the
Plugin Manager is looking for support in a specific port.

The new mm_plugin_manager_is_checking_device_support() allows to check whether
the Plugin Manager is looking for support in any port of a given device.
2012-03-15 14:14:20 +01:00
Aleksander Morgado
5f2d0d474c plugin-manager: allow suggesting a plugin when launching support checks
The newly launched support check will start probing with the suggested plugin
right away.
2012-03-15 14:14:20 +01:00
Aleksander Morgado
8fed241767 plugin-manager: propagate support check results to tasks in the same device
As soon as the first support check of a port in a given device finishes with a
valid best plugin and level > 0, propagate the result to other support tasks
corresponding to ports in the same physical device.

Previously, this propagation of support check results was only done once the
port was grabbed by a plugin, not just when the plugin reported that it
supported it. This change in behaviour isn't probably a big deal, as there
should not be any case where a plugin says it supports a port and then cannot
grab it.
2012-03-15 14:14:20 +01:00
Aleksander Morgado
0626de0879 plugin-manager: keep track of all launched support checks
We will keep a reference to each of the support checks currently in progress,
grouped by physical device path. The stored SupportsInfo structs as well as
the support check operations, are guaranteed to be kept valid as long as the
Plugin Manager exists. Or in other words, the Plugin Manager cannot be disposed
if there is still an ongoing supports check operation.
2012-03-15 14:14:19 +01:00
Aleksander Morgado
1e32139707 plugin-manager: new method to look for best plugin supporting a given port
The new `mm_plugin_manager_find_port_support()' method requests the Plugin
Manager to iterate over the list of plugins internally handled, launching
supports task for the given port in each of them.

The method is fully asynchronous, and the result can be retrieved with
`mm_plugin_manager_find_port_support_finish()' once the operation is ready.
2012-03-15 14:14:19 +01:00
Aleksander Morgado
7007825781 plugin-manager: ensure we always print paths in UTF-8
There is little chance of having a PLUGINDIR which is not UTF-8, but it may
happen, and g_log() won't like it.
2012-03-15 14:14:19 +01:00
Aleksander Morgado
035be28730 plugin-manager: find and load plugins when the manager object is created
Ported the plugin finding and loading code from the MMManager object.
2012-03-15 14:14:19 +01:00
Aleksander Morgado
51a8dc6ff3 plugin-manager: let it be initable
Looking for plugins and loading them will be done during the object creation,
so the operation may fail and we need to report it.
2012-03-15 14:14:19 +01:00
Aleksander Morgado
03655fcf9f plugin-manager: new MMPluginManager object 2012-03-15 14:14:19 +01:00
Aleksander Morgado
62030debf2 plugin-base: rename 'cancel_supports_port' to 'supports_port_cancel'
We now have 'supports_port' (async method) and 'supports_port_finish' (to get
the result of the async method), so it makes sense to rename the method to
'supports_port_cancel'.
2012-03-15 14:14:19 +01:00
Aleksander Morgado
dc30536456 plugin-base: rewrite port supports check as fully asynchronous
Before this change, supports check was either synchronous (e.g. in some
UNSUPPORTED cases) or asynchronous (when IN_PROGRESS was returned).

With this fix, the supports check requested to the plugin will always be
completed asynchronously; either directly in an idle before launching any real
probing operation, or once the probing operation is finished.

Therefore, it is not expected to get a IN_PROGRESS reply in
mm_plugin_supports_port_finish(), only UNSUPPORTED|SUPPORTED|DEFERRED.
2012-03-15 14:14:19 +01:00
Aleksander Morgado
d47176a32c core: avoid using DBusGMethodInvocation in auth API
While porting to GDBus, use opaque pointers. This allows us to include either a
DBusGMethodInvocation or a GDBusMethodInvocation in the 'context' pointer.

Once fully ported to GDBus, we can safely change it back to make the context be
a GDBusMethodInvocation.
2012-03-15 14:14:19 +01:00
Aleksander Morgado
1e79a2d292 build: install DBus service and data files for the new API 2012-03-15 14:14:19 +01:00
Aleksander Morgado
8d97538c72 build: setup all data (polkit, icon, dbus...) in the same `data' directory
Also fixed dist when not using polkit, the icon was no longer included in the
tarball.
2012-03-15 14:14:19 +01:00
Aleksander Morgado
6b69605633 build: chain up new 0.6 API and link against libmm-common
Also removed the MMSerialError implementation from `src/mm-errors.[h|c]', as it
is now included in the new `include/ModemManager-errors.h' header file. All the
other enums and errors without clashing names will be ported afterwards to the
new base code.
2012-03-15 14:14:19 +01:00
Aleksander Morgado
49bbaf8e31 build: disable autogeneration of the 0.5 API header file
But keep it around as a static file, while we do the migration to the new
interface.
2012-03-15 14:14:19 +01:00
Aleksander Morgado
3b976c4399 docs: added new man page for the modem-manager daemon 2012-03-15 14:14:19 +01:00
Aleksander Morgado
09f40c8369 docs: setup generation of gtk-doc based DBus API documentation
It includes gdbus-codegen generated API documentation, plus the common Enums,
Flags and Errors, which will also be used in libmm-glib.
2012-03-15 14:14:19 +01:00
Aleksander Morgado
a57c3bcf36 docs: remove generation of previous DBus API documentation 2012-03-15 14:14:18 +01:00
Aleksander Morgado
23367c7186 libmm-common: include Errors type information
The code to handle the Errors type information is automatically built with
`glib-mkenums' and the new templates kept under `build-aux'.
2012-03-15 14:14:18 +01:00
Aleksander Morgado
0e9ed6e5fe libmm-common: include Enums and Flags type information
The code to handle the Enums and Flags type information is automatically built
with `glib-mkenums' and the new templates kept under `build-aux'.

Note: We currently skip the type information of `MMModemBand'. GFlagsValue
can hold only 32-bit types, and we're working with a 64-bit flag here.
See: https://bugzilla.gnome.org/show_bug.cgi?id=663054
2012-03-15 14:14:18 +01:00
Aleksander Morgado
ade484826c libmm-common: setup new library, with the gdbus-codegen generated code
This library will not (probably) be installable, but will share the GDBus
and new Enum/Flag/Error type support between the core daemon and the new
libmm-glib library.
2012-03-15 14:14:18 +01:00
Aleksander Morgado
da99e8ddad build: use common CPPFLAGS and LDFLAGS for all plugins
Also include $(top_srcdir)/generated and $(top_builddir)/generated in the
common preprocessor flags.
2012-03-15 14:14:18 +01:00
Aleksander Morgado
bb7311f27c build: improve project bootstrapping
Align autogen.sh with the one in NM:
  * Just calling autoreconf once
  * Using autopoint from GNU gettext
  * Enabling the use of NOCONFIGURE
2012-03-15 14:14:18 +01:00
Aleksander Morgado
7e0f016c25 build: improve configure output report 2012-03-15 14:14:18 +01:00
Aleksander Morgado
917a13217a build: avoid using -Wfloat-equal compilation option
In order to compile code generated by gdbus-codegen.
2012-03-15 14:14:18 +01:00
Aleksander Morgado
bc8010f792 build: avoid using -Wshadow compilation option
In order to compile code generated by gdbus-codegen.
2012-03-15 14:14:18 +01:00
Aleksander Morgado
dbb06b6246 build: require GLib and GIO >= 2.30
gdbus-codegen is first available in the stable 2.30 release of GLib, see
http://mail.gnome.org/archives/gtk-devel-list/2011-September/msg00218.html

GIO and GIO-Unix are now required during the build.
2012-03-15 14:14:18 +01:00
Aleksander Morgado
b5a1c38cc4 api: new `include/ModemManager1.h' as main header of the new API
Filename is temporary as we keep the old `include/ModemManager.h' around during
the transition to the new codebase.
2012-03-15 14:14:18 +01:00
Aleksander Morgado
ff5ea7b76a build: setup autogeneration of names header for the new API
The `include/ModemManager-names.h' autogenerated header includes the list of
Interface, Method, Signal and Property names defined in the DBus API.
2012-03-15 14:14:18 +01:00
Aleksander Morgado
365b906a3e build: setup header generator in its own include/Makefile
Also move helper files to the new `build-aux' directory.
2012-03-15 14:14:18 +01:00
Aleksander Morgado
4643dca4a2 api,errors: implement all errors from the new API
Errors that will/may be reported via DBus are defined in the public interface
header.
2012-03-15 14:14:18 +01:00
Aleksander Morgado
ff86bc9f4a api,enums: new enum for the USSD session state 2012-03-15 14:14:18 +01:00
Aleksander Morgado
55eb1f0c50 api,enums: new enum for the 3GPP network availability 2012-03-15 14:14:18 +01:00
Aleksander Morgado
4cdbaa5de3 api,enums: implement all enums and flags from the new API 2012-03-15 14:14:17 +01:00
Aleksander Morgado
8763576a34 api,dbus: rewrite Methods, Properties and Signals for gdbus-codegen 2012-03-15 14:14:17 +01:00
Aleksander Morgado
793c65705f api,dbus: Bearer interface not implemented by modems
Keep the Bearer interface out of the 'Modem' subtree in the interface hierarchy,
as it will be specific for Bearer objects, not implemented by Modem objects.
2012-03-15 14:14:17 +01:00
Aleksander Morgado
3599e396b9 api,dbus: SMS interface not implemented by modems
Keep the SMS interface out of the 'Modem' subtree in the interface hierarchy,
as it will be specific for SMS objects, not implemented by Modem objects.
2012-03-15 14:14:17 +01:00
Aleksander Morgado
592cd21f61 api,dbus: fix SignalQuality property signature so that it's a (ub) tuple 2012-03-15 14:14:17 +01:00
Aleksander Morgado
4fbe13a73f api,dbus: simplified the Manager API, as we will use the standard ObjectManager
The recent `org.freedesktop.DBus.ObjectManager' standard API defines a common
way to handle a list of objects in the interface. It allows getting all objects,
interfaces and properties in a single method call.

See:
http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager
2012-03-15 14:14:17 +01:00
Aleksander Morgado
89090013f2 api,dbus: let IMSI, OperatorIdentifier and OperatorName be properties in the SIM interface 2012-03-15 14:14:17 +01:00
Aleksander Morgado
35abbd6dd5 api,dbus: use long property names in the 3GPP DBus interface 2012-03-15 14:14:17 +01:00
Aleksander Morgado
432df3349f api,dbus: fix signature of the Scan() method in the 3GPP DBus interface
The Scan() method returns an array of dictionaries, where each dictionary is
defined by a string key plus a variant data (not a string data). This is to
handle the "status" and "access-tech" entries, which are given as unsigned
integers.
2012-03-15 14:14:17 +01:00
Aleksander Morgado
f7390c328b api,dbus: use long property names in the CDMA DBus interface 2012-03-15 14:14:17 +01:00
Aleksander Morgado
60e824bd59 api,dbus: let UnlockRequired property be an enum instead of a string
We were already working with a fixed set of possible strings, so better to have
an enumeration for that.
2012-03-15 14:14:17 +01:00
Aleksander Morgado
022ceae0d8 api,dbus: new `Plugin' property in the Modem interface
Will hold the name of the plugin managing the modem.
2012-03-15 14:14:17 +01:00
Aleksander Morgado
c164246642 tests: serial port tests don't need errors header 2012-03-15 14:14:17 +01:00
Dan Williams
8f5cd49361 release: bump version to 0.7.0 (devel for 0.8.x stable) 2012-03-14 11:11:26 -05:00