Commit Graph

28 Commits

Author SHA1 Message Date
Dan Winship
2d29c0527e docs: misc small fixes
Cleans up all of the warnings that aren't overly annoying to clean up.
2014-12-18 13:47:03 -05:00
Dan Winship
2570c5a17c libnm-util, libnm-glib: whitespace fixes
Fix indentation, kill trailing whitespace, split some long lines.
2014-07-15 09:44:55 -04:00
Dan Winship
cb7e1893e7 libnm-util, libnm-glib: standardize copyright/license headers
- Remove list of authors from files that had them; these serve no
  purpose except to quickly get out of date (and were only used in
  libnm-util and not libnm-glib anyway).

- Just say "Copyright", not "(C) Copyright" or "Copyright (C)"

- Put copyright statement after the license, not before

- Remove "NetworkManager - Network link manager" from the few files
  that contained it, and "libnm_glib -- Access network status &
  information from glib applications" from the many files that
  contained it.

- Remove vim modeline from nm-device-olpc-mesh.[ch], add emacs modeline
  to files that were missing it.
2014-07-15 09:44:54 -04:00
Dan Winship
8487a4490c libnm-util, libnm-glib: be consistent about "Wi-Fi", "Ethernet", "InfiniBand" in docs
We made the UIs consistent last year, but missed the documentation.
Fix the docs to also consistently use "Wi-Fi" rather than "WiFi",
"Wifi", "wifi", or "WiFI"; "Ethernet" rather than "ethernet"; and
"InfiniBand" rather than "Infiniband".
2014-06-19 17:45:01 -04:00
Dan Winship
9c4d86ee80 libnm-util, libnm-glib: add versioned deprecation/availability macros
Add versioned NM_DEPRECATED_IN_* and NM_AVAILABLE_IN_* macros, and tag
new/deprecated functions accordingly. (All currently-deprecated
functions are assumed to have been deprecated in 0.9.10.)

Add NM_VERSION_MIN_REQUIRED and NM_VERSION_MAX_ALLOWED macros which
can be set to determine which versions will cause warnings.

With the current settings, external consumers of the
libnm-util/libnm-glib APIs will have MIN_REQUIRED and MAX_ALLOWED both
set to NM_VERSION_0_9_8 by default, meaning they will get warnings
about functions added in 0.9.10. NM internally sets
NM_VERSION_MAX_ALLOWED to NM_VERSION_NEXT_STABLE to ensure that it is
always allowed to use all APIs.
2014-02-13 11:24:37 -05:00
Dan Williams
e7dbe20526 libnm-glib: add support for agent capabilities during registration
Tries the new RegisterWithCapabilities method first, and falls back
to the old Register method for compatibility with older NetworkManager.
2013-07-31 08:16:40 -05:00
Martin Pitt
d5fb24b5b5 libnm-glib: Make SecretAgent introspectable
Use the correct annotation for vfuncs, so that NMClient.SecretAgent becomes
introspectable.

Use "self" as the first argument of the vfuncs in their declarations, to match
the actual name in nm-secret-agent.c. This avoids warnings from g-ir-scanner.

https://bugzilla.gnome.org/show_bug.cgi?id=698184
2013-04-19 09:40:32 -04:00
Alberto Ruiz
1277f9986c docs: clarify the connection ownership in secret agent callbacks (bgo #686915) 2012-10-29 11:00:59 +01:00
Alberto Ruiz
80734d67f3 docs: fix introspection annotation for secret agent callbacks (bgo #686915) 2012-10-29 11:00:42 +01:00
Alberto Ruiz
48a84c1271 libnm-glib: add missing NMSettingHashFlags argument to NMSecretAgentGetSecretsFunc docs
The nm_connection_to_hash() call in the NMSecretAgentGetSecretsFunc
documentation missed the last argument. This patch adds
NM_SETTING_HASH_FLAG_ALL as the last argument in the example.
2012-10-11 09:12:47 -05:00
Dan Williams
0b52687dfe docs: document secret agent errors 2012-08-06 19:51:23 -05:00
Jiří Klimeš
edb85e9720 core: fix NM_IS_*_CLASS(klass) macros
The argument is 'klass' not 'obj'.
2012-07-27 13:15:54 +02:00
Dan Williams
74e262b303 agents: add a "user-requested" flag to secret agent requests
Allows agents to provide different behavior depending on whether the
secrets request was initiated by a user (eg by picking a connection
from a UI menu or by 'nmcli con up') or was automatically started by
NetworkManager.

See https://bugzilla.gnome.org/show_bug.cgi?id=660293
2012-06-27 09:42:47 -05:00
Dan Williams
1da9738f1b libnm-glib: add 'registered' property for NMSecretAgent
So clients can track when the agent is actually registered and when
it's registration state changes.
2012-03-19 13:24:28 -05:00
Dan Winship
54ef8f3224 Fix names of error enum values
When NM was registering all of its enum types by hand, it was using
NamesLikeThis rather than the default names-like-this for the "nick"
values. When we switched to using glib-mkenums, this resulted in
dbus-glib using different strings for the D-Bus error names, causing
compatibility problems.

Fix this by using glib-mkenums annotations to manually fix all the
enum values back to what they were before. (This can't be done in a
more automated way, because the old names aren't 100% consistent. Eg,
"UNKNOWN" frequently becomes "UnknownError" rather than just
"Unknown".)
2012-03-12 15:29:52 -04:00
Dan Winship
839eab5564 Use glib-mkenums to generate enum types
Rather than generating enum classes by hand (and complaining in each
file that "this should really be standard"), use glib-mkenums.

Unfortunately, we need a very new version of glib-mkenums in order to
deal with NM's naming conventions and to fix a few other bugs, so just
import that into the source tree temporarily.

Also, to simplify the use of glib-mkenums, import Makefile.glib from
https://bugzilla.gnome.org/654395.

To avoid having to run glib-mkenums for every subdirectory of src/,
add a new "generated" directory, and put the generated enums files
there.

Finally, use Makefile.glib for marshallers too, and generate separate
ones for libnm-glib and NetworkManager.
2012-02-15 11:42:15 -05:00
Dan Williams
e281d09805 docs: update NMSecretAgent example code 2012-01-26 12:23:05 -06:00
Dan Williams
724df841a2 docs: update docs for NMSecretAgent callbacks 2012-01-26 12:21:27 -06:00
Dan Williams
a7f7e80839 libnm-glib: fix introspection annotations for callbacks and user_data (rh #747302)
user_data arguments should be annotated with (closure) and callbacks
should be marked (allow none) where it's safe to pass NULL.
2011-10-26 10:33:38 -05:00
Dan Williams
4fca276e9a libnm-glib: automatically cancel secrets requests if NM goes away 2011-03-17 13:42:21 -05:00
Dan Williams
02f676c001 libnm-glib: document secret agent request flags 2011-03-02 02:03:12 -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
30c7308e9d libnm-glib: implement agent secrets request cancelation 2011-01-18 13:20:34 -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
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
1496f8056f libnm-glib: add secret agent base class 2010-12-14 00:03:22 -06:00