<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/NetworkManager.git/libnm-core/nm-errors.c, branch lr/python3</title>
<subtitle>gitlab.freedesktop.org: NetworkManager/NetworkManager.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/'/>
<entry>
<title>all: use NM_CACHED_QUARK_FCN() instead of G_DEFINE_QUARK()</title>
<updated>2017-02-10T13:33:52+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2017-02-02T20:47:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=7d6b8bab70d5d347652db0a7b567b61658b1d29d'/>
<id>7d6b8bab70d5d347652db0a7b567b61658b1d29d</id>
<content type='text'>
I think NM_CACHED_QUARK_FCN() is better because:

- the implementation is in our hand, meaning it is clear that
  putting a "static" before NM_CACHED_QUARK_FCN() is guaranteed to
  work -- without relying on G_DEFINE_QUARK() to be defined in a way
  that this works (in fact, we currently never do that and instead
  make all functions non-static).
- it does not construct function names by appending "_quark".
  Thus you can grep for the entire function name and finding
  the place where it is implemented.
- same with the stings, where the new macro doesn't stringify the
  argument, which is less surpising. Again, now you can grep
  for the string including the double quoting.

(yes, I really use grep to understand the source-code)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I think NM_CACHED_QUARK_FCN() is better because:

- the implementation is in our hand, meaning it is clear that
  putting a "static" before NM_CACHED_QUARK_FCN() is guaranteed to
  work -- without relying on G_DEFINE_QUARK() to be defined in a way
  that this works (in fact, we currently never do that and instead
  make all functions non-static).
- it does not construct function names by appending "_quark".
  Thus you can grep for the entire function name and finding
  the place where it is implemented.
- same with the stings, where the new macro doesn't stringify the
  argument, which is less surpising. Again, now you can grep
  for the string including the double quoting.

(yes, I really use grep to understand the source-code)
</pre>
</div>
</content>
</entry>
<entry>
<title>all: cleanup includes and let "nm-default.h" include "config.h"</title>
<updated>2016-02-19T16:53:25+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2016-02-19T13:57:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=8bace23bebcc28396460663203d54aac4ec8ffbf'/>
<id>8bace23bebcc28396460663203d54aac4ec8ffbf</id>
<content type='text'>
- All internal source files (except "examples", which are not internal)
  should include "config.h" first. As also all internal source
  files should include "nm-default.h", let "config.h" be included
  by "nm-default.h" and include "nm-default.h" as first in every
  source file.
  We already wanted to include "nm-default.h" before other headers
  because it might contains some fixes (like "nm-glib.h" compatibility)
  that is required first.

- After including "nm-default.h", we optinally allow for including the
  corresponding header file for the source file at hand. The idea
  is to ensure that each header file is self contained.

- Don't include "config.h" or "nm-default.h" in any header file
  (except "nm-sd-adapt.h"). Public headers anyway must not include
  these headers, and internal headers are never included after
  "nm-default.h", as of the first previous point.

- Include all internal headers with quotes instead of angle brackets.
  In practice it doesn't matter, because in our public headers we must
  include other headers with angle brackets. As we use our public
  headers also to compile our interal source files, effectively the
  result must be the same. Still do it for consistency.

- Except for &lt;config.h&gt; itself. Include it with angle brackets as suggested by
  https://www.gnu.org/software/autoconf/manual/autoconf.html#Configuration-Headers
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- All internal source files (except "examples", which are not internal)
  should include "config.h" first. As also all internal source
  files should include "nm-default.h", let "config.h" be included
  by "nm-default.h" and include "nm-default.h" as first in every
  source file.
  We already wanted to include "nm-default.h" before other headers
  because it might contains some fixes (like "nm-glib.h" compatibility)
  that is required first.

- After including "nm-default.h", we optinally allow for including the
  corresponding header file for the source file at hand. The idea
  is to ensure that each header file is self contained.

- Don't include "config.h" or "nm-default.h" in any header file
  (except "nm-sd-adapt.h"). Public headers anyway must not include
  these headers, and internal headers are never included after
  "nm-default.h", as of the first previous point.

- Include all internal headers with quotes instead of angle brackets.
  In practice it doesn't matter, because in our public headers we must
  include other headers with angle brackets. As we use our public
  headers also to compile our interal source files, effectively the
  result must be the same. Still do it for consistency.

- Except for &lt;config.h&gt; itself. Include it with angle brackets as suggested by
  https://www.gnu.org/software/autoconf/manual/autoconf.html#Configuration-Headers
