Commit 831286df authored by Thomas Haller's avatar Thomas Haller

include: use double-quotes to include our own headers

In practice, this should only matter when there are multiple
header files with the same name. That is something we try
to avoid already, by giving headers a distinct name.

When building NetworkManager itself, we clearly want to use
double-quotes for including our own headers.
But we also want to do that in our public headers. For example:

  ./a.c
    #include <stdio.h>
    #include <nm-1.h>
    void main() {
        printf ("INCLUDED %s/nm-2.h\n", SYMB);
    }

  ./1/nm-1.h
    #include <nm-2.h>

  ./1/nm-2.h
    #define SYMB "1"

  ./2/nm-2.h
    #define SYMB "2"

$ cc -I./2 -I./1 ./a.c
$ ./a.out
INCLUDED 2/nm-2.h

Exceptions to this are
  - headers in "shared/nm-utils" that include <NetworkManager.h>. These
    headers are copied into projects and hence used like headers owned by
    those projects.
  - examples/C
parent afd1bde3
......@@ -20,8 +20,8 @@
#ifndef NMC_NMCLI_H
#define NMC_NMCLI_H
#include <NetworkManager.h>
#include <nm-secret-agent-old.h>
#include "NetworkManager.h"
#include "nm-secret-agent-old.h"
#if WITH_POLKIT_AGENT
#include "nm-polkit-listener.h"
......
......@@ -19,8 +19,8 @@
#ifndef __NM_SECRET_AGENT_SIMPLE_H__
#define __NM_SECRET_AGENT_SIMPLE_H__
#include <NetworkManager.h>
#include <nm-secret-agent-old.h>
#include "NetworkManager.h"
#include "nm-secret-agent-old.h"
#define NM_TYPE_SECRET_AGENT_SIMPLE (nm_secret_agent_simple_get_type ())
#define NM_SECRET_AGENT_SIMPLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_SECRET_AGENT_SIMPLE, NMSecretAgentSimple))
......
......@@ -19,7 +19,7 @@
#ifndef __NM_VPN_HELPERS_H__
#define __NM_VPN_HELPERS_H__
#include <NetworkManager.h>
#include "NetworkManager.h"
typedef struct {
const char *name;
......
......@@ -19,7 +19,7 @@
#ifndef NM_EDITOR_BINDINGS_H
#define NM_EDITOR_BINDINGS_H
#include <NetworkManager.h>
#include "NetworkManager.h"
void nm_editor_bindings_init (void);
......
......@@ -19,7 +19,7 @@
#ifndef NM_EDITOR_UTILS_H
#define NM_EDITOR_UTILS_H
#include <NetworkManager.h>
#include "NetworkManager.h"
typedef struct {
const char *name;
......
......@@ -21,7 +21,7 @@
#include "nmt-editor-grid.h"
#include <NetworkManager.h>
#include "NetworkManager.h"
#define NMT_TYPE_DEVICE_ENTRY (nmt_device_entry_get_type ())
#define NMT_DEVICE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NMT_TYPE_DEVICE_ENTRY, NmtDeviceEntry))
......
......@@ -21,7 +21,7 @@
#include "nmt-newt.h"
#include <NetworkManager.h>
#include "NetworkManager.h"
#define NMT_TYPE_EDIT_CONNECTION_LIST (nmt_edit_connection_list_get_type ())
#define NMT_EDIT_CONNECTION_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NMT_TYPE_EDIT_CONNECTION_LIST, NmtEditConnectionList))
......
......@@ -19,7 +19,7 @@
#ifndef NMT_EDITOR_PAGE_H
#define NMT_EDITOR_PAGE_H
#include <NetworkManager.h>
#include "NetworkManager.h"
#include "nmt-editor-grid.h"
#include "nmt-editor-section.h"
......
......@@ -19,7 +19,7 @@
#ifndef NMT_EDITOR_H
#define NMT_EDITOR_H
#include <NetworkManager.h>
#include "NetworkManager.h"
#include "nmt-newt.h"
......
......@@ -19,7 +19,7 @@
#ifndef NMT_ROUTE_EDITOR_H
#define NMT_ROUTE_EDITOR_H
#include <NetworkManager.h>
#include "NetworkManager.h"
#include "nmt-newt.h"
......
......@@ -19,7 +19,7 @@
#ifndef NMTUI_H
#define NMTUI_H
#include <NetworkManager.h>
#include "NetworkManager.h"
extern NMClient *nm_client;
......
#include <nm-client.h>
#include <nm-object.h>
#include <nm-device.h>
#include <nm-device-ethernet.h>
#include <nm-device-wifi.h>
#include <nm-device-modem.h>
#include <nm-device-bt.h>
#include <nm-device-wimax.h>
#include <nm-device-olpc-mesh.h>
#include <nm-device-adsl.h>
#include <nm-device-infiniband.h>
#include <nm-device-bond.h>
#include <nm-device-bridge.h>
#include <nm-device-team.h>
#include <nm-device-generic.h>
#include <nm-device-vlan.h>
#include <nm-access-point.h>
#include <nm-ip4-config.h>
#include <nm-ip6-config.h>
#include <nm-active-connection.h>
#include <nm-dhcp4-config.h>
#include <nm-dhcp6-config.h>
#include <nm-remote-settings.h>
#include <nm-remote-connection.h>
#include <nm-secret-agent.h>
#include <nm-vpn-connection.h>
#include "nm-client.h"
#include "nm-object.h"
#include "nm-device.h"
#include "nm-device-ethernet.h"
#include "nm-device-wifi.h"
#include "nm-device-modem.h"
#include "nm-device-bt.h"
#include "nm-device-wimax.h"
#include "nm-device-olpc-mesh.h"
#include "nm-device-adsl.h"
#include "nm-device-infiniband.h"
#include "nm-device-bond.h"
#include "nm-device-bridge.h"
#include "nm-device-team.h"
#include "nm-device-generic.h"
#include "nm-device-vlan.h"
#include "nm-access-point.h"
#include "nm-ip4-config.h"
#include "nm-ip6-config.h"
#include "nm-active-connection.h"
#include "nm-dhcp4-config.h"
#include "nm-dhcp6-config.h"
#include "nm-remote-settings.h"
#include "nm-remote-connection.h"
#include "nm-secret-agent.h"
#include "nm-vpn-connection.h"
nm_client_get_type
nm_object_get_type
......
......@@ -28,10 +28,9 @@
#include <QtDBus/QDBusInterface>
#include <QtDBus/QDBusMetaType>
#include <QtDBus/QDBusReply>
#include <QtCore/QDebug>
#include "nm-dbus-interface.h"
#include <nm-dbus-interface.h>
typedef QMap<QString, QMap<QString, QVariant> > Connection;
Q_DECLARE_METATYPE(Connection)
......
......@@ -38,9 +38,9 @@
#include <QtCore/QDebug>
#include <QtNetwork/QHostAddress>
#include "arpa/inet.h"
#include <arpa/inet.h>
#include "nm-dbus-interface.h"
#include <nm-dbus-interface.h>
typedef QMap<QString, QMap<QString, QVariant> > Connection;
Q_DECLARE_METATYPE(Connection)
......
......@@ -25,10 +25,9 @@
#include <QtDBus/QDBusConnection>
#include <QtDBus/QDBusInterface>
#include <QtDBus/QDBusReply>
#include <QtCore/QDebug>
#include "nm-dbus-interface.h"
#include <nm-dbus-interface.h>
void listConnections(QDBusInterface& interface) {
......
......@@ -27,9 +27,9 @@
#error "Only <NetworkManager.h> can be included directly."
#endif
#include <nm-core-types.h>
#include <nm-setting.h>
#include <nm-errors.h>
#include "nm-core-types.h"
#include "nm-setting.h"
#include "nm-errors.h"
G_BEGIN_DECLS
......
......@@ -23,9 +23,9 @@
#include <glib-object.h>
#include <nm-version.h>
#include <nm-dbus-interface.h>
#include <nm-core-enum-types.h>
#include "nm-version.h"
#include "nm-dbus-interface.h"
#include "nm-core-enum-types.h"
typedef struct _NMConnection NMConnection;
typedef struct _NMSetting NMSetting;
......
......@@ -27,7 +27,7 @@
#error "Only <NetworkManager.h> can be included directly."
#endif
#include <nm-setting.h>
#include "nm-setting.h"
G_BEGIN_DECLS
......
......@@ -26,7 +26,7 @@
#error "Only <NetworkManager.h> can be included directly."
#endif
#include <nm-setting.h>
#include "nm-setting.h"
G_BEGIN_DECLS
......
......@@ -26,7 +26,7 @@
#error "Only <NetworkManager.h> can be included directly."
#endif
#include <nm-setting.h>
#include "nm-setting.h"
G_BEGIN_DECLS
......
......@@ -26,7 +26,7 @@
#error "Only <NetworkManager.h> can be included directly."
#endif
#include <nm-setting.h>
#include "nm-setting.h"
G_BEGIN_DECLS
......
......@@ -26,7 +26,7 @@
#error "Only <NetworkManager.h> can be included directly."
#endif
#include <nm-setting.h>
#include "nm-setting.h"
G_BEGIN_DECLS
......
......@@ -27,7 +27,7 @@
#error "Only <NetworkManager.h> can be included directly."
#endif
#include <nm-setting.h>
#include "nm-setting.h"
G_BEGIN_DECLS
......
......@@ -26,7 +26,7 @@
#error "Only <NetworkManager.h> can be included directly."
#endif
#include <nm-setting.h>
#include "nm-setting.h"
G_BEGIN_DECLS
......
......@@ -26,7 +26,7 @@
#error "Only <NetworkManager.h> can be included directly."
#endif
#include <nm-setting.h>
#include "nm-setting.h"
G_BEGIN_DECLS
......
......@@ -27,7 +27,7 @@
#error "Only <NetworkManager.h> can be included directly."
#endif
#include <nm-setting.h>
#include "nm-setting.h"
G_BEGIN_DECLS
......
......@@ -26,7 +26,7 @@
#error "Only <NetworkManager.h> can be included directly."
#endif
#include <nm-setting.h>
#include "nm-setting.h"
G_BEGIN_DECLS
......
......@@ -25,7 +25,7 @@
#error "Only <NetworkManager.h> can be included directly."
#endif
#include <nm-setting.h>
#include "nm-setting.h"
G_BEGIN_DECLS
......
......@@ -27,7 +27,7 @@
#error "Only <NetworkManager.h> can be included directly."
#endif
#include <nm-setting.h>
#include "nm-setting.h"
G_BEGIN_DECLS
......
......@@ -27,7 +27,7 @@
#error "Only <NetworkManager.h> can be included directly."
#endif
#include <nm-setting.h>
#include "nm-setting.h"
G_BEGIN_DECLS
......
......@@ -27,7 +27,7 @@
#error "Only <NetworkManager.h> can be included directly."
#endif
#include <nm-setting.h>
#include "nm-setting.h"
G_BEGIN_DECLS
......
......@@ -26,7 +26,7 @@
#error "Only <NetworkManager.h> can be included directly."
#endif
#include <nm-setting.h>
#include "nm-setting.h"
G_BEGIN_DECLS
......
......@@ -27,7 +27,7 @@
#error "Only <NetworkManager.h> can be included directly."
#endif
#include <nm-setting.h>
#include "nm-setting.h"
G_BEGIN_DECLS
......
......@@ -25,7 +25,7 @@
#error "Only <NetworkManager.h> can be included directly."
#endif
#include <nm-setting.h>
#include "nm-setting.h"
G_BEGIN_DECLS
......
......@@ -25,7 +25,7 @@
#error "Only <NetworkManager.h> can be included directly."
#endif
#include <nm-setting.h>
#include "nm-setting.h"
G_BEGIN_DECLS
......
......@@ -27,7 +27,7 @@
#error "Only <NetworkManager.h> can be included directly."
#endif
#include <nm-setting.h>
#include "nm-setting.h"
G_BEGIN_DECLS
......
......@@ -26,7 +26,7 @@
#error "Only <NetworkManager.h> can be included directly."
#endif
#include <nm-setting.h>
#include "nm-setting.h"
G_BEGIN_DECLS
......
......@@ -27,7 +27,7 @@
#error "Only <NetworkManager.h> can be included directly."
#endif
#include <nm-setting.h>
#include "nm-setting.h"
G_BEGIN_DECLS
......
......@@ -27,7 +27,7 @@
#error "Only <NetworkManager.h> can be included directly."
#endif
#include <nm-setting.h>
#include "nm-setting.h"
G_BEGIN_DECLS
......
......@@ -27,8 +27,8 @@
#error "Only <NetworkManager.h> can be included directly."
#endif
#include <nm-setting.h>
#include <nm-setting-wireless-security.h>
#include "nm-setting.h"
#include "nm-setting-wireless-security.h"
G_BEGIN_DECLS
......
......@@ -27,7 +27,7 @@
#error "Only <NetworkManager.h> can be included directly."
#endif
#include <nm-core-types.h>
#include "nm-core-types.h"
G_BEGIN_DECLS
......
......@@ -25,7 +25,7 @@
#error "Only <NetworkManager.h> can be included directly."
#endif
#include <nm-connection.h>
#include "nm-connection.h"
G_BEGIN_DECLS
......
......@@ -23,7 +23,7 @@
#include <glib.h>
#include <nm-version-macros.h>
#include "nm-version-macros.h"
/* Deprecation / Availability macros */
......
......@@ -24,11 +24,11 @@
#include <string.h>
#include <netinet/ether.h>
#include <nm-connection.h>
#include <nm-setting-connection.h>
#include <nm-setting-wireless.h>
#include <nm-setting-wireless-security.h>
#include <nm-utils.h>
#include "nm-connection.h"
#include "nm-setting-connection.h"
#include "nm-setting-wireless.h"
#include "nm-setting-wireless-security.h"
#include "nm-utils.h"
#include "nm-access-point.h"
#include "NetworkManager.h"
......
......@@ -24,8 +24,8 @@
#include <glib.h>
#include <glib-object.h>
#include <NetworkManager.h>
#include <nm-connection.h>
#include "NetworkManager.h"
#include "nm-connection.h"
#include "nm-object.h"
G_BEGIN_DECLS
......
......@@ -25,8 +25,8 @@
#include <glib.h>
#include <glib-object.h>
#include "nm-object.h"
#include <nm-connection.h>
#include <NetworkManager.h>
#include "nm-connection.h"
#include "NetworkManager.h"
#include "nm-ip4-config.h"
#include "nm-dhcp4-config.h"
#include "nm-ip6-config.h"
......
......@@ -26,7 +26,7 @@
#include <glib-object.h>
#include <gio/gio.h>
#include <dbus/dbus-glib.h>
#include <NetworkManager.h>
#include "NetworkManager.h"
#include "nm-object.h"
#include "nm-device.h"
#include "nm-active-connection.h"
......
......@@ -26,7 +26,7 @@
#include <glib-object.h>
#include <dbus/dbus-glib.h>
#include <nm-version.h>
#include "nm-version.h"
G_BEGIN_DECLS
......
......@@ -25,7 +25,7 @@
#include <glib-object.h>
#include <dbus/dbus-glib.h>
#include <nm-connection.h>
#include "nm-connection.h"
G_BEGIN_DECLS
......
......@@ -24,8 +24,8 @@
#include <gio/gio.h>
#include <dbus/dbus-glib.h>
#include <nm-connection.h>
#include <nm-remote-connection.h>
#include "nm-connection.h"
#include "nm-remote-connection.h"
G_BEGIN_DECLS
......
......@@ -21,7 +21,7 @@
#ifndef NM_SECRET_AGENT_H
#define NM_SECRET_AGENT_H
#include <nm-connection.h>
#include "nm-connection.h"
G_BEGIN_DECLS
......
......@@ -24,7 +24,7 @@
#include <glib.h>
#include <glib-object.h>
#include <nm-glib-enum-types.h>
#include "nm-glib-enum-types.h"
G_BEGIN_DECLS
......
......@@ -24,7 +24,7 @@
#include <glib.h>
#include <glib-object.h>
#include <nm-connection.h>
#include "nm-connection.h"
G_BEGIN_DECLS
......
......@@ -22,7 +22,7 @@
#define NM_VPN_PLUGIN_UTILS_H
#include <glib.h>
#include <nm-setting.h>
#include "nm-setting.h"
G_BEGIN_DECLS
......
......@@ -25,8 +25,8 @@
#include <glib.h>
#include <glib-object.h>
#include <dbus/dbus-glib.h>
#include <NetworkManagerVPN.h>
#include <nm-connection.h>
#include "NetworkManagerVPN.h"
#include "nm-connection.h"
G_BEGIN_DECLS
......
......@@ -24,7 +24,7 @@
#include <glib.h>
#include <glib-object.h>
#include <NetworkManager.h>
#include "NetworkManager.h"
#include "nm-object.h"
G_BEGIN_DECLS
......
......@@ -28,7 +28,7 @@
/* This header must not include glib or libnm. */
#include <nm-version-macros.h>
#include "nm-version-macros.h"
/*
* dbus services details
......
......@@ -25,34 +25,34 @@
#include <glib.h>
#include <glib-object.h>
#include <nm-setting.h>
#include <nm-setting-8021x.h>
#include <nm-setting-bluetooth.h>
#include <nm-setting-bond.h>
#include <nm-setting-team.h>
#include <nm-setting-team-port.h>
#include <nm-setting-bridge.h>
#include <nm-setting-bridge-port.h>
#include <nm-setting-cdma.h>
#include <nm-setting-connection.h>
#include <nm-setting-dcb.h>
#include <nm-setting-generic.h>
#include <nm-setting-gsm.h>
#include <nm-setting-infiniband.h>
#include <nm-setting-ip4-config.h>
#include <nm-setting-ip6-config.h>
#include <nm-setting-olpc-mesh.h>
#include <nm-setting-ppp.h>
#include <nm-setting-pppoe.h>
#include <nm-setting-serial.h>
#include <nm-setting-vpn.h>
#include <nm-setting-wimax.h>
#include <nm-setting-wired.h>
#include <nm-setting-adsl.h>
#include <nm-setting-wireless.h>
#include <nm-setting-wireless-security.h>
#include <nm-setting-vlan.h>
#include "nm-setting.h"
#include "nm-setting-8021x.h"
#include "nm-setting-bluetooth.h"
#include "nm-setting-bond.h"
#include "nm-setting-team.h"
#include "nm-setting-team-port.h"
#include "nm-setting-bridge.h"
#include "nm-setting-bridge-port.h"
#include "nm-setting-cdma.h"
#include "nm-setting-connection.h"
#include "nm-setting-dcb.h"
#include "nm-setting-generic.h"
#include "nm-setting-gsm.h"
#include "nm-setting-infiniband.h"
#include "nm-setting-ip4-config.h"
#include "nm-setting-ip6-config.h"
#include "nm-setting-olpc-mesh.h"
#include "nm-setting-ppp.h"
#include "nm-setting-pppoe.h"
#include "nm-setting-serial.h"
#include "nm-setting-vpn.h"
#include "nm-setting-wimax.h"
#include "nm-setting-wired.h"
#include "nm-setting-adsl.h"
#include "nm-setting-wireless.h"
#include "nm-setting-wireless-security.h"
#include "nm-setting-vlan.h"
G_BEGIN_DECLS
......
......@@ -23,7 +23,7 @@
#ifndef NM_SETTING_8021X_H