Given connection details, complete the connection as well as possible
using the given specific object and device, add it to system
settings, and activate it all in one method.
Default to 'not allowed', distros that need backwards compatibility
can flip this to 'yes' if they need to. At this point, only power
management scripts should call these functions.
Since forever we've used sleep/wake as the way to implement
Networking Enabled. When the state file was introduced to make the
networking and wifi states persistent, we ran into a bug where
a failed suspend (like if the machine ran out of power while
suspended) would result in networking being disabled on reboot
since suspend/resume used the same knob as enable/disable.
This patch adds a distinct call for enable/disable networking
which changes the state file, while sleep/wake no longer change
the state file.
* introspection/nm-manager.xml
introspection/nm-manager-client.xml
- (ActivateConnection): return the object path of the active connection
on success
- (GetActiveConnections): remove
- (DeactivateConnection): new function; deactivate a currently active
connection
- Add an ActiveConnections property which returns an array of
active connection object paths
* introspection/nm-device.xml
- (Deactivate): remove
* introspection/all.xml
- Add ActiveConnection introspection
* introspection/nm-active-connection.xml
- Add the ActiveConnection object
* include/NetworkManager.h
- Add the Connection.Active D-Bus interface
* src/nm-device-interface.c
- (impl_device_deactivate): remove
* src/nm-activation-request.c
src/nm-activation-request.c
src/Makefile.am
- Implement the Connection.Active D-Bus interface
* src/nm-manager.c
- (get_property, nm_manager_class_init): add ACTIVE_CONNECTIONS property
- (nm_manager_activate_device): return the active connection path
- (connection_added_default_handler, impl_manager_activate_connection):
return the active connection to the caller
- (add_one_connection_element, impl_manager_get_active_connections):
remove
- (impl_manager_deactivate_connection): new function; deactivate an
active connection
* libnm-glib/nm-device.c
libnm-glib/nm-device.h
- Remove Deactivate() function
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3484 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* introspection/nm-manager.xml
introspection/nm-manager-client.xml
- Rename the ActivateDevice method to ActivateConnection to better
reflect it's usage; it's arguments get reordered a bit too
- Convert GetActiveConnections method return from a struct to a dict
* include/NetworkManager.h
- Define the dict keys for return value of GetActiveConnections
* src/nm-manager.c
- impl_manager_activate_device -> impl_manager_activate_connection
- (add_one_connection_element): return a populated hash table, not
a structure
* libnm-glib/nm-client.c
libnm-glib/nm-client.h
- nm_client_activate_device -> nm_client_activate_connection
- nm_client_free_active_connection_element -> nm_client_free_active_connections_element
- (nm_client_get_active_connections): return a GSList of GHashTables,
instead of the custom structures. Each element of the returned list
must be freed with nm_client_free_active_connections_element()
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3482 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Change manager's StateChange signal to StateChanged for consistency.
* introspection/nm-manager.xml
- Add 'StateChanged' signal
- Move 'StateChange' down to the deprecated section
* src/nm-hal-manager.c
- (nm_hal_manager_new): connect to 'state-changed' instead
* src/NetworkManagerPolicy.c
- (nm_policy_new): connect to 'state-changed' instead
* src/nm-manager.c
src/nm-manager.h
- (nm_manager_update_state): emit both 'state-changed' and 'state-change'
- (nm_manager_class_init): add 'state-changed' and not the deprecation
of 'state-change'
* libnm-glib/nm-client.c
libnm-glib/nm-client.h
- (constructor, nm_client_class_init, client_state_changed_proxy):
track and proxy 'state-changed' instead of 'state-change'
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3393 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Patch from Will Stephenson <wstephenson@kde.org>
* Makefile.am
configure.in
- Set up spec autogeneration infrastructure
* docs/NetworkManager DBUS API.txt
- Note how old this doc is and where to look for the canonical
D-Bus specification
* introspection/*
- Add annotations and comments
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3345 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Implement killswitch polling through HAL.
* src/nm-manager.c: Add wireless hardware status property. Add
'properties-changed' signal for changes in wireless and wireless
hardware
state changes.
* src/nm-hal-manager.c: Poll hal for killswitch statuses in
* every 6 seconds
and update NMManager's wireless hardware state when it has
changed.
(nm_hal_manager_new): Don't try to add initial devices here -
(hal_init)
already does that.
* libnm-glib/nm-client.c: Add wireless hardware status property.
* Cache the
values of wireless state and wireless hardware state. Listen for
the
'properties-changed' signals, update the cached values and emit
notify.
* include/NetworkManager.h: Fix a typo in a comment.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2975 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Add a GetActiveConnections() method on the Manager object.
* src/nm-manager.c
src/nm-manager.h
introspection/nm-manager.xml
- (connection_get_settings_cb): keep connection type around too
- (impl_manager_get_active_connections, add_one_connection_element):
implement; returns all active connections and what devices they
apply to
* libnm-glib/nm-client.c
libnm-glib/nm-client.h
introspection/nm-manager-client.xml
- (nm_client_get_devices): GPtrArray elements are allocated and owned
by the caller; free here to avoid memory leak
- (nm_client_get_active_connections): implement; return the list of
active connections
- (nm_client_free_active_connection_element): implement; free an element
of the GSList returned by nm_client_get_active_connections()
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2927 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-manager.c:
* src/nm-manager.h:
Implement device activation through NMManager.
Implement "pending device activation" here - If the connection
isn't found,
we try to wait for up to 5 seconds for the connection to be
provided.
Add NMConnectionType argument to "connection-added" and
"connection-removed"
signals.
(nm_manager_get): Remove. Finally.
* src/nm-activation-request.c:
* src/nm-activation-request.h:
Remove all the deferred activation code.
* src/nm-device.c: Remove all the deferred activation code. Once
* the device
activation is started, it's started. Update the activation
virtual function
signature.
* src/nm-device-interface.c:
* src/nm-device-interface.h:
Device activation now takes only NMActRequest argument.
Don't expose device activation directly on dbus, it's supposed
to go through
NMManager now.
* src/NetworkManagerPolicy.c (nm_policy_device_change_check):
* Make the code
a bit more compact.
Use the new device activation methods through NMManager.
* introspection/nm-manager-client.xml:
* introspection/nm-manager.xml:
* libnm-glib/nm-client.c:
* libnm-glib/nm-client.h:
Add device activation method.
* libnm-glib/nm-device.c:
* libnm-glib/nm-device.h:
* introspection/nm-device.xml:
Remove device activation method. It's done through NMManager
now.
* src/vpn-manager/nm-vpn-manager.c (impl_vpn_manager_connect):
* Use the shiny
new (nm_manager_get_device_by_path) function, get rid of our own
)find_device).
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2915 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* libnm-glib/Makefile.am: Use nm-manager-client.xml to produce
* nm-client-bindings.
* introspection/nm-manager-client.xml: Add a horrible horrbile
* hack to work around
an issue with dbus-glib bindings generator. The issue is, the
generated C caller
functions for dbus methods "Sleep(bool)" and "sleep()" both have
the same function
name and different arguments and it won't compile anymore. To
fix this, we now have
two copies of nm-manager.xml file. nm-manager.xml contains the
actual interface,
that is new API + compatibility API and used by the daemon. The
other,
nm-manager-client.xml is only the new API without compatibility
bits and is used
by libnm-glib to make it compile.
* introspection/nm-manager.xml: Define compatibility methods
* (sleep, wake, state).
* src/nm-manager.c (impl_manager_legacy_sleep)
(impl_manager_legacy_wake, impl_manager_legacy_state): Implement
the compatibility
interface functions for 0.6 branch.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2688 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Totally break NetworkManager. Please use 0.6 branch until futher notice.
* src/:
- Remove old low-level dbus interface implementations and replace them
with dbus-glib one.
* configure.in:
- Require dbus-glib >= 0.72.
- Plug in new sources to build.
* libnm-glib/:
- Implement GObject wrappers on top of DBUS glib auto-generated bindings
to make it more convenient to use from GObject based programs.
* introspection/:
- Implement DBUS XML introspection files, used by both NM and libnm-glib.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2309 4912f4e0-d625-0410-9fb7-b9a5a253dbdc