</pre>
</div>
</content>
</entry>
<entry>
<title>libnm: don't include "nm-version.h" in "nm-dbus-interface.h"</title>
<updated>2015-09-25T13:42:15+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2015-09-25T13:22:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=c0852964a890cf43cc2dcaeff41ac6edc5028f24'/>
<id>c0852964a890cf43cc2dcaeff41ac6edc5028f24</id>
<content type='text'>
We want "nm-dbus-interface.h" to have no dependancy on libnm and glib.
That way, it is usable for example in the QT examples without dragging
in dependencies to glib.

Also drop all the unneccessary include to "nm-dbus-interface.h", which
we already get by directly or indirectly including "nm-core-types.h".
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We want "nm-dbus-interface.h" to have no dependancy on libnm and glib.
That way, it is usable for example in the QT examples without dragging
in dependencies to glib.

Also drop all the unneccessary include to "nm-dbus-interface.h", which
we already get by directly or indirectly including "nm-core-types.h".
</pre>
</div>
</content>
</entry>
<entry>
<title>all: make use of new header file "nm-default.h"</title>
<updated>2015-08-05T13:32:40+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2015-07-17T12:38:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=19c3ea948a7c74774621baf62d68cb4826e1b97c'/>
<id>19c3ea948a7c74774621baf62d68cb4826e1b97c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>all: rename nm-glib-compat.h to nm-glib.h, use everywhere</title>
<updated>2015-07-24T17:25:47+00:00</updated>
<author>
<name>Dan Winship</name>
<email>danw@redhat.com</email>
</author>
<published>2015-04-06T20:42:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=3452ee2a0e3d04a324e7b9cd153323a353d5c182'/>
<id>3452ee2a0e3d04a324e7b9cd153323a353d5c182</id>
<content type='text'>
Rather than randomly including one or more of &lt;glib.h&gt;,
&lt;glib-object.h&gt;, and &lt;gio/gio.h&gt; everywhere (and forgetting to include
"nm-glib-compat.h" most of the time), rename nm-glib-compat.h to
nm-glib.h, include &lt;gio/gio.h&gt; from there, and then change all .c
files in NM to include "nm-glib.h" rather than including the glib
headers directly.

