Commit graph

362 commits

Author SHA1 Message Date
Dan Williams 36740e0182 libnm-glib-vpn: minor soname bump for new nm-vpn-plugin-utils.c functions
1.0.0 -> 1.1.0
2011-03-10 00:49:09 -06:00
Dan Williams 02f676c001 libnm-glib: document secret agent request flags 2011-03-02 02:03:12 -06:00
Dan Williams 12d7ce39a0 libnm-glib: add modem device properties
Forgot these in 2140dad5e0
2011-02-25 12:06:40 -06:00
Dan Williams 2140dad5e0 core: consolidate mobile broadband device types
These days more and more devices are showing up that support a
number of different access technology families in the same hardware,
like Qualcomm Gobi (CDMA and GSM), Pantech UM190 (CDMA and GSM),
Pantech UML290 (CDMA and LTE), LG VL600 (CDMA and LTE), Sierra
320U (GSM and LTE), etc.  The previous scheme of having device
classes based on access technology family simply cannot handle
this hardware and attempting to add LTE to both the CDMA and GSM
device classes would result in a bunch of code duplication that
we don't want.  There's a better way...

Instead, combine both CDMA and GSM device classes into a generic
"Modem" device class that provides capabilities indicating what
access technology families a modem supports, and what families
it supports immediately without a firmware reload.  (Gobi devices
for example require a firmware reload before they can switch
between GSM and CDMA).  This provides the necessary flexibility
to the client and allows us to keep the API stable when the
same consolidation change is made in ModemManager.

