Commit Graph

79 Commits

Author SHA1 Message Date
Dan Williams
4cae0bb0fa settings: add a GetConnectionByUuid method
If the client knows the UUID, add a convenience function to get
the connection path directly, instead of having to iterate the
whole connection list and get each connection's details and then
check the UUID.
2011-04-22 12:29:07 -05:00
Dan Williams
fbf118e58e libnm-glib: documentation update for nm_remote_settings_list_connections() 2011-03-10 17:46:51 -06:00
Dan Williams
fa48970b4e libnm-glib: fix reply processing of AddConnection calls
It really is an object path, folks.
2011-03-10 02:03:25 -06:00
Dan Williams
d35bf585d2 libnm-glib: fix bogus free
Apparently dbus-glib will pass non-NULL parameters to proxy
callbacks in the error case, so we've got to make sure we don't
touch any return parameters if there's been an error.
2011-03-10 01:35:09 -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
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
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
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
dd6d72d6a1 libnm-glib: handle errors on AddConnection reply 2010-12-28 16:40:07 -06:00
Dan Williams
ad9270da79 libnm-glib: ensure connection is initialized before AddConnection callback 2010-12-27 15:03:44 -06:00
Dan Williams
37845af954 settings: return new connection object path from AddConnection
Finally.
2010-10-29 14:34:33 -05:00
Dan Williams
3945f75bda core: consolidate all permissions checking into main D-Bus interface
Moves the system settings permissions checking into the core service's
permissions checking, which at the same time enables 3-way permission
reporting (yes, no, auth) instead of the old yes/no that we had for
system settings permissions before.  This allows UI to show a lock
icon or such when the user could authenticate to gain the permission.

It also moves the wifi-create permissions' namespace to the main
namespace (not .settings) since they really should be checked before
starting a shared wifi connection, rather than having anything to do
with the settings service.
2010-08-26 14:26:12 -05:00
Dan Williams
022d8e665c Merge remote branch 'origin/master' into gsoc 2010-08-26 09:18:37 -05:00
Dan Williams
98bd78c93b libnm-glib: better handling of missing user settings service
If it's not running or we can't spawn it (it's not supposed to be
autospawned anyway) we should just ignore the error and poke clients
that we've tried and failed to get user settings instead of warning
with an annoying message.
2010-08-10 15:47:55 -05:00
Daniel Gnoutcheff
f98e2528a6 NetworkMangerSettings -> NetworkManager.Settings
Just for consistency, make settings related stuff live under the
org.freedesktop.NetworkManager namespace, rather than its own
org.freedesktop.NetworkManagerSettings namespace. Renames are done for
DBus interface names, DBus object paths, and polkit actions.
2010-08-07 01:19:46 -04:00
Daniel Gnoutcheff
fb96309899 DBus: merge NetworkManger{,SystemSettings}
Remove the org.freedesktop.NetworkManagerSystemSettings bus name and
have everybody talk to org.freedesktop.NetworkManager. Now that we have
a single settings service that's embedded in the main daemon, we don't
need separate names anymore.
2010-08-07 01:19:46 -04:00
Daniel Gnoutcheff
c2f4b10ab5 libnm-glib: remove NMSettingsInterface
NMSettingsInterface was created to allow code to operate on a settings
service without caring about what kind of settings service it was. Now
that we have just one settings service, this is no longer needed.

More work needs to be done in order to handle errors and permission
settings in an appropriate manner.
2010-08-06 13:05:47 -04:00
Daniel Gnoutcheff
da6816a03b nm-glib/DBus: merge nm-settings{,-system} iface
Much as with nm-remote-settings and nm-remote-settings-system, the
removal of user settings services means there is no more need for
separate interfaces for user and system settings services.

In libnm-glib, this commit merges everything in
nm-settings-system-interface into nm-settings-interface.  Alongside with
that, we merge everything in the
org.freedesktop.NetworkManagerSettings.System DBus interface into
org.freedesktop.NetworkManagerSettings.
2010-08-06 13:05:46 -04:00
Daniel Gnoutcheff
4d1681ef09 libnm-glib: merge nm-remote-settings{,-system}
Originally, nm-remote-settings was used by the daemon to monitor the
user settings service, and its subclass nm-remote-settings-system was
used by NM clients to monitor the system settings service. With user
settings services gone, this distinction is no longer needed. Simplify
things a bit and merge the classes.
2010-08-06 13:05:46 -04:00
Daniel Gnoutcheff
fa8c9304b5 libnm-*: remove user settings support
Remove code related to "connection scope" and such. Later, we will also
do lots of code flattening and simplification that's possible now that
user settings are gone.
2010-08-06 13:05:46 -04:00
Dan Williams
0ad8fc1adc libnm-glib: use max timeout for settings dbus calls
These calls may require authentication, and thus could be in-progress
for much longer than the default D-Bus timeout, which is pretty short.
2010-04-25 22:48:10 -07:00
Dan Williams
9e356dab83 libnm-glib: fix warning tearing down connections
GLib-CRITICAL **: g_hash_table_iter_next: assertion `ri->version == ri->hash_table->version' failed
2009-10-20 11:36:47 -07:00
Witold Sowa
b20cef2e1b libnm-glib: add 'connections-read' signal to settings interface
To let listeners know when all connections have been found.
2009-09-22 23:44:45 -07:00
Witold Sowa
ac03cbce04 libnm-glib: add service-running property to NMRemoteSettings
So that users can actually tell if the remote service is running or not.
It doesn't have to be when the object is created.
2009-09-22 23:29:02 -07:00
Dan Williams
d26b436d9e libnm-glib: NMSettingsInterface::add_connection() should take an NMConnection
instead of an NMSettingsConnectionInterface, because we won't always have an
object that implements NMSettingsConnectionInterface.  Plus, since NMConnection
is a prerequisite of NMSettingsConnectionInterface, the NMConnection will
always be there anyway.
2009-08-11 14:12:48 -05:00
Dan Williams
cb0303180d libnm-glib: don't expose NMRemoteConnetions until they are valid
Give them time to get their settings from the remote settings service
first, then let subclasses/users/whatever know about them.
2009-08-11 10:33:13 -05:00
Dan Williams
0d69dfe39e libnm-glib: implement new settings interfaces
The old NMExportedConnection was used for both client and server-side classes,
which was a mistake and made the code very complicated to follow.  Additionally,
all PolicyKit operations were synchronous, and PK operations can block for a
long time (ie for user input) before returning, so they need to be async.  But
NMExportedConnection and NMSysconfigConnection didn't allow for async PK ops
at all.

Use this opportunity to clean up the mess and create GInterfaces that both
server and client objects implement, so that the connection editor and applet
can operate on generic objects like they did before (using the interfaces) but
can perform specific operations (like async PK verification of callers) depending
on whether they are local or remote or whatever.
2009-07-23 09:20:52 -04:00