(Public headers files still have to include the real glib headers,
since nm-glib.h isn't installed...)

Also, remove glib includes from header files that are already
including a base object header file (which must itself already include
the glib headers).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rather than randomly including one or more of &lt;glib.h&gt;,
&lt;glib-object.h&gt;, and &lt;gio/gio.h&gt; everywhere (and forgetting to include
"nm-glib-compat.h" most of the time), rename nm-glib-compat.h to
nm-glib.h, include &lt;gio/gio.h&gt; from there, and then change all .c
files in NM to include "nm-glib.h" rather than including the glib
headers directly.

(Public headers files still have to include the real glib headers,
since nm-glib.h isn't installed...)

Also, remove glib includes from header files that are already
including a base object header file (which must itself already include
the glib headers).
</pre>
</div>
</content>
</entry>
<entry>
<title>libnm-core: fix VPN error domain (bgo #745997)</title>
<updated>2015-04-07T15:30:36+00:00</updated>
<author>
<name>Dan Winship</name>
<email>danw@redhat.com</email>
</author>
<published>2015-03-27T13:22:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=773f047eefe73396d3e67f691bac4c1b2ec5f826'/>
<id>773f047eefe73396d3e67f691bac4c1b2ec5f826</id>
<content type='text'>
In theory, NM_VPN_PLUGIN_ERROR should have names under
org.freedesktop.NetworkManager.VPN.Plugin, but for historical reasons,
it's actually org.freedesktop.NetworkManager.VPN.Error.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In theory, NM_VPN_PLUGIN_ERROR should have names under
org.freedesktop.NetworkManager.VPN.Plugin, but for historical reasons,
it's actually org.freedesktop.NetworkManager.VPN.Error.
</pre>
</div>
</content>
</entry>
<entry>
<title>all: consistently include config.h</title>
<updated>2014-11-13T22:18:42+00:00</updated>
<author>
<name>Dan Winship</name>
<email>danw@gnome.org</email>
</author>
<published>2014-11-13T15:07:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=3bfb163a74fb98698b03d8a605b0164869a2ed4a'/>
<id>3bfb163a74fb98698b03d8a605b0164869a2ed4a</id>
<content type='text'>
config.h should be included from every .c file, and it should be
included before any other include. Fix that.

(As a side effect of how I did this, this also changes us to
consistently use "config.h" rather than &lt;config.h&gt;. To the extent that
it matters [which is not much], quotes are more correct anyway, since
we're talking about a file in our own build tree, not a system
include.)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
config.h should be included from every .c file, and it should be
included before any other include. Fix that.

(As a side effect of how I did this, this also changes us to
consistently use "config.h" rather than &lt;config.h&gt;. To the extent that
it matters [which is not much], quotes are more correct anyway, since
we're talking about a file in our own build tree, not a system
include.)
</pre>
</div>
</content>
</entry>
<entry>
<title>libnm-core: fix trivial bug in NMVpnPluginError quark</title>
<updated>2014-10-28T18:50:27+00:00</updated>
<author>
<name>Dan Winship</name>
<email>danw@gnome.org</email>
</author>
<published>2014-10-24T13:25:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=1e9c5f415fbd47cfd404d6b7e35e7829c2047bc5'/>
<id>1e9c5f415fbd47cfd404d6b7e35e7829c2047bc5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>libnm-core, libnm: move NMVpnPluginError to nm-errors</title>
<updated>2014-10-22T12:29:10+00:00</updated>
<author>
<name>Dan Winship</name>
<email>danw@gnome.org</email>
</author>
<published>2014-10-15T19:27:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=5a181bcaae2b8a029ca201156ad22ccae2383319'/>
<id>5a181bcaae2b8a029ca201156ad22ccae2383319</id>
<content type='text'>
Move the definition of NMVpnPluginError to nm-errors and register it
with D-Bus. Rename GENERAL to FAILED, and CONNECTION_INVALID to
INVALID_CONNECTION, for consistency.

(As with the NMSecretAgentError renamings, the renaming here is not an
ABI break, because the daemon currently never checks for any specific
error codes other than INTERACTIVE_NOT_SUPPORTED.)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move the definition of NMVpnPluginError to nm-errors and register it
with D-Bus. Rename GENERAL to FAILED, and CONNECTION_INVALID to
INVALID_CONNECTION, for consistency.

(As with the NMSecretAgentError renamings, the renaming here is not an
ABI break, because the daemon currently never checks for any specific
error codes other than INTERACTIVE_NOT_SUPPORTED.)
</pre>
</div>
</content>
</entry>
<entry>
<title>libnm-core, libnm, settings: move NMSecretAgentError to nm-errors</title>
<updated>2014-10-22T12:29:09+00:00</updated>
<author>
<name>Dan Winship</name>
<email>danw@gnome.org</email>
</author>
<published>2014-10-15T19:27:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=821258048b620bdc381089c0f442674b0f83be6e'/>
<id>821258048b620bdc381089c0f442674b0f83be6e</id>
<content type='text'>
Move the definition of NMSecretAgentError to nm-errors, register it
with D-Bus, and verify in the tests that it maps correctly.

NM_SECRET_AGENT_ERROR_INTERNAL_ERROR is renamed to
NM_SECRET_AGENT_ERROR_FAILED, and NM_SECRET_AGENT_ERROR_NOT_AUTHORIZED
to NM_SECRET_AGENT_ERROR_PERMISSION_DENIED, for consistency with other
error domains. While NMSecretAgentError, unlike most other error
domains, has always been correctly mapped across D-Bus, the renaming
is not an ABI break, because the daemon never checks for either of
those values, so all versions of the daemon will treat
"org.freedesktop.NetworkManager.SecretAgent.InternalError" and
"org.freedesktop.NetworkManager.SecretAgent.Failed" the same (by just
ignoring the error name and keeping only the error message).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move the definition of NMSecretAgentError to nm-errors, register it
with D-Bus, and verify in the tests that it maps correctly.

NM_SECRET_AGENT_ERROR_INTERNAL_ERROR is renamed to
NM_SECRET_AGENT_ERROR_FAILED, and NM_SECRET_AGENT_ERROR_NOT_AUTHORIZED
to NM_SECRET_AGENT_ERROR_PERMISSION_DENIED, for consistency with other
error domains. While NMSecretAgentError, unlike most other error
domains, has always been correctly mapped across D-Bus, the renaming
is not an ABI break, because the daemon never checks for either of
those values, so all versions of the daemon will treat
"org.freedesktop.NetworkManager.SecretAgent.InternalError" and
"org.freedesktop.NetworkManager.SecretAgent.Failed" the same (by just
ignoring the error name and keeping only the error message).
</pre>
</div>
</content>
</entry>
</feed>