The current code doesn't yet allow multi-mode operation internally,
but the API is now what we want it to be and won't need to be
changed.
2011-02-25 10:16:17 -06:00
Giovanni Campagna bd933b27a1 libnm-glib: never propagate garbage values to async callbacks (bgo #642819)
When a DBus error is received, the values of the other parameters
may be undefined, but bindings will assume they're valid and fail.
Capture this case and pass NULL to the callbacks.
Also, allow passing NULL instead of a callback, for bindings that
don't support the argument types.
2011-02-23 12:02:37 -06:00
Dan Williams eab5851145 libnm-util: remove nm_warning/nm_info/nm_error macros
Clients need to do their own logging using glib or whatever; these
macros while somewhat helpful were not flexible and are not a
substitute for actual logging in the client.  g_warning, g_message,
and g_error are more suitable anyway.
2011-02-23 11:42:04 -06:00
Giovanni Campagna e77acd43b6 libnm-glib: more GObject introspection fixes (bgo #181415)
Fix some annotations and add the necessary ones for new functions.
2011-02-21 18:11:21 -06:00
Giovanni Campagna 3b57350dd6 libnm-glib: add signal documentation for NMRemoteConnection 2011-02-21 18:08:41 -06:00
Dan Williams fe5d59bc87 libnm-glib: nm_device_wifi_get_capabilities() should return NMDeviceWifiCapabilities 2011-02-18 12:01:46 -06:00
Dan Williams 7a00376b30 libnm-glib: nm_device_get_capabilities() should return NMDeviceCapabilities 2011-02-18 11:59:27 -06:00
Dan Williams 5c8d27b07b libnm-glib: add nm_device_get_device_type() 2011-02-18 11:57:13 -06:00
Dan Williams 24c429e29e libnm-glib: return enums for NMAccessPoint flags accessors 2011-02-18 11:42:55 -06:00
Richard Hughes e765fce2b4 test: don't crash libnm-glib if there are no devices for an active connection 2011-02-18 11:31:45 -06:00
Richard Hughes 0b8dd709b0 test: don't crash libnm-glib-test if there aren't any APs 2011-02-18 11:30:36 -06:00
Dan Williams c17721b360 libnm-glib: allow manual processing of properties changed events
Mostly for handling the GetAll response.
2011-02-16 15:04:39 -06:00
Dan Williams ccfc034a0d libnm-glib: make _nm_object_cache_get() return a referenced object 2011-02-16 15:04:39 -06:00
Jiří Klimeš e7d2eb43f7 libnm-glib: add code to get "Version" property 2011-02-16 14:34:19 +01:00
Jiří Klimeš d6905a8d66 libnm-glib: add GError parameter to _nm_object_get_... functions
It allows us to get the error back and have control over printing
the error.
2011-02-15 17:34:11 +01:00
Dan Williams ec115ed442 api: add additional NM daemon states
DISCONNECTING: the only active network connection is now being disconnected
LOCAL, SITE, GLOBAL: one-stop items for level of connectivity, which
we'll use to show when we think we're actually connected to the internet
or behind a captive portal or something
2011-02-14 17:55:27 -06:00
Dan Williams a661f78890 api: remove deprecated methods and signals
sleep, wake, StateChange, all deprecated in 0.8, are now removed.

sleep & wake are replaced with the Sleep() method, while
StateChange is replaced with the StateChanged signal which has
the same arguments.
2011-02-14 17:33:16 -06:00
Jiří Klimeš ec4d126d5a libnm-glib/build: make WiMAX support optional 2011-02-14 16:08:00 +01:00
Dan Williams 14b2fe1477 libnm-glib: bump soname to indicate ABI break 2011-02-12 23:23:10 -06:00
Dan Williams 6d344a43e9 Merge remote-tracking branch 'origin/rm-userset'
There; it's merged.  Yay!
2011-02-12 22:51:12 -06:00
Dan Williams c7ec68e0ba libnm-glib: handle initially invisible connections correctly
Don't delete them if we don't have permission for them, since
we may get permission for them later via Update.  But to listen
for Update we need the connection around.
2011-02-12 22:00:30 -06:00
Dan Williams d94590a52c libnm-glib: fix connection visibility handling
When the connection becomes invisible to a user (ie, the permissions
of the connection no longer allow that user to view the connection)
then we have to hid the connection from clients.  But we can't
just dispose of it, because visibility changes are signaled with
Update signals on the connection itself, and thus we need to keep
the connection around just in case it becomes visible to the user
again.  But if it's invisible, make sure we clear out the settings
since they may have changed.
2011-02-12 21:48:30 -06:00
Dan Williams e386ebef39 libnm-glib: use define instead of string for Removed signal
Less error-prone and makes a mistype a compile error.
2011-02-11 22:26:10 -06:00
Dan Williams 016c56078d policy: rename HOSTNAME_MODIFY -> MODIFY_HOSTNAME for consistency 2011-02-11 11:32:57 -06:00
Dan Williams ba8f562836 policy: add a "modify own" permission for single-user-visible connections
This policy will allow users to modify their personal connections (ie
maybe VPN connections, etc) distinctly from system-wide connections that
affect more than just their user.  It makes sense to be more lenient when
making changes to settings that don't affect other users.
2011-02-11 11:31:14 -06:00
Dan Williams f2c317e3d2 policy: rename "modfiy" permission to "modify system"
Meaning stays the same, but this will allow us to differentiate
in the future between personal connections (ie, just visible to
one user) and system connections (visible to more than one user).
2011-02-11 11:19:02 -06:00
Dan Williams 76467e53e5 libnm-glib-vpn: add some helpers for auth dialogs
The helpers read and return the data items and secrets that the applet
sends to the auth dialog.
2011-02-10 18:48:32 -06:00
Jiří Klimeš 83dc4032b7 libnm-glib: fix comment/doc for nm_client_networking_get_enabled() 2011-02-10 15:20:56 +01:00
Dan Williams e68e27aa75 libnm-util: add 'flags' argument to nm_connection_to_hash() and nm_setting_to_hash()
Simplifies code internally, and makes it easier for clients as well in
some cases where they want to control what ends up in the resulting
hash and what does not.
2011-01-26 14:14:37 -06:00
Dan Williams b3959aefa3 core: rename NMSysconfigConnection -> NMSettingsConnection 2011-01-26 11:38:12 -06:00
Dan Williams b92e3cca6e build: fix distcheck with gobject introspection enabled 2011-01-26 11:26:08 -06:00
Dan Williams d1979ba63e secrets: simplify GetSecrets call flow
The Settings.Connection interface is now only provided by NetworkManager
itself since there is only one settings service.  NM can validate
requests for secrets internally and thus there's no need to lock down
GetSecrets using a separate D-Bus interface, since PolicyKit provides
that functionality on systems where this is desirable (ie multi-user).
Single-user systems that do not have PolicyKit will inherently trust
the user already, or if not D-Bus auth is flexible enough to lock
down the GetSecrets method individually even if it's not on a separate
D-Bus interface.

Second, since only clients like connection editors or applets will be
calling the GetSecrets method, there's no need for 'hints' or
'request_new' arguments here since this  method should never trigger
an interactive secrets request.  Only NM should send those requests
when it knows it needs to ask the user, either during connection or
after validating the incoming GetSecrets request.  A connection editor
type application should never be able to trigger the normal
"What's your passphrase" dialog thats provided by the secret agent
for that user's session.
2011-01-26 10:17:07 -06:00
Giovanni Campagna 3ebecd2a29 introspection: add GObject introspection support (bgo #637032)
Add the necessary annotations (the mininum required, that is those
on return values. NULL parameters or container types may require
more), and the Autotools stuff to get a NetworkManager GIR for
libnm-util and a NMClient for libnm-glib.
2011-01-21 14:46:09 -06:00
Giovanni Campagna c6bfe8edb6 libnm-glib: update symbol visibility list 2011-01-21 14:15:38 -06:00
Dan Williams 7ddf9c5e72 libnm-glib: implement NMSecretAgent autoregistration
Handles registering with NM and re-registering if NM restarts.
2011-01-19 16:59:01 -06:00
Dan Williams 9cf13cc3e1 agent: request_new -> flags
Use some flags to modify GetSecrets behavior instead of just the
request_new boolean.
2011-01-18 14:17:18 -06:00
Dan Williams cc88e4e51c trivial: fix a few small issues in the NMSecretAgent class 2011-01-18 13:21:02 -06:00
Dan Williams 30c7308e9d libnm-glib: implement agent secrets request cancelation 2011-01-18 13:20:34 -06:00
Dan Williams 7fa1a62cd3 libnm-glib: don't crash when adding new connections that aren't waited upon
If we're not waiting for this connection to show up after an
AddConnection operation, we don't need to touch anything
addinfo-related.
2011-01-17 23:19:25 -06:00
Dan Williams bb35e0a9e2 libnm-glib: make a few forgotten functions visible
Oops.
2011-01-13 17:29:54 -06:00
Dan Williams 61cc2494ad libnm-glib: add helper functions and callbacks to Secret Agent API
First, remove anything dbus-glib related from the public API and use
callbacks to handle returning secrets requested by D-Bus.  Second,
add helper functions so local code can use the same API to request
secrets.
2011-01-13 14:18:29 -06:00
Dan Williams 24915553fd libnm-glib: keep symbol visibility list alphabetized 2011-01-13 14:18:03 -06:00
Dan Williams 7779a3f151 libnm-glib: add NM_SECRET_AGENT_ERROR_NO_SECRETS 2011-01-13 13:43:26 -06:00
Dan Williams a3d4688431 libnm-glib: add NM_SECRET_AGENT_ERROR_INTERNAL_ERROR 2011-01-13 13:42:01 -06:00
Dan Williams b5f3aa7120 libnm-glib: pass NMClient as first callback argument to activation callbacks
Better matches glib style.
2011-01-13 13:03:02 -06:00
Dan Williams f9ceafd4a1 Merge remote branch 'origin/master' into rm-userset 2011-01-12 15:46:37 -06:00
Dan Williams 7de13fa58d libnm-glib: fix library builds
Duh, don't specify noinst_LTLIBRARIES twice...
2011-01-12 13:24:22 -06:00