summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohannes Schanda <schanda@itestra.de>2013-06-17 11:44:09 +0200
committerJohannes Schanda <schanda@itestra.de>2013-06-17 11:44:09 +0200
commit2440cd3058d3706ba5ff10ca4e3a6e111bc1f1d6 (patch)
treeebfc6f430eaed5ad26075a13bc8b21bde9d1cfe0 /src
parent1276e4f8b360021e620af13d939447a659a8485c (diff)
downloadgenivi-common-api-runtime-2440cd3058d3706ba5ff10ca4e3a6e111bc1f1d6.tar.gz
Add compile guard macro
- Sets a macro preventing inclusion of internal files - Adds makefile defenition to enable build
Diffstat (limited to 'src')
-rw-r--r--src/CommonAPI/Attribute.h5
-rw-r--r--src/CommonAPI/AttributeExtension.h5
-rw-r--r--src/CommonAPI/CommonAPI.h4
-rw-r--r--src/CommonAPI/Event.h5
-rw-r--r--src/CommonAPI/Factory.h4
-rw-r--r--src/CommonAPI/InputStream.h5
-rw-r--r--src/CommonAPI/MainLoopContext.h4
-rw-r--r--src/CommonAPI/MiddlewareInfo.h5
-rw-r--r--src/CommonAPI/OutputStream.h5
-rw-r--r--src/CommonAPI/Proxy.h5
-rw-r--r--src/CommonAPI/Runtime.h5
-rw-r--r--src/CommonAPI/SerializableStruct.h5
-rw-r--r--src/CommonAPI/SerializableVariant.h5
-rw-r--r--src/CommonAPI/ServicePublisher.h4
-rw-r--r--src/CommonAPI/Stub.h5
-rw-r--r--src/CommonAPI/types.h5
16 files changed, 74 insertions, 2 deletions
diff --git a/src/CommonAPI/Attribute.h b/src/CommonAPI/Attribute.h
index d9c2391..aa5a213 100644
--- a/src/CommonAPI/Attribute.h
+++ b/src/CommonAPI/Attribute.h
@@ -4,6 +4,11 @@
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#if !defined (COMMONAPI_INTERNAL_COMPILATION)
+#error "Only <CommonAPI/CommonAPI.h> can be included directly, this file may disappear or change contents."
+#endif
+
#ifndef COMMONAPI_ATTRIBUTE_H_
#define COMMONAPI_ATTRIBUTE_H_
diff --git a/src/CommonAPI/AttributeExtension.h b/src/CommonAPI/AttributeExtension.h
index 4a1b4d6..d73c2a3 100644
--- a/src/CommonAPI/AttributeExtension.h
+++ b/src/CommonAPI/AttributeExtension.h
@@ -4,6 +4,11 @@
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#if !defined (COMMONAPI_INTERNAL_COMPILATION)
+#error "Only <CommonAPI/CommonAPI.h> can be included directly, this file may disappear or change contents."
+#endif
+
#ifndef COMMON_API_DBUS_ATTRIBUTE_EXTENSION_H_
#define COMMON_API_DBUS_ATTRIBUTE_EXTENSION_H_
diff --git a/src/CommonAPI/CommonAPI.h b/src/CommonAPI/CommonAPI.h
index 332c5d8..f72d1d2 100644
--- a/src/CommonAPI/CommonAPI.h
+++ b/src/CommonAPI/CommonAPI.h
@@ -9,14 +9,14 @@
#define COMMONAPI_H_
-#define COMMONAPI_COMPILATION
+#define COMMONAPI_INTERNAL_COMPILATION
#include "Runtime.h"
#include "Factory.h"
#include "AttributeExtension.h"
#include "types.h"
-#undef COMMONAPI_COMPILATION
+#undef COMMONAPI_INTERNAL_COMPILATION
#endif /* COMMONAPI_H_ */
diff --git a/src/CommonAPI/Event.h b/src/CommonAPI/Event.h
index 6c7c1cf..b86f58c 100644
--- a/src/CommonAPI/Event.h
+++ b/src/CommonAPI/Event.h
@@ -4,6 +4,11 @@
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#if !defined (COMMONAPI_INTERNAL_COMPILATION)
+#error "Only <CommonAPI/CommonAPI.h> can be included directly, this file may disappear or change contents."
+#endif
+
#ifndef COMMONAPI_EVENT_H_
#define COMMONAPI_EVENT_H_
diff --git a/src/CommonAPI/Factory.h b/src/CommonAPI/Factory.h
index f0f1b0d..e5d5993 100644
--- a/src/CommonAPI/Factory.h
+++ b/src/CommonAPI/Factory.h
@@ -5,6 +5,10 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+#if !defined (COMMONAPI_INTERNAL_COMPILATION)
+#error "Only <CommonAPI/CommonAPI.h> can be included directly, this file may disappear or change contents."
+#endif
+
#ifndef COMMONAPI_FACTORY_H_
#define COMMONAPI_FACTORY_H_
diff --git a/src/CommonAPI/InputStream.h b/src/CommonAPI/InputStream.h
index 3e03f76..e7c3e10 100644
--- a/src/CommonAPI/InputStream.h
+++ b/src/CommonAPI/InputStream.h
@@ -4,6 +4,11 @@
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#if !defined (COMMONAPI_INTERNAL_COMPILATION)
+#error "Only <CommonAPI/CommonAPI.h> can be included directly, this file may disappear or change contents."
+#endif
+
#ifndef COMMONAPI_INPUT_STREAM_H_
#define COMMONAPI_INPUT_STREAM_H_
diff --git a/src/CommonAPI/MainLoopContext.h b/src/CommonAPI/MainLoopContext.h
index a391db4..0d87442 100644
--- a/src/CommonAPI/MainLoopContext.h
+++ b/src/CommonAPI/MainLoopContext.h
@@ -5,6 +5,10 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+#if !defined (COMMONAPI_INTERNAL_COMPILATION)
+#error "Only <CommonAPI/CommonAPI.h> can be included directly, this file may disappear or change contents."
+#endif
+
#ifndef COMMONAPI_MAIN_LOOP_CONTEXT_H_
#define COMMONAPI_MAIN_LOOP_CONTEXT_H_
diff --git a/src/CommonAPI/MiddlewareInfo.h b/src/CommonAPI/MiddlewareInfo.h
index a81076a..6b69691 100644
--- a/src/CommonAPI/MiddlewareInfo.h
+++ b/src/CommonAPI/MiddlewareInfo.h
@@ -4,6 +4,11 @@
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#if !defined (COMMONAPI_INTERNAL_COMPILATION)
+#error "Only <CommonAPI/CommonAPI.h> can be included directly, this file may disappear or change contents."
+#endif
+
#ifndef MIDDLEWAREINFO_H_
#define MIDDLEWAREINFO_H_
diff --git a/src/CommonAPI/OutputStream.h b/src/CommonAPI/OutputStream.h
index 517aaa8..9a4a521 100644
--- a/src/CommonAPI/OutputStream.h
+++ b/src/CommonAPI/OutputStream.h
@@ -4,6 +4,11 @@
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#if !defined (COMMONAPI_INTERNAL_COMPILATION)
+#error "Only <CommonAPI/CommonAPI.h> can be included directly, this file may disappear or change contents."
+#endif
+
#ifndef COMMONAPI_OUTPUT_STREAM_H_
#define COMMONAPI_OUTPUT_STREAM_H_
diff --git a/src/CommonAPI/Proxy.h b/src/CommonAPI/Proxy.h
index 186af1d..59575ff 100644
--- a/src/CommonAPI/Proxy.h
+++ b/src/CommonAPI/Proxy.h
@@ -4,6 +4,11 @@
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#if !defined (COMMONAPI_INTERNAL_COMPILATION)
+#error "Only <CommonAPI/CommonAPI.h> can be included directly, this file may disappear or change contents."
+#endif
+
#ifndef COMMONAPI_PROXY_H_
#define COMMONAPI_PROXY_H_
diff --git a/src/CommonAPI/Runtime.h b/src/CommonAPI/Runtime.h
index 937047b..7b666b6 100644
--- a/src/CommonAPI/Runtime.h
+++ b/src/CommonAPI/Runtime.h
@@ -4,6 +4,11 @@
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#if !defined (COMMONAPI_INTERNAL_COMPILATION)
+#error "Only <CommonAPI/CommonAPI.h> can be included directly, this file may disappear or change contents."
+#endif
+
#ifndef COMMONAPI_RUNTIME_H_
#define COMMONAPI_RUNTIME_H_
diff --git a/src/CommonAPI/SerializableStruct.h b/src/CommonAPI/SerializableStruct.h
index 0de7e15..c704387 100644
--- a/src/CommonAPI/SerializableStruct.h
+++ b/src/CommonAPI/SerializableStruct.h
@@ -4,6 +4,11 @@
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#if !defined (COMMONAPI_INTERNAL_COMPILATION)
+#error "Only <CommonAPI/CommonAPI.h> can be included directly, this file may disappear or change contents."
+#endif
+
#ifndef COMMONAPI_SERIALIZABLE_STRUCT_H_
#define COMMONAPI_SERIALIZABLE_STRUCT_H_
diff --git a/src/CommonAPI/SerializableVariant.h b/src/CommonAPI/SerializableVariant.h
index a842fda..a1b02de 100644
--- a/src/CommonAPI/SerializableVariant.h
+++ b/src/CommonAPI/SerializableVariant.h
@@ -4,6 +4,11 @@
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#if !defined (COMMONAPI_INTERNAL_COMPILATION)
+#error "Only <CommonAPI/CommonAPI.h> can be included directly, this file may disappear or change contents."
+#endif
+
#ifndef COMMONAPI_SERIALIZABLE_VARIANT_H_
#define COMMONAPI_SERIALIZABLE_VARIANT_H_
diff --git a/src/CommonAPI/ServicePublisher.h b/src/CommonAPI/ServicePublisher.h
index 43bbeb9..0fce54f 100644
--- a/src/CommonAPI/ServicePublisher.h
+++ b/src/CommonAPI/ServicePublisher.h
@@ -5,6 +5,10 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+#if !defined (COMMONAPI_INTERNAL_COMPILATION)
+#error "Only <CommonAPI/CommonAPI.h> can be included directly, this file may disappear or change contents."
+#endif
+
#ifndef COMMONAPI_SERVICE_PUBLISHER_H_
#define COMMONAPI_SERVICE_PUBLISHER_H_
diff --git a/src/CommonAPI/Stub.h b/src/CommonAPI/Stub.h
index 7353f54..22892f4 100644
--- a/src/CommonAPI/Stub.h
+++ b/src/CommonAPI/Stub.h
@@ -4,6 +4,11 @@
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#if !defined (COMMONAPI_INTERNAL_COMPILATION)
+#error "Only <CommonAPI/CommonAPI.h> can be included directly, this file may disappear or change contents."
+#endif
+
#ifndef COMMONAPI_STUB_H_
#define COMMONAPI_STUB_H_
diff --git a/src/CommonAPI/types.h b/src/CommonAPI/types.h
index 413f428..c7fdeb8 100644
--- a/src/CommonAPI/types.h
+++ b/src/CommonAPI/types.h
@@ -4,6 +4,11 @@
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#if !defined (COMMONAPI_INTERNAL_COMPILATION)
+#error "Only <CommonAPI/CommonAPI.h> can be included directly, this file may disappear or change contents."
+#endif
+
#ifndef COMMONAPI_TYPES_H_
#define COMMONAPI_TYPES_H_