libmm-glib: only allow including `libmm-glib.h' directly

Unless when compiling libmm-glib itself, of course.
This commit is contained in:
Aleksander Morgado
2012-10-03 13:01:25 +02:00
parent c250fa3797
commit 433fdea6d4
28 changed files with 109 additions and 2 deletions

View File

@@ -68,7 +68,8 @@ libmm_glib_la_CPPFLAGS = \
-I$(top_srcdir)/include \
-I$(top_builddir)/include \
-I${top_srcdir}/libmm-glib/generated \
-I${top_builddir}/libmm-glib/generated
-I${top_builddir}/libmm-glib/generated \
-DLIBMM_GLIB_COMPILATION
libmm_glib_la_LIBADD = \
${top_builddir}/libmm-glib/generated/libmm-generated.la \

View File

@@ -17,12 +17,14 @@
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
* Copyright (C) 2011 Google, Inc.
* Copyright (C) 2011 - 2012 Google, Inc.
*/
#ifndef _LIBMM_GLIB_H_
#define _LIBMM_GLIB_H_
#define __LIBMM_GLIB_H_INSIDE__
/* ModemManager generic headers */
#include <ModemManager.h>

View File

@@ -16,6 +16,10 @@
#ifndef MM_BEARER_IP_CONFIG_H
#define MM_BEARER_IP_CONFIG_H
#if !defined (__LIBMM_GLIB_H_INSIDE__) && !defined (LIBMM_GLIB_COMPILATION)
#error "Only <libmm-glib.h> can be included directly."
#endif
#include <ModemManager.h>
#include <glib-object.h>

View File

@@ -19,6 +19,10 @@
#include <ModemManager.h>
#include <glib-object.h>
#if !defined (__LIBMM_GLIB_H_INSIDE__) && !defined (LIBMM_GLIB_COMPILATION)
#error "Only <libmm-glib.h> can be included directly."
#endif
G_BEGIN_DECLS
#define MM_TYPE_BEARER_PROPERTIES (mm_bearer_properties_get_type ())

View File

@@ -24,6 +24,10 @@
#ifndef _MM_BEARER_H_
#define _MM_BEARER_H_
#if !defined (__LIBMM_GLIB_H_INSIDE__) && !defined (LIBMM_GLIB_COMPILATION)
#error "Only <libmm-glib.h> can be included directly."
#endif
#include <ModemManager.h>
#include "mm-gdbus-bearer.h"

View File

@@ -18,6 +18,10 @@
#include <glib.h>
#include <ModemManager-enums.h>
#if !defined (__LIBMM_GLIB_H_INSIDE__) && !defined (LIBMM_GLIB_COMPILATION)
#error "Only <libmm-glib.h> can be included directly."
#endif
#ifndef MM_COMMON_HELPERS_H
#define MM_COMMON_HELPERS_H

View File

@@ -16,6 +16,10 @@
#ifndef MM_FIRMWARE_PROPERTIES_H
#define MM_FIRMWARE_PROPERTIES_H
#if !defined (__LIBMM_GLIB_H_INSIDE__) && !defined (LIBMM_GLIB_COMPILATION)
#error "Only <libmm-glib.h> can be included directly."
#endif
#include <ModemManager.h>
#include <glib-object.h>

View File

@@ -16,6 +16,10 @@
#ifndef MM_LOCATION_3GPP_H
#define MM_LOCATION_3GPP_H
#if !defined (__LIBMM_GLIB_H_INSIDE__) && !defined (LIBMM_GLIB_COMPILATION)
#error "Only <libmm-glib.h> can be included directly."
#endif
#include <ModemManager.h>
#include <glib-object.h>

View File

@@ -16,6 +16,10 @@
#ifndef MM_LOCATION_GPS_NMEA_H
#define MM_LOCATION_GPS_NMEA_H
#if !defined (__LIBMM_GLIB_H_INSIDE__) && !defined (LIBMM_GLIB_COMPILATION)
#error "Only <libmm-glib.h> can be included directly."
#endif
#include <ModemManager.h>
#include <glib-object.h>

View File

@@ -16,6 +16,10 @@
#ifndef MM_LOCATION_GPS_RAW_H
#define MM_LOCATION_GPS_RAW_H
#if !defined (__LIBMM_GLIB_H_INSIDE__) && !defined (LIBMM_GLIB_COMPILATION)
#error "Only <libmm-glib.h> can be included directly."
#endif
#include <ModemManager.h>
#include <glib-object.h>

View File

@@ -26,6 +26,10 @@
#ifndef _MM_MANAGER_H_
#define _MM_MANAGER_H_
#if !defined (__LIBMM_GLIB_H_INSIDE__) && !defined (LIBMM_GLIB_COMPILATION)
#error "Only <libmm-glib.h> can be included directly."
#endif
#include <ModemManager.h>
#include "mm-gdbus-modem.h"

View File

@@ -24,6 +24,10 @@
#ifndef _MM_MODEM_3GPP_USSD_H_
#define _MM_MODEM_3GPP_USSD_H_
#if !defined (__LIBMM_GLIB_H_INSIDE__) && !defined (LIBMM_GLIB_COMPILATION)
#error "Only <libmm-glib.h> can be included directly."
#endif
#include <ModemManager.h>
#include "mm-gdbus-modem.h"

View File

@@ -24,6 +24,10 @@
#ifndef _MM_MODEM_3GPP_H_
#define _MM_MODEM_3GPP_H_
#if !defined (__LIBMM_GLIB_H_INSIDE__) && !defined (LIBMM_GLIB_COMPILATION)
#error "Only <libmm-glib.h> can be included directly."
#endif
#include <ModemManager.h>
#include "mm-gdbus-modem.h"

View File

@@ -24,6 +24,10 @@
#ifndef _MM_MODEM_CDMA_H_
#define _MM_MODEM_CDMA_H_
#if !defined (__LIBMM_GLIB_H_INSIDE__) && !defined (LIBMM_GLIB_COMPILATION)
#error "Only <libmm-glib.h> can be included directly."
#endif
#include <ModemManager.h>
#include "mm-gdbus-modem.h"

View File

@@ -23,6 +23,10 @@
#ifndef _MM_MODEM_FIRMWARE_H_
#define _MM_MODEM_FIRMWARE_H_
#if !defined (__LIBMM_GLIB_H_INSIDE__) && !defined (LIBMM_GLIB_COMPILATION)
#error "Only <libmm-glib.h> can be included directly."
#endif
#include <ModemManager.h>
#include "mm-gdbus-modem.h"

View File

@@ -24,6 +24,10 @@
#ifndef _MM_MODEM_LOCATION_H_
#define _MM_MODEM_LOCATION_H_
#if !defined (__LIBMM_GLIB_H_INSIDE__) && !defined (LIBMM_GLIB_COMPILATION)
#error "Only <libmm-glib.h> can be included directly."
#endif
#include <ModemManager.h>
#include "mm-gdbus-modem.h"

View File

@@ -24,6 +24,10 @@
#ifndef _MM_MODEM_MESSAGING_H_
#define _MM_MODEM_MESSAGING_H_
#if !defined (__LIBMM_GLIB_H_INSIDE__) && !defined (LIBMM_GLIB_COMPILATION)
#error "Only <libmm-glib.h> can be included directly."
#endif
#include <ModemManager.h>
#include "mm-gdbus-modem.h"

View File

@@ -24,6 +24,10 @@
#ifndef _MM_MODEM_SIMPLE_H_
#define _MM_MODEM_SIMPLE_H_
#if !defined (__LIBMM_GLIB_H_INSIDE__) && !defined (LIBMM_GLIB_COMPILATION)
#error "Only <libmm-glib.h> can be included directly."
#endif
#include <ModemManager.h>
#include "mm-gdbus-modem.h"

View File

@@ -24,6 +24,10 @@
#ifndef _MM_MODEM_TIME_H_
#define _MM_MODEM_TIME_H_
#if !defined (__LIBMM_GLIB_H_INSIDE__) && !defined (LIBMM_GLIB_COMPILATION)
#error "Only <libmm-glib.h> can be included directly."
#endif
#include <ModemManager.h>
#include "mm-gdbus-modem.h"

View File

@@ -24,6 +24,10 @@
#ifndef _MM_MODEM_H_
#define _MM_MODEM_H_
#if !defined (__LIBMM_GLIB_H_INSIDE__) && !defined (LIBMM_GLIB_COMPILATION)
#error "Only <libmm-glib.h> can be included directly."
#endif
#include <ModemManager.h>
#include "mm-gdbus-modem.h"

View File

@@ -16,6 +16,10 @@
#ifndef MM_NETWORK_TIMEZONE_H
#define MM_NETWORK_TIMEZONE_H
#if !defined (__LIBMM_GLIB_H_INSIDE__) && !defined (LIBMM_GLIB_COMPILATION)
#error "Only <libmm-glib.h> can be included directly."
#endif
#include <ModemManager.h>
#include <glib-object.h>

View File

@@ -24,6 +24,10 @@
#ifndef _MM_OBJECT_H_
#define _MM_OBJECT_H_
#if !defined (__LIBMM_GLIB_H_INSIDE__) && !defined (LIBMM_GLIB_COMPILATION)
#error "Only <libmm-glib.h> can be included directly."
#endif
#include <ModemManager.h>
#include "mm-gdbus-modem.h"

View File

@@ -24,6 +24,10 @@
#ifndef _MM_SIM_H_
#define _MM_SIM_H_
#if !defined (__LIBMM_GLIB_H_INSIDE__) && !defined (LIBMM_GLIB_COMPILATION)
#error "Only <libmm-glib.h> can be included directly."
#endif
#include <ModemManager.h>
#include "mm-gdbus-sim.h"

View File

@@ -16,6 +16,10 @@
#ifndef MM_SIMPLE_CONNECT_PROPERTIES_H
#define MM_SIMPLE_CONNECT_PROPERTIES_H
#if !defined (__LIBMM_GLIB_H_INSIDE__) && !defined (LIBMM_GLIB_COMPILATION)
#error "Only <libmm-glib.h> can be included directly."
#endif
#include <ModemManager.h>
#include <glib-object.h>

View File

@@ -16,6 +16,10 @@
#ifndef MM_SIMPLE_STATUS_H
#define MM_SIMPLE_STATUS_H
#if !defined (__LIBMM_GLIB_H_INSIDE__) && !defined (LIBMM_GLIB_COMPILATION)
#error "Only <libmm-glib.h> can be included directly."
#endif
#include <ModemManager.h>
#include <glib-object.h>

View File

@@ -16,6 +16,10 @@
#ifndef MM_SMS_PROPERTIES_H
#define MM_SMS_PROPERTIES_H
#if !defined (__LIBMM_GLIB_H_INSIDE__) && !defined (LIBMM_GLIB_COMPILATION)
#error "Only <libmm-glib.h> can be included directly."
#endif
#include <ModemManager.h>
#include <glib-object.h>

View File

@@ -23,6 +23,10 @@
#ifndef _MM_SMS_H_
#define _MM_SMS_H_
#if !defined (__LIBMM_GLIB_H_INSIDE__) && !defined (LIBMM_GLIB_COMPILATION)
#error "Only <libmm-glib.h> can be included directly."
#endif
#include <ModemManager.h>
#include "mm-gdbus-sms.h"

View File

@@ -16,6 +16,10 @@
#ifndef MM_UNLOCK_RETRIES_H
#define MM_UNLOCK_RETRIES_H
#if !defined (__LIBMM_GLIB_H_INSIDE__) && !defined (LIBMM_GLIB_COMPILATION)
#error "Only <libmm-glib.h> can be included directly."
#endif
#include <ModemManager.h>
#include <glib-object.h>