summaryrefslogtreecommitdiff
path: root/libnm/nm-client.h
Commit message (Collapse)AuthorAgeFilesLines
* auth: check when setting statistics refresh rateAlfonso Sanchez-Beato2016-08-171-1/+4
|
* permissions: properly add checkpoint-rollback permissionThomas Haller2016-08-171-1/+3
| | | | Fixes: a52d4654ec4d3afbbb0ef70ada55f4a5ddac92db
* libnm/client: emit signals when active connection disappearsLubomir Rintel2016-07-071-0/+2
| | | | It allows us to reliably track failures to activate a connection.
* manager: add Reload() D-Bus commandThomas Haller2016-06-011-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add new Reload D-Bus command to reload NetworkManager configuration. For now, this is like sending SIGHUP to the process. There are several advantages here: - it is guarded via PolicyKit authentication while signals can only be sent by root. - the user can wait for the reload to be complete instead of sending an asynchronous signal. For now, we operation completes after nm_config_reload() returns, but later we could delay the response further until specific parts are fully reloaded. - SIGHUP reloads everything including re-reading configuration from disk while SIGUSR1 reloads just certain parts such as writing out DNS configuration anew. Now, the Reload command has a flags argument which is more granular in selecting parts which are to be reloaded. For example, via signals the user can: 1) send SIGUSR1: this writes out the DNS configuration to resolv.conf and possibly reloads other parts without re-reading configuration and without restarting the DNS plugin. 2) send SIGHUP: this reloads configuration from disk, writes out resolv.conf and restarts the DNS plugin. There is no way, to only restart the DNS plugin without also reloading everything else.
* libnm: implement missing NM_AUTH_PERMISSION_SETTINGS_MODIFY_GLOBAL_DNSThomas Haller2016-06-011-1/+4
|
* docs: libnm: add doc comment to typesBeniamino Galvani2016-05-051-0/+3
| | | | | | This is required to add objects in the "Types and Values" section and in the API index. Later, we may want to add useful content in those empty comments.
* libnm/libnm-glib: add NMClient.get_all_devices() method and AllDevices propertyDan Williams2015-12-041-1/+8
| | | | | Mirror new NetworkManager API to return both real devices and device placeholders.
* nm-manager: add 'metered' propertyBeniamino Galvani2015-06-091-0/+1
| | | | | | This introduces a global metered property which makes easier for clients to obtain the metered status of the current primary connection.
* libnm: change GSList to GPtrArray in libnm methodsDan Winship2014-10-281-1/+1
| | | | | | | libnm mostly used GPtrArrays in its APIs, except that arrays of connections were usually GSLists. Fix this and make them GPtrArrays too (and rename nm_client_list_connections() to nm_client_get_connections() to match everything else).
* libnm: consolidate NMClientError and NMObjectErrorDan Winship2014-10-221-9/+11
| | | | | | | | | | | | | Consolidate NMClientError and NMObjectError (such that there is now only one libnm-API-specific error domain). In particular, merge NM_CONNECTION_ERROR_CONNECTION_REMOVED with NM_OBJECT_ERROR_OBJECT_CREATION_FAILURE as the new NM_CONNECTION_ERROR_OBJECT_CREATION_FAILED. Also make object_creation_failed() be a plain method rather than a signal, since there's no reason for anyone to be connecting to it on another object. And remove its GError argument because the subclass can just create its own more-specific error.
* libnm: add nm-types.h, to avoid include loopsDan Winship2014-10-101-11/+3
| | | | | Add nm-types.h defining all the type structs, to avoid future include loops. Clean up the includes in all of the installed headers.
* libnm: merge NMRemoteSettings into NMClientDan Winship2014-10-101-0/+76
| | | | | Make NMRemoteSettings internal and have NMClient wrap all of its APIs, just like it does with NMManager.
* libnm: split "NMManager" out of NMClientDan Winship2014-10-101-3/+2
| | | | | Clone NMClient as NMManager, and make NMClient just be a wrapper around that new class.
* libnm: (trivial) reorder NMClient function declarations/codeDan Winship2014-10-101-45/+56
| | | | | | | | Rearrange the NMClient function declarations and the functions themselves, and group them into "general", "device", and "active connection" sections. No code changes, just moving things around.
* libnm: return errors in nm_client_networking_set_enabled()Jiří Klimeš2014-10-011-2/+4
| | | | | and do not print an error in the library. The caller can decide what to do on an error.
* libnm: add some missing sync/async method variantsDan Winship2014-09-251-4/+12
| | | | | | | | | | | | | Add the missing variant in most places in the API where previously there was either only a synchronous version or only an asynchronous version. There is not yet a synchronous nm_client_activate_connection(), nm_client_add_and_activate_connection(), or nm_remote_settings_add_connection(), because the existing async code depends on waiting for other asynchronous events, so making them run synchronously is slightly more complicated. But these APIs can be added later.
* libnm: make sync/async APIs more GLib-likeDan Winship2014-09-251-26/+26
| | | | | | | | | | | | Make synchronous APIs take GCancellables, and make asynchronous APIs use GAsyncReadyCallbacks and have names ending in "_async", with "_finish" functions to retrieve the results. Also, make nm_client_activate_connection_finish(), nm_client_add_and_activate_finish(), and nm_remote_settings_add_connection_finish() be (transfer full) rather than (transfer none), because the refcounting semantics become slightly confusing in some edge cases otherwise.
* all: remove a bunch of unnecessary dbus/dbus-glib includesDan Winship2014-09-031-1/+0
|
* all: fix up multiple-include-guard definesDan Winship2014-08-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Previously, src/nm-ip4-config.h, libnm/nm-ip4-config.h, and libnm-glib/nm-ip4-config.h all used "NM_IP4_CONFIG_H" as an include guard, which meant that nm-test-utils.h could not tell which of them was being included (and so, eg, if you tried to include nm-ip4-config.h in a libnm test, it would fail to compile because nm-test-utils.h was referring to symbols in src/nm-ip4-config.h). Fix this by changing the include guards in the non-API-stable parts of the tree: - libnm-glib/nm-ip4-config.h remains NM_IP4_CONFIG_H - libnm/nm-ip4-config.h now uses __NM_IP4_CONFIG_H__ - src/nm-ip4-config.h now uses __NETWORKMANAGER_IP4_CONFIG_H__ And likewise for all other headers. The two non-"nm"-prefixed headers, libnm/NetworkManager.h and src/NetworkManagerUtils.h are now __NETWORKMANAGER_H__ and __NETWORKMANAGER_UTILS_H__ respectively, which, while not entirely consistent with the general scheme, do still mostly make sense in isolation.
* libnm: synchronize NMClient and NMRemoteSettings "is NM running" propertiesDan Winship2014-08-071-2/+2
| | | | | Rename NMClient:manager-running and NMRemoteSettings:service-running to both be :nm-running.
* libnm: add NetworkManager.h, disallow including individual headersDan Winship2014-08-011-0/+4
| | | | | | | | | | Add NetworkManager.h, which includes all of the other NM header, and require all external users of libnm to use that rather than the individual headers. (An exception is made for nm-dbus-interface.h, nm-vpn-dbus-interface.h, and nm-version.h, which can be included separately.)
* libnm: rename NetworkManager.h and NetworkManagerVPN.hDan Winship2014-08-011-1/+1
| | | | | | | "NetworkManager.h"'s name (and non-standard capitalization) suggest that it's some sort of high-level super-important header, but it's really just low-level D-Bus stuff. Rename it to "nm-dbus-interface.h" and likewise "NetworkManagerVPN.h" to "nm-vpn-dbus-interface.h"
* libnm: make the the use of GInitable mandatoryDan Winship2014-08-011-1/+2
| | | | | | | | | | | Remove _nm_object_ensure_inited(), etc; objects that implement GInitable are now mandatory-to-init(). Remove constructor() implementations that sometimes return NULL; do all the relevant checking in init() instead. Make nm_client_new() and nm_remote_settings_new() take a GCancellable and a GError**.
* libnm: fix up class struct reserved slotsDan Winship2014-08-011-7/+2
| | | | | | | | | | | | | | Add reserved slots to those classes that were missing them (or had run out), and sync up the number of slots across classes: - 8 slots for "important" classes, abstract base classes, and classes we expect we might need to add new virtual methods or signals to later. - 4 for everything else Also, rearrange the class elements in a few places into standard order (signals first, then methods).
* libnm: remove Since tags and NM_AVAILABLE_IN_* attributesDan Winship2014-08-011-2/+0
| | | | Everything currently in libnm has always been there.
* libnm: remove all deprecated functions and typesDan Winship2014-08-011-1/+0
| | | | | | | Remove deprecated functions and enum types. For now, deprecated properties are still around, because removing them would cause warnings when talking to older implementations.
* libnm: add libnm/libnm-core (part 1)Dan Winship2014-08-011-0/+255
This commit begins creating the new "libnm", which will replace libnm-util and libnm-glib. The main reason for the libnm-util/libnm-glib split is that the daemon needs to link to libnm-util (to get NMSettings, NMConnection, etc), but can't link to libnm-glib (because it uses many of the same type names as the NetworkManager daemon. eg, NMDevice). So the daemon links to only libnm-util, but basically all clients link to both. With libnm, there will be only a single client-visible library, and NetworkManager will internally link against a private "libnm-core" containing the parts that used to be in libnm-util. (The "libnm-core" parts still need to be in their own directory so that the daemon can see those header files without also seeing the ones in libnm/ that conflict with its own headers.) [This commit just copies the source code from libnm-util/ to libnm-core/, and libnm-glib/ to libnm/: mkdir -p libnm-core/tests/ mkdir -p libnm/tests/ cp libnm-util/*.[ch] libnm-util/nm-version.h.in libnm-core/ rm -f libnm-core/nm-version.h libnm-core/nm-setting-template.[ch] libnm-core/nm-utils-enum-types.[ch] cp libnm-util/tests/*.[ch] libnm-core/tests/ cp libnm-glib/*.[ch] libnm/ rm -f libnm/libnm_glib.[ch] libnm/libnm-glib-test.c libnm/nm-glib-enum-types.[ch] cp libnm-glib/tests/*.[ch] libnm/tests/ ]