| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
Add generic handling for "properties" that consist of a "Get" method,
an "Added" signal, and a "Removed" signal, reusing some of the code
for handling object-array-valued properties. And load the values of
pseudo properties from _nm_object_reload/ensure_properties as well.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add an "object_type" field to NMPropertiesInfo, and use that with
DBUS_TYPE_G_OBJECT_PATH and DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH
properties so that we don't need custom marshallers for each one.
When creating an NMDevice or NMActiveConnection, we need to fetch an
extra property first to figure out the exact subclass to use, so add a
bit of infrastructure for that as well. Also, do that preprocessing
asynchronously when processing a property change notification, so that
it doesn't block the main loop.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rather than having every property getter method have code to fetch
that specific property's value, just call the new
_nm_object_ensure_inited() (which makes sure that we've read all the
property values on the object at least once), and then return the
cached value. (After we've read the initial property values, the
PropertiesChanged signal handler will ensure that the values are kept
up to date, so we can always just return cached property values after
that point.)
This then lets us get rid of _nm_object_get_property() and its
wrappers.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename _nm_object_handle_properties_changed(), etc, to be about
properties in general, rather than just property changes.
Interpret func==NULL in NMPropertiesInfo as meaning "use
_nm_object_demarshal_generic", and then reorder the fields so that you
can just leave that field out in the declarations when it's NULL.
Add a way to register properties that exist in D-Bus but aren't
tracked by the NMObjects, and use that for NMDevice's D-Bus Ip4Address
property, replacing the existing hack.
Also add a few other missing properties noticed along the way.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Since D-Bus doesn't allow NULL or zero-length object paths, NM
uses "/" as a placeholder here. Make sure the generic marshalling
code handles that so we don't have to do it in multiple places and
simplify handling of NULL objects somewhat.
|
| |
|
|
|
|
| |
Mostly for handling the GetAll response.
|
|
|
|
|
| |
It allows us to get the error back and have control over printing
the error.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
The caller needs to be authenticated, so wait a bit to be sure
it didn't quit too quickly.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If an NMObject listened to property change notifications from
other NMObjects and then in response to that queued up other
property changes of it's own, those would get added to the
property change list that was being iterated through already.
Each name in the change list is freed after being notified,
but the change list itself is actually freed when all
properties have been notified. So an object that queues up
another change notification ends up in _nm_object_queue_notify()
which iterates the change list where half of the data elements
are already freed...
|
|
|
|
|
|
| |
Should be checking for dbus-glib errors of the right type,
instead of any error code (dbus-glib or not) that happens to be
4.
|
| |
|
|
|
|
|
|
|
|
| |
Relicense libnm-glib to LGPLv2+ with agreement from contributors
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4285 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
|
|
|
|
| |
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4012 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Start documenting libnm-glib public API using gtk-doc.
* libnm-glib/nm-serial-device.c:
* libnm-glib/nm-object.c:
* libnm-glib/nm-gsm-device.c:
* libnm-glib/nm-device.c:
* libnm-glib/nm-device-wifi.c:
* libnm-glib/nm-device-ethernet.c:
* libnm-glib/nm-client.c:
* libnm-glib/nm-cdma-device.c: Document the public API.
* docs/libnm-glib/libnm-glib.types: Implement.
* docs/libnm-glib/Makefile.am: Implement.
* autogen.sh:
* configure.in:
* Makefile.am: Add gtk-doc support.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3932 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
|
|
|
|
| |
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3867 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* nm-object.c
- (nm_object_queue_notify): don't notify multiple times for the same
property
* nm-object-private.h
- (handle_ptr_array_return): return NULL if the given array is NULL or
if it has zero elements
* nm-ip4-config.c
- (finalize): use g_ptr_array_foreach() when freeing domains
- (nm_ip4_config_get_domains): use handle_ptr_array_return()
* nm-active-connection.c
- (nm_active_connection_get_devices): use handle_ptr_array_return()
* nm-device-802-11-wireless.c
nm-device-802-11-wireless.h
- (nm_device_802_11_wireless_get_access_points): return const; use
handle_ptr_array_return()
* nm-types.c
- (nm_object_array_demarshal): always create an array, even of length
zero, to distinguish between "NM returned no items" and "haven't
asked NM yet"
* nm-client.c
- (dispose): free active connections too
- (proxy_name_owner_changed): free active connections too when NM goes
away
- (nm_client_get_devices): return const; use handle_ptr_array_return()
- (nm_client_get_active_connections): use handle_ptr_array_return()
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3506 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
|
|
|
|
|
|
|
|
|
|
|
|
| |
* libnm-glib/nm-object.c
libnm-glib/nm-object-private.h
- (nm_object_queue_notify): add helper to batch & postpone GObject notify
signals to an idle handler
- (nm_object_get_property): add a timeout to the D-Bus method call
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3501 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Massive fixup of libnm-glib to:
a) have all objects (with the exception of VPN) cache their properties and
update them asynchronously on PropertiesChanged signals from NM
b) return internal const data for most attributes/properties instead of
allocated values that the caller must free
c) cache wrapped objects such that a given D-Bus path will always map to the
same GObject returned by libnm-glib
d) remove a few signals and move them to GObject property notifications
e) match recent NM D-Bus API changes for activation/deactivation
f) remove some private functions from libnm-glib headers
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3491 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
|
|
|
|
|
|
|
|
|
|
|
| |
Noticed by Christian Persch <chpe@gnome.org>
Always chain up to parent object in dispose and finalize handlers.
(gnome.org #433112)
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3154 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
|
|
|
|
|
|
|
|
| |
* Fix warnings so everything compiles with --enable-more-warnings
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3108 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
|
|
|
|
| |
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3052 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rework the "properties-changed" signal listening implementation.
Add a generic implementation to NMObject class that listens for
the signal and calls property setters of the target NMObject.
* libnm-glib/nm-object.c (nm_object_handle_properties_changed):
* Implement.
* libnm-glib/nm-device-802-11-wireless.c: Move the GObject
* consturction
code to the end of file so that all the static functions are
available
without extra declarations.
Remove the "properties-changed" signal handling and use the
framework from
NMObject.
Implement property setters for properties that change with
"properties-changed" signal.
* libnm-glib/nm-access-point.c: Ditto.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2972 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* libnm-glib/nm-object.c
- (nm_object_get_string_property, nm_object_get_object_path_property,
nm_object_get_int_property, nm_object_get_uint_property,
nm_object_get_boolean_property, nm_object_get_byte_property,
nm_object_get_double_property, nm_object_get_byte_array_property):
clear GValues after copying their contents, fixes memory leaks
after every property access because dbus-glib copies the values
from the DBusMessage into the GValue already.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2767 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
|
|
|
|
| |
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2755 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[Based on patch by Helmut Schaa <hschaa@suse.de>]
* libnm-glib/nm-client.h:
* libnm-glib/nm-object.h:
* libnm-glib/nm-vpn-connection.h:
* libnm-glib/nm-settings.h:
* libnm-glib/nm-device.h:
* libnm-glib/nm-ip4-config.h:
* libnm-glib/nm-access-point.h:
* libnm-glib/nm-device-802-3-ethernet.h:
* libnm-util/nm-setting.h:
* libnm-util/nm-connection.h: Add G_BEGIN_DECLS / G_END_DECLS to
* support C++.
* libnm-glib/nm-object.c (nm_object_get_byte_property):
* Implement.
* libnm-glib/nm-access-point.c: Strength has type char.
* gnome/vpn-properties/Makefile.am: Remove
* GNOME_DISABLE_DEPRECTATED for now
to fix build. GnomeDruid is deprecated in recent libgnomeui.
* introspection/nm-access-point.xml: Strength property is char,
* not int.
* src/NetworkManagerAP.c (set_property): Set strength from char.
(get_property): Handle hidden APs (with empty SSID).
Get strength value from char.
(nm_ap_class_init): Strength property has char type.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2659 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
|
|
|
|
|
|
|
|
|
|
| |
* Make SSIDs GByteArrays everywhere
* Rename "essid" -> "ssid" everywhere that's appropriate
* Refcount activation_ap member of the 802.11 wireless device class
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2620 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
|
|
* libnm-glib/nm-object.[ch]: Add these to the SVN, oops.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2619 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
|