You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by pn...@apache.org on 2023/04/16 20:26:06 UTC
[celix] branch feature/export_headers updated (c3bcde55 -> 92230e48)
This is an automated email from the ASF dual-hosted git repository.
pnoltes pushed a change to branch feature/export_headers
in repository https://gitbox.apache.org/repos/asf/celix.git
from c3bcde55 Add symbols export configuration for celix_utils
new 35ecfceb Add export header for etcdlib
new 860f7a87 Add export header for dfi
new ad63f68c Fix wrong usage of EXPORT marco on structs
new 5d24e831 Remove VISIBILITY_INLINES_HIDDEN from c libs visibility config
new 6a0baac7 Update framework headers to include "celix_framework_export.h"
new 0e45c169 Refactor framework and utils object library for export headers
new dcaa4703 Apply export header macros for framework, utils and dfi
new 01cdb31d Add export macro for private functions used in unit tests
new 92230e48 Remove resolved TODO comment
The 9 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
CMakeLists.txt | 3 +
libs/dfi/CMakeLists.txt | 23 ++--
libs/dfi/include/avrobin_serializer.h | 9 +-
libs/dfi/include/dfi_log_util.h | 4 +-
libs/dfi/include/dyn_common.h | 11 +-
libs/dfi/include/dyn_function.h | 27 ++--
libs/dfi/include/dyn_interface.h | 24 ++--
libs/dfi/include/dyn_message.h | 22 ++--
libs/dfi/include/dyn_type.h | 62 ++++-----
libs/dfi/include/json_rpc.h | 7 +-
libs/dfi/include/json_serializer.h | 9 +-
libs/etcdlib/CMakeLists.txt | 39 +++---
libs/etcdlib/api/etcd.h | 25 ++--
libs/etcdlib/api/etcdlib.h | 23 ++--
libs/framework/CMakeLists.txt | 84 ++++++++++---
.../BundleArchiveWithErrorInjectionTestSuite.cc | 28 ++---
libs/framework/include/celix_bundle.h | 39 +++---
libs/framework/include/celix_bundle_activator.h | 15 +--
libs/framework/include/celix_bundle_context.h | 138 ++++++++++-----------
libs/framework/include/celix_bundle_event.h | 1 -
libs/framework/include/celix_bundle_state.h | 4 +-
libs/framework/include/celix_dependency_manager.h | 34 ++---
libs/framework/include/celix_dm_component.h | 49 ++++----
libs/framework/include/celix_dm_info.h | 3 +-
.../include/celix_dm_service_dependency.h | 31 +++--
libs/framework/include/celix_framework.h | 59 ++++-----
libs/framework/include/celix_framework_factory.h | 5 +-
libs/framework/include/celix_framework_utils.h | 10 +-
libs/framework/include/celix_launcher.h | 17 +--
libs/framework/include/celix_log.h | 17 +--
libs/framework/include/celix_service_event.h | 4 +-
libs/framework/include/celix_types.h | 9 ++
libs/framework/include_deprecated/archive.h | 3 +-
libs/framework/include_deprecated/bundle.h | 67 +++++-----
.../include_deprecated/bundle_activator.h | 15 +--
libs/framework/include_deprecated/bundle_archive.h | 42 ++++---
libs/framework/include_deprecated/bundle_context.h | 53 ++++----
.../framework/include_deprecated/bundle_revision.h | 11 +-
libs/framework/include_deprecated/capability.h | 11 +-
libs/framework/include_deprecated/dm_activator.h | 7 +-
libs/framework/include_deprecated/dm_component.h | 43 +++----
.../include_deprecated/dm_dependency_manager.h | 15 +--
.../include_deprecated/dm_service_dependency.h | 28 ++---
libs/framework/include_deprecated/framework.h | 17 ++-
libs/framework/include_deprecated/manifest.h | 22 ++--
libs/framework/include_deprecated/module.h | 54 ++++----
libs/framework/include_deprecated/requirement.h | 12 +-
.../include_deprecated/service_listener.h | 1 -
.../include_deprecated/service_reference.h | 26 ++--
.../include_deprecated/service_registration.h | 17 ++-
.../include_deprecated/service_registry.h | 51 ++++----
.../framework/include_deprecated/service_tracker.h | 35 +++---
.../service_tracker_customizer.h | 15 +--
libs/framework/include_deprecated/wire.h | 13 +-
libs/framework/src/bundle_archive.c | 6 +-
libs/framework/src/bundle_archive_private.h | 4 +-
libs/framework/src/bundle_context.c | 2 +-
libs/framework/src/bundle_private.h | 8 +-
libs/framework/src/bundle_revision.c | 4 +-
libs/framework/src/bundle_revision_private.h | 4 +-
libs/framework/src/celix_bundle_cache.c | 2 +-
libs/framework/src/celix_framework_utils_private.h | 18 ++-
libs/framework/src/framework_private.h | 32 ++---
libs/framework/src/service_reference.c | 4 +-
libs/utils/CMakeLists.txt | 128 ++++++++++++-------
libs/utils/include/celix_convert_utils.h | 9 +-
libs/utils/include/celix_errno.h | 4 +-
libs/utils/include/celix_file_utils.h | 18 +--
libs/utils/include/celix_filter.h | 17 +--
libs/utils/include/celix_log_utils.h | 17 +--
libs/utils/include/celix_long_hash_map.h | 39 +++---
libs/utils/include/celix_properties.h | 53 ++++----
libs/utils/include/celix_string_hash_map.h | 39 +++---
libs/utils/include/celix_threads.h | 68 +++++-----
libs/utils/include/celix_utils.h | 34 ++---
libs/utils/include/celix_version.h | 32 ++---
libs/utils/include/celix_version_range.h | 23 ++--
libs/utils/src/celix_convert_utils.c | 6 +-
78 files changed, 1065 insertions(+), 899 deletions(-)
[celix] 07/09: Apply export header macros for framework, utils and dfi
Posted by pn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
pnoltes pushed a commit to branch feature/export_headers
in repository https://gitbox.apache.org/repos/asf/celix.git
commit dcaa4703a69014f501683f292453c0018db5d63c
Author: Pepijn Noltes <pe...@gmail.com>
AuthorDate: Sun Apr 16 20:00:18 2023 +0200
Apply export header macros for framework, utils and dfi
---
libs/dfi/CMakeLists.txt | 4 +-
libs/dfi/include/avrobin_serializer.h | 2 +-
libs/dfi/include/dfi_log_util.h | 2 +-
libs/dfi/include/dyn_common.h | 2 +-
libs/dfi/include/dyn_function.h | 2 +-
libs/dfi/include/dyn_interface.h | 2 +-
libs/dfi/include/dyn_message.h | 2 +-
libs/dfi/include/dyn_type.h | 2 +-
libs/dfi/include/json_rpc.h | 2 +-
libs/dfi/include/json_serializer.h | 2 +-
libs/framework/include/celix_bundle.h | 32 +++---
libs/framework/include/celix_bundle_activator.h | 8 +-
libs/framework/include/celix_bundle_context.h | 127 ++++++++++-----------
libs/framework/include/celix_bundle_event.h | 1 -
libs/framework/include/celix_bundle_state.h | 2 +-
libs/framework/include/celix_constants.h | 2 -
libs/framework/include/celix_dependency_manager.h | 32 +++---
libs/framework/include/celix_dm_component.h | 48 ++++----
libs/framework/include/celix_dm_info.h | 1 -
.../include/celix_dm_service_dependency.h | 29 +++--
libs/framework/include/celix_framework.h | 56 ++++-----
libs/framework/include/celix_framework_factory.h | 4 +-
libs/framework/include/celix_framework_utils.h | 8 +-
libs/framework/include/celix_launcher.h | 16 +--
libs/framework/include/celix_log.h | 14 +--
libs/framework/include/celix_types.h | 9 ++
libs/framework/include_deprecated/archive.h | 3 +-
libs/framework/include_deprecated/bundle.h | 67 +++++------
.../include_deprecated/bundle_activator.h | 15 +--
libs/framework/include_deprecated/bundle_archive.h | 42 ++++---
libs/framework/include_deprecated/bundle_context.h | 53 +++++----
.../framework/include_deprecated/bundle_revision.h | 11 +-
libs/framework/include_deprecated/capability.h | 11 +-
libs/framework/include_deprecated/dm_activator.h | 7 +-
libs/framework/include_deprecated/dm_component.h | 43 +++----
.../include_deprecated/dm_dependency_manager.h | 15 +--
.../include_deprecated/dm_service_dependency.h | 28 ++---
libs/framework/include_deprecated/framework.h | 17 ++-
libs/framework/include_deprecated/manifest.h | 22 ++--
libs/framework/include_deprecated/module.h | 54 ++++-----
libs/framework/include_deprecated/requirement.h | 12 +-
.../include_deprecated/service_listener.h | 1 -
.../include_deprecated/service_reference.h | 26 ++---
.../include_deprecated/service_registration.h | 17 ++-
.../include_deprecated/service_registry.h | 51 +++++----
.../framework/include_deprecated/service_tracker.h | 35 +++---
.../service_tracker_customizer.h | 15 +--
libs/framework/include_deprecated/wire.h | 13 ++-
libs/framework/src/bundle_context.c | 2 +-
libs/framework/src/bundle_private.h | 8 +-
libs/framework/src/celix_framework_utils_private.h | 18 ++-
libs/framework/src/framework_private.h | 32 +++---
libs/framework/src/service_reference.c | 4 +-
libs/utils/include/celix_convert_utils.h | 9 +-
libs/utils/include/celix_errno.h | 4 +-
libs/utils/include/celix_file_utils.h | 18 +--
libs/utils/include/celix_filter.h | 17 +--
libs/utils/include/celix_log_utils.h | 17 +--
libs/utils/include/celix_long_hash_map.h | 39 ++++---
libs/utils/include/celix_properties.h | 53 ++++-----
libs/utils/include/celix_string_hash_map.h | 39 ++++---
libs/utils/include/celix_threads.h | 68 +++++------
libs/utils/include/celix_utils.h | 34 +++---
libs/utils/include/celix_version.h | 32 +++---
libs/utils/include/celix_version_range.h | 23 ++--
libs/utils/src/celix_convert_utils.c | 6 +-
66 files changed, 713 insertions(+), 679 deletions(-)
diff --git a/libs/dfi/CMakeLists.txt b/libs/dfi/CMakeLists.txt
index 5b5289e3..41dd8553 100644
--- a/libs/dfi/CMakeLists.txt
+++ b/libs/dfi/CMakeLists.txt
@@ -47,10 +47,10 @@ if (CELIX_DFI)
"SOVERSION" 1
OUTPUT_NAME "celix_dfi")
- generate_export_header(utils_obj
+ generate_export_header(dfi
BASE_NAME "CELIX_DFI"
EXPORT_FILE_NAME "${CMAKE_BINARY_DIR}/celix/gen/includes/dfi/celix_dfi_export.h")
- target_include_directories(utils_obj PUBLIC $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/celix/gen/includes/dfi>)
+ target_include_directories(dfi PUBLIC $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/celix/gen/includes/dfi>)
install(TARGETS dfi EXPORT celix DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT dfi
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/celix_dfi)
diff --git a/libs/dfi/include/avrobin_serializer.h b/libs/dfi/include/avrobin_serializer.h
index b9a2e4c7..c4f81c20 100644
--- a/libs/dfi/include/avrobin_serializer.h
+++ b/libs/dfi/include/avrobin_serializer.h
@@ -23,7 +23,7 @@
#include "dyn_type.h"
#include "dyn_function.h"
#include "dyn_interface.h"
-#include "celix_df_export.h"
+#include "celix_dfi_export.h"
#ifdef __cplusplus
extern "C" {
diff --git a/libs/dfi/include/dfi_log_util.h b/libs/dfi/include/dfi_log_util.h
index 5764d9fa..2f3294b4 100644
--- a/libs/dfi/include/dfi_log_util.h
+++ b/libs/dfi/include/dfi_log_util.h
@@ -20,7 +20,7 @@
#ifndef _DFI_LOG_UTIL_H_
#define _DFI_LOG_UTIL_H_
-#include "celix_df_export.h"
+#include "celix_dfi_export.h"
#ifdef __cplusplus
extern "C" {
diff --git a/libs/dfi/include/dyn_common.h b/libs/dfi/include/dyn_common.h
index ff2eae8b..e40bb543 100644
--- a/libs/dfi/include/dyn_common.h
+++ b/libs/dfi/include/dyn_common.h
@@ -26,7 +26,7 @@
#include <sys/queue.h>
#include "dfi_log_util.h"
-#include "celix_df_export.h"
+#include "celix_dfi_export.h"
#ifdef __cplusplus
extern "C" {
diff --git a/libs/dfi/include/dyn_function.h b/libs/dfi/include/dyn_function.h
index 269e9cbe..36bf8f5a 100644
--- a/libs/dfi/include/dyn_function.h
+++ b/libs/dfi/include/dyn_function.h
@@ -22,7 +22,7 @@
#include "dyn_type.h"
#include "dfi_log_util.h"
-#include "celix_df_export.h"
+#include "celix_dfi_export.h"
#ifdef __cplusplus
extern "C" {
diff --git a/libs/dfi/include/dyn_interface.h b/libs/dfi/include/dyn_interface.h
index 6927485a..c05d6b0a 100644
--- a/libs/dfi/include/dyn_interface.h
+++ b/libs/dfi/include/dyn_interface.h
@@ -25,7 +25,7 @@
#include "dyn_function.h"
#include "dfi_log_util.h"
#include "celix_version.h"
-#include "celix_df_export.h"
+#include "celix_dfi_export.h"
#ifdef __cplusplus
extern "C" {
diff --git a/libs/dfi/include/dyn_message.h b/libs/dfi/include/dyn_message.h
index 6b3deeba..b31892df 100644
--- a/libs/dfi/include/dyn_message.h
+++ b/libs/dfi/include/dyn_message.h
@@ -24,7 +24,7 @@
#include "dyn_type.h"
#include "dfi_log_util.h"
#include "celix_version.h"
-#include "celix_df_export.h"
+#include "celix_dfi_export.h"
#ifdef __cplusplus
extern "C" {
diff --git a/libs/dfi/include/dyn_type.h b/libs/dfi/include/dyn_type.h
index 145dbfa3..c0f708c3 100644
--- a/libs/dfi/include/dyn_type.h
+++ b/libs/dfi/include/dyn_type.h
@@ -26,7 +26,7 @@
#include <stdint.h>
#include "dfi_log_util.h"
-#include "celix_df_export.h"
+#include "celix_dfi_export.h"
#ifdef __cplusplus
extern "C" {
diff --git a/libs/dfi/include/json_rpc.h b/libs/dfi/include/json_rpc.h
index 68783fa8..95bdb84a 100644
--- a/libs/dfi/include/json_rpc.h
+++ b/libs/dfi/include/json_rpc.h
@@ -25,7 +25,7 @@
#include "dyn_type.h"
#include "dyn_function.h"
#include "dyn_interface.h"
-#include "celix_df_export.h"
+#include "celix_dfi_export.h"
#ifdef __cplusplus
extern "C" {
diff --git a/libs/dfi/include/json_serializer.h b/libs/dfi/include/json_serializer.h
index 91311dcf..abaf7971 100644
--- a/libs/dfi/include/json_serializer.h
+++ b/libs/dfi/include/json_serializer.h
@@ -25,7 +25,7 @@
#include "dyn_type.h"
#include "dyn_function.h"
#include "dyn_interface.h"
-#include "celix_df_export.h"
+#include "celix_dfi_export.h"
#ifdef __cplusplus
extern "C" {
diff --git a/libs/framework/include/celix_bundle.h b/libs/framework/include/celix_bundle.h
index 565bc725..63121eda 100644
--- a/libs/framework/include/celix_bundle.h
+++ b/libs/framework/include/celix_bundle.h
@@ -36,14 +36,14 @@ extern "C" {
* @param bnd The bundle
* @return The bundle id or < 0 if something went wrong.
*/
-long celix_bundle_getId(const celix_bundle_t *bnd);
+CELIX_FRAMEWORK_EXPORT long celix_bundle_getId(const celix_bundle_t *bnd);
/**
* @brief Return the bundle state.
* @param bnd The bundle
* @return The bundle state or OSGI_FRAMEWORK_BUNDLE_UNKNOWN if something went wrong.
*/
-celix_bundle_state_e celix_bundle_getState(const celix_bundle_t *bnd);
+CELIX_FRAMEWORK_EXPORT celix_bundle_state_e celix_bundle_getState(const celix_bundle_t *bnd);
/**
* Return a use-able entry path for the provided relative path to a bundle resource cache.
@@ -64,7 +64,7 @@ celix_bundle_state_e celix_bundle_getState(const celix_bundle_t *bnd);
* @param bnd The bundle.
* @return A use-able path to the bundle resource entry or NULL if the entry is not found.
*/
-char* celix_bundle_getEntry(const celix_bundle_t* bnd, const char *path);
+CELIX_FRAMEWORK_EXPORT char* celix_bundle_getEntry(const celix_bundle_t* bnd, const char *path);
/**
* Return a use-able entry path for the provided relative path to a bundle persistent storage.
@@ -84,7 +84,7 @@ char* celix_bundle_getEntry(const celix_bundle_t* bnd, const char *path);
* @param bnd The bundle.
* @return A use-able path to the bundle resource entry or NULL if the entry is not found.
*/
-char* celix_bundle_getDataFile(const celix_bundle_t* bnd, const char *path);
+CELIX_FRAMEWORK_EXPORT char* celix_bundle_getDataFile(const celix_bundle_t* bnd, const char *path);
/**
* @brief Get a manifest attribute value from the bundle manifest.
@@ -93,31 +93,31 @@ char* celix_bundle_getDataFile(const celix_bundle_t* bnd, const char *path);
* @return The attribute value or NULL if the attribute is not present in the bundle manifest.
* The returned value is valid as long as the bundle is not uninstalled.
*/
-const char* celix_bundle_getManifestValue(const celix_bundle_t* bnd, const char* attribute);
+CELIX_FRAMEWORK_EXPORT const char* celix_bundle_getManifestValue(const celix_bundle_t* bnd, const char* attribute);
/**
* @brief Return the group of the bundle. Groups are used to order bundles.
* Note the return value is valid as long as the bundle is installed.
*/
-const char* celix_bundle_getGroup(const celix_bundle_t *bnd);
+CELIX_FRAMEWORK_EXPORT const char* celix_bundle_getGroup(const celix_bundle_t *bnd);
/**
* @brief Return the symbolic name of the bundle.
* Note the return value is valid as long as the bundle is installed.
*/
-const char* celix_bundle_getSymbolicName(const celix_bundle_t *bnd);
+CELIX_FRAMEWORK_EXPORT const char* celix_bundle_getSymbolicName(const celix_bundle_t *bnd);
/**
* @brief Return the name of the bundle.
* Note the return value is valid as long as the bundle is installed.
*/
-const char* celix_bundle_getName(const celix_bundle_t* bnd);
+CELIX_FRAMEWORK_EXPORT const char* celix_bundle_getName(const celix_bundle_t* bnd);
/**
* @brief Return the description of the bundle.
* Note the return value is valid as long as the bundle is installed.
*/
-const char* celix_bundle_getDescription(const celix_bundle_t* bnd);
+CELIX_FRAMEWORK_EXPORT const char* celix_bundle_getDescription(const celix_bundle_t* bnd);
/**
* @brief Return the update location of the bundle.
@@ -127,18 +127,18 @@ const char* celix_bundle_getDescription(const celix_bundle_t* bnd);
* @return The update location of the bundle or NULL if the bundle is the framework bundle.
* The caller is responsible for freeing the returned string.
*/
-char* celix_bundle_getLocation(const celix_bundle_t *bnd);
+CELIX_FRAMEWORK_EXPORT char* celix_bundle_getLocation(const celix_bundle_t *bnd);
/**
* @brief Return the bundle version.
* Note the return value is valid as long as the bundle is installed.
*/
-const celix_version_t* celix_bundle_getVersion(const celix_bundle_t *bnd);
+CELIX_FRAMEWORK_EXPORT const celix_version_t* celix_bundle_getVersion(const celix_bundle_t *bnd);
/**
* @brief Return whether the bundle is the system bundle.
*/
-bool celix_bundle_isSystemBundle(const celix_bundle_t *bnd);
+CELIX_FRAMEWORK_EXPORT bool celix_bundle_isSystemBundle(const celix_bundle_t *bnd);
typedef struct celix_bundle_service_list_entry {
long serviceId;
@@ -155,12 +155,12 @@ typedef struct celix_bundle_service_list_entry {
* @param bndId The bundle id for which the services should be listed
* @return A celix array list with celix_bundle_service_list_entry_t*. Caller is owner of the celix array.
*/
-celix_array_list_t* celix_bundle_listRegisteredServices(const celix_bundle_t *bnd);
+CELIX_FRAMEWORK_EXPORT celix_array_list_t* celix_bundle_listRegisteredServices(const celix_bundle_t *bnd);
/**
* Utils function to free memory for the return of a celix_bundle_listRegisteredServices call.
*/
-void celix_bundle_destroyRegisteredServicesList(celix_array_list_t* list);
+CELIX_FRAMEWORK_EXPORT void celix_bundle_destroyRegisteredServicesList(celix_array_list_t* list);
/**
@@ -181,12 +181,12 @@ typedef struct celix_bundle_service_tracker_list_entry {
* @param bndId The bundle id for which the services should be listed
* @return A celix array list with celix_bundle_service_tracker_list_entry_t*. Caller is owner of the celix array.
*/
-celix_array_list_t* celix_bundle_listServiceTrackers(const celix_bundle_t *bnd);
+CELIX_FRAMEWORK_EXPORT celix_array_list_t* celix_bundle_listServiceTrackers(const celix_bundle_t *bnd);
/**
* Utils function to free memory for the return of a celix_bundle_listServiceTrackers call.
*/
-void celix_bundle_destroyServiceTrackerList(celix_array_list_t* list);
+CELIX_FRAMEWORK_EXPORT void celix_bundle_destroyServiceTrackerList(celix_array_list_t* list);
#ifdef __cplusplus
diff --git a/libs/framework/include/celix_bundle_activator.h b/libs/framework/include/celix_bundle_activator.h
index 959370fa..efa9ff75 100644
--- a/libs/framework/include/celix_bundle_activator.h
+++ b/libs/framework/include/celix_bundle_activator.h
@@ -48,7 +48,7 @@ extern "C" {
* - Any other status code will mark the bundle as stopped and the framework will remove this
* bundle's listeners, unregister all services, and release all services used by this bundle.
*/
-celix_status_t celix_bundleActivator_create(celix_bundle_context_t *ctx, void **userData);
+CELIX_FRAMEWORK_EXPORT celix_status_t celix_bundleActivator_create(celix_bundle_context_t *ctx, void **userData);
/**
* @brief Called when this bundle is started so the Framework can perform the bundle-specific activities necessary
@@ -67,7 +67,7 @@ celix_status_t celix_bundleActivator_create(celix_bundle_context_t *ctx, void **
* - Any other status code will mark the bundle as stopped and the framework will remove this
* bundle's listeners, unregister all services, and release all services used by this bundle.
*/
-celix_status_t celix_bundleActivator_start(void *userData, celix_bundle_context_t *ctx);
+CELIX_FRAMEWORK_EXPORT celix_status_t celix_bundleActivator_start(void *userData, celix_bundle_context_t *ctx);
/**
* @brief Called when this bundle is stopped so the Framework can perform the bundle-specific activities necessary
@@ -88,7 +88,7 @@ celix_status_t celix_bundleActivator_start(void *userData, celix_bundle_context_
* - Any other status code will mark the bundle as stopped and the framework will remove this
* bundle's listeners, unregister all services, and release all services used by this bundle.
*/
-celix_status_t celix_bundleActivator_stop(void *userData, celix_bundle_context_t *ctx);
+CELIX_FRAMEWORK_EXPORT celix_status_t celix_bundleActivator_stop(void *userData, celix_bundle_context_t *ctx);
/**
* @brief Called when this bundle is stopped so the bundle can destroy the instance of its activator.
@@ -106,7 +106,7 @@ celix_status_t celix_bundleActivator_stop(void *userData, celix_bundle_context_t
* - Any other status code will mark the bundle as stopped and the framework will remove this
* bundle's listeners, unregister all services, and release all services used by this bundle.
*/
-celix_status_t celix_bundleActivator_destroy(void *userData, celix_bundle_context_t* ctx);
+CELIX_FRAMEWORK_EXPORT celix_status_t celix_bundleActivator_destroy(void *userData, celix_bundle_context_t* ctx);
/**
* @brief This macro generates the required bundle activator functions for C.
diff --git a/libs/framework/include/celix_bundle_context.h b/libs/framework/include/celix_bundle_context.h
index 9695b837..f5de9c38 100644
--- a/libs/framework/include/celix_bundle_context.h
+++ b/libs/framework/include/celix_bundle_context.h
@@ -58,7 +58,7 @@ extern "C" {
* @param properties The meta properties associated with the service. The service registration will take ownership of the properties (i.e. no destroy needed)
* @return The serviceId (>=0) or -1 if the registration was unsuccessful.
*/
-long celix_bundleContext_registerServiceAsync(celix_bundle_context_t *ctx, void *svc, const char* serviceName, celix_properties_t *properties);
+CELIX_FRAMEWORK_EXPORT long celix_bundleContext_registerServiceAsync(celix_bundle_context_t *ctx, void *svc, const char* serviceName, celix_properties_t *properties);
/**
* @brief Register a service to the Celix framework.
@@ -71,7 +71,7 @@ long celix_bundleContext_registerServiceAsync(celix_bundle_context_t *ctx, void
* @param properties The meta properties associated with the service. The service registration will take ownership of the properties (i.e. no destroy needed)
* @return The serviceId (>=0) or -1 if the registration was unsuccessful.
*/
-long celix_bundleContext_registerService(celix_bundle_context_t *ctx, void *svc, const char* serviceName, celix_properties_t *properties);
+CELIX_FRAMEWORK_EXPORT long celix_bundleContext_registerService(celix_bundle_context_t *ctx, void *svc, const char* serviceName, celix_properties_t *properties);
/**
* @brief Register a service factory in the framework.
@@ -95,7 +95,7 @@ long celix_bundleContext_registerService(celix_bundle_context_t *ctx, void *svc,
* @param properties The optional service factory properties. For a service consumer this will be seen as the service properties.
* @return The serviceId (>= 0) or < 0 if the registration was unsuccessful.
*/
-long celix_bundleContext_registerServiceFactoryAsync(celix_bundle_context_t *ctx, celix_service_factory_t *factory, const char* serviceName, celix_properties_t *props);
+CELIX_FRAMEWORK_EXPORT long celix_bundleContext_registerServiceFactoryAsync(celix_bundle_context_t *ctx, celix_service_factory_t *factory, const char* serviceName, celix_properties_t *props);
/**
* @brief Register a service factory in the framework.
@@ -115,7 +115,7 @@ long celix_bundleContext_registerServiceFactoryAsync(celix_bundle_context_t *ctx
* @param properties The optional service factory properties. For a service consumer this will be seen as the service properties.
* @return The serviceId (>= 0) or < 0 if the registration was unsuccessful.
*/
-long celix_bundleContext_registerServiceFactory(celix_bundle_context_t *ctx, celix_service_factory_t *factory, const char* serviceName, celix_properties_t *props);
+CELIX_FRAMEWORK_EXPORT long celix_bundleContext_registerServiceFactory(celix_bundle_context_t *ctx, celix_service_factory_t *factory, const char* serviceName, celix_properties_t *props);
/**
* @brief Service Registration Options when registering services to the Celix framework.
@@ -229,7 +229,7 @@ typedef struct celix_service_registration_options {
* @param opts The pointer to the registration options. The options are only in the during registration call.
* @return The serviceId (>= 0) or -1 if the registration was unsuccessful and -2 if the registration was cancelled (@see celix_bundleContext_reserveSvcId).
*/
-long celix_bundleContext_registerServiceWithOptionsAsync(celix_bundle_context_t *ctx, const celix_service_registration_options_t *opts);
+CELIX_FRAMEWORK_EXPORT long celix_bundleContext_registerServiceWithOptionsAsync(celix_bundle_context_t *ctx, const celix_service_registration_options_t *opts);
/**
* @brief Register a service to the Celix framework using the provided service registration options.
@@ -240,7 +240,7 @@ long celix_bundleContext_registerServiceWithOptionsAsync(celix_bundle_context_t
* @param opts The pointer to the registration options. The options are only in the during registration call.
* @return The serviceId (>= 0) or -1 if the registration was unsuccessful and -2 if the registration was cancelled (@see celix_bundleContext_reserveSvcId).
*/
-long celix_bundleContext_registerServiceWithOptions(celix_bundle_context_t *ctx, const celix_service_registration_options_t *opts);
+CELIX_FRAMEWORK_EXPORT long celix_bundleContext_registerServiceWithOptions(celix_bundle_context_t *ctx, const celix_service_registration_options_t *opts);
/**
* @brief Waits til the async service registration for the provided serviceId is done.
@@ -248,7 +248,7 @@ long celix_bundleContext_registerServiceWithOptions(celix_bundle_context_t *ctx,
* Silently ignore service ids < 0.
* Will directly return if there is no pending service registration for the provided service id.
*/
-void celix_bundleContext_waitForAsyncRegistration(celix_bundle_context_t *ctx, long serviceId);
+CELIX_FRAMEWORK_EXPORT void celix_bundleContext_waitForAsyncRegistration(celix_bundle_context_t *ctx, long serviceId);
/**
* @brief Checks whether a service for the provided service id is registered in the service registry.
@@ -258,7 +258,7 @@ void celix_bundleContext_waitForAsyncRegistration(celix_bundle_context_t *ctx, l
*
* Returns true if the service is registered in the service registry.
*/
-bool celix_bundleContext_isServiceRegistered(celix_bundle_context_t *ctx, long serviceId);
+CELIX_FRAMEWORK_EXPORT bool celix_bundleContext_isServiceRegistered(celix_bundle_context_t *ctx, long serviceId);
/**
@@ -271,7 +271,7 @@ bool celix_bundleContext_isServiceRegistered(celix_bundle_context_t *ctx, long s
* @param ctx The bundle context
* @param serviceId The service id
*/
-void celix_bundleContext_unregisterService(celix_bundle_context_t *ctx, long serviceId);
+CELIX_FRAMEWORK_EXPORT void celix_bundleContext_unregisterService(celix_bundle_context_t *ctx, long serviceId);
/**
@@ -288,18 +288,14 @@ void celix_bundleContext_unregisterService(celix_bundle_context_t *ctx, long ser
* @param doneData The data used on the doneCallback (if present)
* @param doneCallback If not NULL, this callback will be called when the unregisration is done. (will be called on the event loop thread)
*/
-void celix_bundleContext_unregisterServiceAsync(celix_bundle_context_t *ctx, long serviceId, void* doneData, void (*doneCallback)(void* doneData));
-
+CELIX_FRAMEWORK_EXPORT void celix_bundleContext_unregisterServiceAsync(celix_bundle_context_t *ctx, long serviceId, void* doneData, void (*doneCallback)(void* doneData));
/**
* @brief Waits til the async service unregistration for the provided serviceId is done.
*
* Silently ignore service < 0.
*/
-void celix_bundleContext_waitForAsyncUnregistration(celix_bundle_context_t *ctx, long serviceId);
-
-
-
+CELIX_FRAMEWORK_EXPORT void celix_bundleContext_waitForAsyncUnregistration(celix_bundle_context_t *ctx, long serviceId);
/**
* @brief Finds the highest ranking service and returns the service id.
@@ -308,7 +304,7 @@ void celix_bundleContext_waitForAsyncUnregistration(celix_bundle_context_t *ctx,
* @param serviceName The required service name
* @return If found a valid service id (>= 0) if not found -1.
*/
-long celix_bundleContext_findService(celix_bundle_context_t *ctx, const char* serviceName);
+CELIX_FRAMEWORK_EXPORT long celix_bundleContext_findService(celix_bundle_context_t *ctx, const char* serviceName);
/**
* @brief Finds the services with the provided service name and returns a list of the found service ids.
@@ -317,7 +313,7 @@ long celix_bundleContext_findService(celix_bundle_context_t *ctx, const char* se
* @param serviceName The required service name
* @return A array list with as value a long int.
*/
-celix_array_list_t* celix_bundleContext_findServices(celix_bundle_context_t *ctx, const char* serviceName);
+CELIX_FRAMEWORK_EXPORT celix_array_list_t* celix_bundleContext_findServices(celix_bundle_context_t *ctx, const char* serviceName);
/**
* @brief Service filter options which can be used to query for certain services.
@@ -367,7 +363,6 @@ typedef struct celix_service_filter_options {
#define CELIX_EMPTY_SERVICE_FILTER_OPTIONS {.serviceName = NULL, .versionRange = NULL, .filter = NULL, .serviceLanguage = NULL, .ignoreServiceLanguage = false}
#endif
-
/**
* @brief Finds the highest ranking service and returns the service id.
*
@@ -375,7 +370,7 @@ typedef struct celix_service_filter_options {
* @param opts The pointer to the filter options.
* @return If found a valid service id (>= 0) if not found -1.
*/
-long celix_bundleContext_findServiceWithOptions(celix_bundle_context_t *ctx, const celix_service_filter_options_t *opts);
+CELIX_FRAMEWORK_EXPORT long celix_bundleContext_findServiceWithOptions(celix_bundle_context_t *ctx, const celix_service_filter_options_t *opts);
/**
* @brief Finds the services conform the provider filter options and returns a list of the found service ids.
@@ -384,7 +379,7 @@ long celix_bundleContext_findServiceWithOptions(celix_bundle_context_t *ctx, con
* @param opts The pointer to the filter options.
* @return A array list with as value a long int.
*/
-celix_array_list_t* celix_bundleContext_findServicesWithOptions(celix_bundle_context_t *ctx, const celix_service_filter_options_t *opts);
+CELIX_FRAMEWORK_EXPORT celix_array_list_t* celix_bundleContext_findServicesWithOptions(celix_bundle_context_t *ctx, const celix_service_filter_options_t *opts);
/**
* @brief Track the highest ranking service with the provided serviceName.
@@ -403,7 +398,7 @@ celix_array_list_t* celix_bundleContext_findServicesWithOptions(celix_bundle_con
* @param set is a required callback, which will be called when a new highest ranking service is set.
* @return the tracker id (>=0) or < 0 if unsuccessful.
*/
-long celix_bundleContext_trackServiceAsync(
+CELIX_FRAMEWORK_EXPORT long celix_bundleContext_trackServiceAsync(
celix_bundle_context_t *ctx,
const char* serviceName,
void* callbackHandle,
@@ -425,7 +420,7 @@ long celix_bundleContext_trackServiceAsync(
* @param set is a required callback, which will be called when a new highest ranking service is set.
* @return the tracker id (>=0) or < 0 if unsuccessful.
*/
-long celix_bundleContext_trackService(
+CELIX_FRAMEWORK_EXPORT long celix_bundleContext_trackService(
celix_bundle_context_t *ctx,
const char* serviceName,
void* callbackHandle,
@@ -446,7 +441,7 @@ long celix_bundleContext_trackService(
* @param remove is a required callback, which will be called when a service is removed
* @return the tracker id (>=0) or < 0 if unsuccessful.
*/
-long celix_bundleContext_trackServicesAsync(
+CELIX_FRAMEWORK_EXPORT long celix_bundleContext_trackServicesAsync(
celix_bundle_context_t *ctx,
const char* serviceName,
void* callbackHandle,
@@ -467,7 +462,7 @@ long celix_bundleContext_trackServicesAsync(
* @param remove is a required callback, which will be called when a service is removed
* @return the tracker id (>=0) or < 0 if unsuccessful.
*/
-long celix_bundleContext_trackServices(
+CELIX_FRAMEWORK_EXPORT long celix_bundleContext_trackServices(
celix_bundle_context_t *ctx,
const char* serviceName,
void* callbackHandle,
@@ -603,7 +598,7 @@ typedef struct celix_service_tracking_options {
* @param opts The pointer to the tracker options.
* @return the tracker id (>=0) or < 0 if unsuccessful.
*/
-long celix_bundleContext_trackServicesWithOptionsAsync(celix_bundle_context_t *ctx, const celix_service_tracking_options_t *opts);
+CELIX_FRAMEWORK_EXPORT long celix_bundleContext_trackServicesWithOptionsAsync(celix_bundle_context_t *ctx, const celix_service_tracking_options_t *opts);
/**
* @brief Tracks services using the provided tracker options.
@@ -616,7 +611,7 @@ long celix_bundleContext_trackServicesWithOptionsAsync(celix_bundle_context_t *c
* @param opts The pointer to the tracker options.
* @return the tracker id (>=0) or < 0 if unsuccessful.
*/
-long celix_bundleContext_trackServicesWithOptions(celix_bundle_context_t *ctx, const celix_service_tracking_options_t *opts);
+CELIX_FRAMEWORK_EXPORT long celix_bundleContext_trackServicesWithOptions(celix_bundle_context_t *ctx, const celix_service_tracking_options_t *opts);
/**
* @brief Stop the tracker with the provided track id.
@@ -632,7 +627,7 @@ long celix_bundleContext_trackServicesWithOptions(celix_bundle_context_t *ctx, c
*
* Will log a error if the provided tracker id is unknown. Will silently ignore trackerId < 0.
*/
-void celix_bundleContext_stopTrackerAsync(
+CELIX_FRAMEWORK_EXPORT void celix_bundleContext_stopTrackerAsync(
celix_bundle_context_t *ctx,
long trackerId,
void *doneCallbackData,
@@ -641,12 +636,12 @@ void celix_bundleContext_stopTrackerAsync(
/**
* @brief Wait for (async) creation of tracker
*/
-void celix_bundleContext_waitForAsyncTracker(celix_bundle_context_t *ctx, long trackerId);
+CELIX_FRAMEWORK_EXPORT void celix_bundleContext_waitForAsyncTracker(celix_bundle_context_t *ctx, long trackerId);
/**
* @brief Wait for (async) stopping of tracking.
*/
-void celix_bundleContext_waitForAsyncStopTracker(celix_bundle_context_t *ctx, long trackerId);
+CELIX_FRAMEWORK_EXPORT void celix_bundleContext_waitForAsyncStopTracker(celix_bundle_context_t *ctx, long trackerId);
/**
* @brief Stop the tracker with the provided track id.
@@ -657,9 +652,7 @@ void celix_bundleContext_waitForAsyncStopTracker(celix_bundle_context_t *ctx, lo
*
* Will log a error if the provided tracker id is unknown. Will silently ignore trackerId < 0.
*/
-void celix_bundleContext_stopTracker(celix_bundle_context_t *ctx, long trackerId);
-
-
+CELIX_FRAMEWORK_EXPORT void celix_bundleContext_stopTracker(celix_bundle_context_t *ctx, long trackerId);
/**
* @brief Use the service with the provided service id using the provided callback. The Celix framework will ensure that
@@ -678,7 +671,7 @@ void celix_bundleContext_stopTracker(celix_bundle_context_t *ctx, long trackerId
* @param use The callback, which will be called when service is retrieved.
* @param bool returns true if a service was found.
*/
-bool celix_bundleContext_useServiceWithId(
+CELIX_FRAMEWORK_EXPORT bool celix_bundleContext_useServiceWithId(
celix_bundle_context_t *ctx,
long serviceId,
const char* serviceName /*sanity check*/,
@@ -703,7 +696,7 @@ bool celix_bundleContext_useServiceWithId(
* @param use The callback, which will be called when service is retrieved.
* @return True if a service was found.
*/
-bool celix_bundleContext_useService(
+CELIX_FRAMEWORK_EXPORT bool celix_bundleContext_useService(
celix_bundle_context_t *ctx,
const char* serviceName,
void *callbackHandle,
@@ -727,7 +720,7 @@ bool celix_bundleContext_useService(
* @param use The callback, which will be called for every service found.
* @return The number of services found and called
*/
-size_t celix_bundleContext_useServices(
+CELIX_FRAMEWORK_EXPORT size_t celix_bundleContext_useServices(
celix_bundle_context_t *ctx,
const char* serviceName,
void *callbackHandle,
@@ -820,7 +813,7 @@ typedef struct celix_service_use_options {
* @param opts The required options. Note that the serviceName is required.
* @return True if a service was found.
*/
-bool celix_bundleContext_useServiceWithOptions(
+CELIX_FRAMEWORK_EXPORT bool celix_bundleContext_useServiceWithOptions(
celix_bundle_context_t *ctx,
const celix_service_use_options_t *opts);
@@ -841,7 +834,7 @@ bool celix_bundleContext_useServiceWithOptions(
* @param opts The required options. Note that the serviceName is required.
* @return The number of services found and called
*/
-size_t celix_bundleContext_useServicesWithOptions(
+CELIX_FRAMEWORK_EXPORT size_t celix_bundleContext_useServicesWithOptions(
celix_bundle_context_t *ctx,
const celix_service_use_options_t *opts);
@@ -853,7 +846,7 @@ size_t celix_bundleContext_useServicesWithOptions(
* @param ctx The bundle context.
* @return A array with bundle ids (long). The caller is responsible for destroying the array.
*/
-celix_array_list_t* celix_bundleContext_listBundles(celix_bundle_context_t *ctx);
+CELIX_FRAMEWORK_EXPORT celix_array_list_t* celix_bundleContext_listBundles(celix_bundle_context_t *ctx);
/**
* @brief List the installed bundle ids.
@@ -862,7 +855,7 @@ celix_array_list_t* celix_bundleContext_listBundles(celix_bundle_context_t *ctx)
* @param ctx The bundle context.
* @return A array with bundle ids (long). The caller is responsible for destroying the array.
*/
-celix_array_list_t* celix_bundleContext_listInstalledBundles(celix_bundle_context_t *ctx);
+CELIX_FRAMEWORK_EXPORT celix_array_list_t* celix_bundleContext_listInstalledBundles(celix_bundle_context_t *ctx);
/**
@@ -871,7 +864,7 @@ celix_array_list_t* celix_bundleContext_listInstalledBundles(celix_bundle_contex
* @param bndId The bundle id to check
* @return true if the bundle is installed.
*/
-bool celix_bundleContext_isBundleInstalled(celix_bundle_context_t *ctx, long bndId);
+CELIX_FRAMEWORK_EXPORT bool celix_bundleContext_isBundleInstalled(celix_bundle_context_t *ctx, long bndId);
/**
* @brief Check whether the bundle is active.
@@ -879,8 +872,7 @@ bool celix_bundleContext_isBundleInstalled(celix_bundle_context_t *ctx, long bnd
* @param bndId The bundle id to check
* @return true if the bundle is installed and active.
*/
-bool celix_bundleContext_isBundleActive(celix_bundle_context_t *ctx, long bndId);
-
+CELIX_FRAMEWORK_EXPORT bool celix_bundleContext_isBundleActive(celix_bundle_context_t *ctx, long bndId);
/**
* @brief Install and optional start a bundle.
@@ -896,7 +888,7 @@ bool celix_bundleContext_isBundleActive(celix_bundle_context_t *ctx, long bndId)
* @param autoStart If the bundle should also be started.
* @return the bundleId (>= 0) or < 0 if the bundle could not be installed and possibly started.
*/
-long celix_bundleContext_installBundle(celix_bundle_context_t *ctx, const char* bundleUrl, bool autoStart);
+CELIX_FRAMEWORK_EXPORT long celix_bundleContext_installBundle(celix_bundle_context_t *ctx, const char* bundleUrl, bool autoStart);
/**
* @brief Uninstall the bundle with the provided bundle id. If needed the bundle will be stopped first.
@@ -911,7 +903,7 @@ long celix_bundleContext_installBundle(celix_bundle_context_t *ctx, const char*
* @param bndId The bundle id to uninstall.
* @return true if the bundle is correctly uninstalled. False if not.
*/
-bool celix_bundleContext_uninstallBundle(celix_bundle_context_t *ctx, long bndId);
+CELIX_FRAMEWORK_EXPORT bool celix_bundleContext_uninstallBundle(celix_bundle_context_t *ctx, long bndId);
/**
* @brief Stop the bundle with the provided bundle id.
@@ -926,7 +918,7 @@ bool celix_bundleContext_uninstallBundle(celix_bundle_context_t *ctx, long bndId
* @param bndId The bundle id to stop.
* @return true if the bundle is found & correctly stop. False if not.
*/
-bool celix_bundleContext_stopBundle(celix_bundle_context_t *ctx, long bndId);
+CELIX_FRAMEWORK_EXPORT bool celix_bundleContext_stopBundle(celix_bundle_context_t *ctx, long bndId);
/**
* @brief Start the bundle with the provided bundle id.
@@ -941,7 +933,7 @@ bool celix_bundleContext_stopBundle(celix_bundle_context_t *ctx, long bndId);
* @param bndId The bundle id to start.
* @return true if the bundle is found & correctly started. False if not.
*/
-bool celix_bundleContext_startBundle(celix_bundle_context_t *ctx, long bndId);
+CELIX_FRAMEWORK_EXPORT bool celix_bundleContext_startBundle(celix_bundle_context_t *ctx, long bndId);
/**
* @brief Update the bundle with the provided bundle id async.
@@ -966,7 +958,7 @@ bool celix_bundleContext_startBundle(celix_bundle_context_t *ctx, long bndId);
* from the bundle cache will be used.
* @return true if the bundle is found & correctly started. False if not.
*/
-bool celix_bundleContext_updateBundle(celix_bundle_context_t *ctx, long bndId, const char* updatedBundleUrl);
+CELIX_FRAMEWORK_EXPORT bool celix_bundleContext_updateBundle(celix_bundle_context_t *ctx, long bndId, const char* updatedBundleUrl);
/**
* @brief Returns the bundle symbolic name for the provided bundle id.
@@ -976,7 +968,7 @@ bool celix_bundleContext_updateBundle(celix_bundle_context_t *ctx, long bndId, c
* @param bndId The bundle id to retrieve the symbolic name for.
* @return The bundle symbolic name or NULL if the bundle for the provided bundle id does not exist.
*/
-char* celix_bundleContext_getBundleSymbolicName(celix_bundle_context_t *ctx, long bndId);
+CELIX_FRAMEWORK_EXPORT char* celix_bundleContext_getBundleSymbolicName(celix_bundle_context_t *ctx, long bndId);
/**
@@ -993,7 +985,7 @@ char* celix_bundleContext_getBundleSymbolicName(celix_bundle_context_t *ctx, lon
* @param remove The callback which will be called when bundles are stopped.
* @return The bundle tracker id or < 0 if unsuccessful.
*/
-long celix_bundleContext_trackBundlesAsync(
+CELIX_FRAMEWORK_EXPORT long celix_bundleContext_trackBundlesAsync(
celix_bundle_context_t *ctx,
void* callbackHandle,
void (*onStarted)(void* handle, const celix_bundle_t *bundle),
@@ -1013,14 +1005,13 @@ long celix_bundleContext_trackBundlesAsync(
* @param remove The callback which will be called when bundles are stopped.
* @return The bundle tracker id or < 0 if unsuccessful.
*/
-long celix_bundleContext_trackBundles(
+CELIX_FRAMEWORK_EXPORT long celix_bundleContext_trackBundles(
celix_bundle_context_t *ctx,
void* callbackHandle,
void (*onStarted)(void* handle, const celix_bundle_t *bundle),
void (*onStopped)(void *handle, const celix_bundle_t *bundle)
);
-
/**
* @brief The Service Bundle Tracking options can be used to fine tune the requested bundle tracker options.
*/
@@ -1103,7 +1094,7 @@ typedef struct celix_bundle_tracker_options {
* @param opts The pointer to the bundle tracker options.
* @return The bundle tracker id (>=0) or < 0 if unsuccessful.
*/
-long celix_bundleContext_trackBundlesWithOptionsAsync(
+CELIX_FRAMEWORK_EXPORT long celix_bundleContext_trackBundlesWithOptionsAsync(
celix_bundle_context_t *ctx,
const celix_bundle_tracking_options_t *opts
);
@@ -1120,7 +1111,7 @@ long celix_bundleContext_trackBundlesWithOptionsAsync(
* @param opts The pointer to the bundle tracker options.
* @return The bundle tracker id (>=0) or < 0 if unsuccessful.
*/
-long celix_bundleContext_trackBundlesWithOptions(
+CELIX_FRAMEWORK_EXPORT long celix_bundleContext_trackBundlesWithOptions(
celix_bundle_context_t *ctx,
const celix_bundle_tracking_options_t *opts
);
@@ -1137,7 +1128,7 @@ long celix_bundleContext_trackBundlesWithOptions(
* The bundle pointers are only guaranteed to be valid during the callback.
* @return Returns true if the bundle is found and the callback is called.
*/
-bool celix_bundleContext_useBundle(
+CELIX_FRAMEWORK_EXPORT bool celix_bundleContext_useBundle(
celix_bundle_context_t *ctx,
long bundleId,
void *callbackHandle,
@@ -1154,7 +1145,7 @@ bool celix_bundleContext_useBundle(
* @param use The callback which will be called for the currently started bundles.
* The bundle pointers are only guaranteed to be valid during the callback.
*/
-void celix_bundleContext_useBundles(
+CELIX_FRAMEWORK_EXPORT void celix_bundleContext_useBundles(
celix_bundle_context_t *ctx,
void *callbackHandle,
void (*use)(void *handle, const celix_bundle_t *bundle)
@@ -1213,7 +1204,7 @@ typedef struct celix_service_tracker_info {
* In this case the doneCallback will not be called.
* @return The tracker id or <0 if something went wrong (will log an error).
*/
-long celix_bundleContext_trackServiceTrackersAsync(
+CELIX_FRAMEWORK_EXPORT long celix_bundleContext_trackServiceTrackersAsync(
celix_bundle_context_t *ctx,
const char* serviceName,
void *callbackHandle,
@@ -1243,7 +1234,7 @@ long celix_bundleContext_trackServiceTrackersAsync(
* @param trackerRemove Called when a service tracker is removed, which tracks the provided service name
* @return The tracker id or <0 if something went wrong (will log an error).
*/
-long celix_bundleContext_trackServiceTrackers(
+CELIX_FRAMEWORK_EXPORT long celix_bundleContext_trackServiceTrackers(
celix_bundle_context_t *ctx,
const char* serviceName,
void *callbackHandle,
@@ -1255,27 +1246,27 @@ long celix_bundleContext_trackServiceTrackers(
*
* @return the dependency manager or NULL if unsuccessful.
*/
-celix_dependency_manager_t* celix_bundleContext_getDependencyManager(celix_bundle_context_t *ctx);
+CELIX_FRAMEWORK_EXPORT celix_dependency_manager_t* celix_bundleContext_getDependencyManager(celix_bundle_context_t *ctx);
/**
* @brief Wait until all Celix event for this bundle are completed.
*/
-void celix_bundleContext_waitForEvents(celix_bundle_context_t *ctx);
+CELIX_FRAMEWORK_EXPORT void celix_bundleContext_waitForEvents(celix_bundle_context_t *ctx);
/**
* @brief Returns the bundle for this bundle context.
*/
-celix_bundle_t* celix_bundleContext_getBundle(const celix_bundle_context_t *ctx);
+CELIX_FRAMEWORK_EXPORT celix_bundle_t* celix_bundleContext_getBundle(const celix_bundle_context_t *ctx);
/**
* @brief Returns the bundle if for the bundle of this bundle context.
*/
-long celix_bundleContext_getBundleId(const celix_bundle_context_t *ctx);
+CELIX_FRAMEWORK_EXPORT long celix_bundleContext_getBundleId(const celix_bundle_context_t *ctx);
-celix_framework_t* celix_bundleContext_getFramework(const celix_bundle_context_t *ctx);
+CELIX_FRAMEWORK_EXPORT celix_framework_t* celix_bundleContext_getFramework(const celix_bundle_context_t *ctx);
/**
* @brief Logs a message to Celix framework logger with the provided log level.
@@ -1284,7 +1275,7 @@ celix_framework_t* celix_bundleContext_getFramework(const celix_bundle_context_t
* @param format printf style format string
* @param ... printf style format arguments
*/
-void celix_bundleContext_log(
+CELIX_FRAMEWORK_EXPORT void celix_bundleContext_log(
const celix_bundle_context_t *ctx,
celix_log_level_e level,
const char* format,
@@ -1293,7 +1284,7 @@ void celix_bundleContext_log(
/**
* @brief Logs a message to Celix framework logger with the provided log level.
*/
-void celix_bundleContext_vlog(
+CELIX_FRAMEWORK_EXPORT void celix_bundleContext_vlog(
const celix_bundle_context_t *ctx,
celix_log_level_e level,
const char* format,
@@ -1312,7 +1303,7 @@ void celix_bundleContext_vlog(
* @param defaultValue The default value if the property is not found.
* @return The property value or the default value if the property is not found.
*/
-const char* celix_bundleContext_getProperty(celix_bundle_context_t *ctx, const char* key, const char* defaultVal);
+CELIX_FRAMEWORK_EXPORT const char* celix_bundleContext_getProperty(celix_bundle_context_t *ctx, const char* key, const char* defaultVal);
/**
* @brief Get the config property for the given key converted as long value.
@@ -1327,7 +1318,7 @@ const char* celix_bundleContext_getProperty(celix_bundle_context_t *ctx, const c
* @return The property value or the default value if the property is not found or the property value cannot be converted
* to a long value.
*/
-long celix_bundleContext_getPropertyAsLong(celix_bundle_context_t *ctx, const char* name, long defaultValue);
+CELIX_FRAMEWORK_EXPORT long celix_bundleContext_getPropertyAsLong(celix_bundle_context_t *ctx, const char* name, long defaultValue);
/**
* @brief Get the config property for the given key converted as double value.
@@ -1342,7 +1333,7 @@ long celix_bundleContext_getPropertyAsLong(celix_bundle_context_t *ctx, const ch
* @return The property value or the default value if the property is not found or the property value cannot be converted
* to a double value.
*/
-double celix_bundleContext_getPropertyAsDouble(celix_bundle_context_t *ctx, const char* name, double defaultValue);
+CELIX_FRAMEWORK_EXPORT double celix_bundleContext_getPropertyAsDouble(celix_bundle_context_t *ctx, const char* name, double defaultValue);
/**
* @brief Get the config property for the given key converted as bool value.
@@ -1357,7 +1348,7 @@ double celix_bundleContext_getPropertyAsDouble(celix_bundle_context_t *ctx, cons
* @return The property value or the default value if the property is not found or the property value cannot be converted
* to a bool value.
*/
-bool celix_bundleContext_getPropertyAsBool(celix_bundle_context_t *ctx, const char* name, bool defaultValue);
+CELIX_FRAMEWORK_EXPORT bool celix_bundleContext_getPropertyAsBool(celix_bundle_context_t *ctx, const char* name, bool defaultValue);
#undef CELIX_OPTS_INIT
diff --git a/libs/framework/include/celix_bundle_event.h b/libs/framework/include/celix_bundle_event.h
index 97b0716c..d515370c 100644
--- a/libs/framework/include/celix_bundle_event.h
+++ b/libs/framework/include/celix_bundle_event.h
@@ -21,7 +21,6 @@
#define CELIX_BUNDLE_EVENT_H_
#include "celix_bundle.h"
-#include "celix_framework_export.h"
#ifdef __cplusplus
extern "C" {
diff --git a/libs/framework/include/celix_bundle_state.h b/libs/framework/include/celix_bundle_state.h
index cf656ef4..1c734ae0 100644
--- a/libs/framework/include/celix_bundle_state.h
+++ b/libs/framework/include/celix_bundle_state.h
@@ -51,7 +51,7 @@ enum celix_bundleState {
typedef enum celix_bundleState bundle_state_e;
typedef enum celix_bundleState celix_bundle_state_e;
-const char* celix_bundleState_getName(celix_bundle_state_e state);
+CELIX_FRAMEWORK_EXPORT const char* celix_bundleState_getName(celix_bundle_state_e state);
#ifdef __cplusplus
}
diff --git a/libs/framework/include/celix_constants.h b/libs/framework/include/celix_constants.h
index 67f70c7c..4da4f59e 100644
--- a/libs/framework/include/celix_constants.h
+++ b/libs/framework/include/celix_constants.h
@@ -22,8 +22,6 @@
#include <stdbool.h>
-#include "celix_framework_export.h"
-
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/libs/framework/include/celix_dependency_manager.h b/libs/framework/include/celix_dependency_manager.h
index 0c0f0550..b8c9c330 100644
--- a/libs/framework/include/celix_dependency_manager.h
+++ b/libs/framework/include/celix_dependency_manager.h
@@ -53,14 +53,14 @@ extern "C" {
*
* Should not be called from the Celix event thread.
*/
-celix_status_t celix_dependencyManager_add(celix_dependency_manager_t *manager, celix_dm_component_t *component);
+CELIX_FRAMEWORK_EXPORT celix_status_t celix_dependencyManager_add(celix_dependency_manager_t *manager, celix_dm_component_t *component);
/**
* Same as celix_dependencyManager_add, but this call will not wait until all service registrations and
* tracker are registered/opened on the Celix event thread.
* Can be called on the Celix event thread.
*/
-celix_status_t celix_dependencyManager_addAsync(celix_dependency_manager_t *manager, celix_dm_component_t *component);
+CELIX_FRAMEWORK_EXPORT celix_status_t celix_dependencyManager_addAsync(celix_dependency_manager_t *manager, celix_dm_component_t *component);
/**
* Removes a DM component from the dependency manager and destroys it
@@ -70,7 +70,7 @@ celix_status_t celix_dependencyManager_addAsync(celix_dependency_manager_t *mana
*
* Should not be called from the Celix event thread.
*/
-celix_status_t celix_dependencyManager_remove(celix_dependency_manager_t *manager, celix_dm_component_t *component);
+CELIX_FRAMEWORK_EXPORT celix_status_t celix_dependencyManager_remove(celix_dependency_manager_t *manager, celix_dm_component_t *component);
/**
* Same as celix_dependencyManager_remove, but this call will not wait until component is deactivated.
@@ -80,7 +80,7 @@ celix_status_t celix_dependencyManager_remove(celix_dependency_manager_t *manage
* and destroyed.
*
*/
-celix_status_t celix_dependencyManager_removeAsync(
+CELIX_FRAMEWORK_EXPORT celix_status_t celix_dependencyManager_removeAsync(
celix_dependency_manager_t *manager,
celix_dm_component_t *component,
void* doneData,
@@ -91,7 +91,7 @@ celix_status_t celix_dependencyManager_removeAsync(
*
* Should not be called from the Celix event thread.
*/
-celix_status_t celix_dependencyManager_removeAllComponents(celix_dependency_manager_t *manager);
+CELIX_FRAMEWORK_EXPORT celix_status_t celix_dependencyManager_removeAllComponents(celix_dependency_manager_t *manager);
/**
* Same as celix_dependencyManager_removeAllComponents, but this call will not wait til all
@@ -102,22 +102,22 @@ celix_status_t celix_dependencyManager_removeAllComponents(celix_dependency_mana
*
* Can be called on the Celix event thread.
*/
-celix_status_t celix_dependencyManager_removeAllComponentsAsync(celix_dependency_manager_t *manager, void *doneData, void (*doneCallback)(void *data));
+CELIX_FRAMEWORK_EXPORT celix_status_t celix_dependencyManager_removeAllComponentsAsync(celix_dependency_manager_t *manager, void *doneData, void (*doneCallback)(void *data));
/**
* Check if all components for the bundle of the dependency manager are active (all required dependencies resolved).
*/
-bool celix_dependencyManager_areComponentsActive(celix_dependency_manager_t *manager);
+CELIX_FRAMEWORK_EXPORT bool celix_dependencyManager_areComponentsActive(celix_dependency_manager_t *manager);
/**
* Check if all components - for all bundles - are active (all required dependencies resolved).
*/
-bool celix_dependencyManager_allComponentsActive(celix_dependency_manager_t *manager);
+CELIX_FRAMEWORK_EXPORT bool celix_dependencyManager_allComponentsActive(celix_dependency_manager_t *manager);
/**
* Return the nr of components for this dependency manager
*/
-size_t celix_dependencyManager_nrOfComponents(celix_dependency_manager_t *manager);
+CELIX_FRAMEWORK_EXPORT size_t celix_dependencyManager_nrOfComponents(celix_dependency_manager_t *manager);
/**
* Wait for an empty Celix event queue.
@@ -126,7 +126,7 @@ size_t celix_dependencyManager_nrOfComponents(celix_dependency_manager_t *manage
* Can be used to ensure that all created/updated components are completely processed (services registered
* and/or service trackers are created).
*/
-void celix_dependencyManager_wait(celix_dependency_manager_t* manager);
+CELIX_FRAMEWORK_EXPORT void celix_dependencyManager_wait(celix_dependency_manager_t* manager);
/**
* Create and returns a dependency manager info struct for the specified bundle.
@@ -138,7 +138,7 @@ void celix_dependencyManager_wait(celix_dependency_manager_t* manager);
* @param bndId The bundle id to get the info from.
* @returns The dependency manager info for the provided bundle id or NULL if the bundle id is invalid.
*/
-celix_dependency_manager_info_t* celix_dependencyManager_createInfo(celix_dependency_manager_t *manager, long bndId);
+CELIX_FRAMEWORK_EXPORT celix_dependency_manager_info_t* celix_dependencyManager_createInfo(celix_dependency_manager_t *manager, long bndId);
/**
* Create and returns a dependency manager info struct for all started bundles.
@@ -149,18 +149,18 @@ celix_dependency_manager_info_t* celix_dependencyManager_createInfo(celix_depend
* @param manager The dependency manager
* @returns A Celix array of dependency manager infos (celix_dependency_manager_info_t*)
*/
-celix_array_list_t * /*celix_dependency_manager_info_t* entries*/ celix_dependencyManager_createInfos(celix_dependency_manager_t *manager);
+CELIX_FRAMEWORK_EXPORT celix_array_list_t * /*celix_dependency_manager_info_t* entries*/ celix_dependencyManager_createInfos(celix_dependency_manager_t *manager);
/**
* Destroys a DM info struct.
*/
-void celix_dependencyManager_destroyInfo(celix_dependency_manager_t *manager, celix_dependency_manager_info_t *info);
+CELIX_FRAMEWORK_EXPORT void celix_dependencyManager_destroyInfo(celix_dependency_manager_t *manager, celix_dependency_manager_info_t *info);
/**
* Destroys a celix array list of DM info structs.
* @deprecated use celix_arrayList_destroy instead.
*/
-void celix_dependencyManager_destroyInfos(celix_dependency_manager_t *manager, celix_array_list_t * infos /*entries celix_dependency_manager_info_t*/);
+CELIX_FRAMEWORK_EXPORT void celix_dependencyManager_destroyInfos(celix_dependency_manager_t *manager, celix_array_list_t * infos /*entries celix_dependency_manager_info_t*/);
/**
* Print the dependency manager info for all bundles to the provided output stream.
@@ -169,7 +169,7 @@ void celix_dependencyManager_destroyInfos(celix_dependency_manager_t *manager, c
* @param useAnsiColors Whether to use ansi colors when printing info.
* @param stream The output stream (e.g. stdout)
*/
-void celix_dependencyManager_printInfo(celix_dependency_manager_t* manager, bool fullInfo, bool useAnsiColors, FILE* stream);
+CELIX_FRAMEWORK_EXPORT void celix_dependencyManager_printInfo(celix_dependency_manager_t* manager, bool fullInfo, bool useAnsiColors, FILE* stream);
/**
* Print the dependency manager info for the provided bundle id to the provided output stream.
@@ -179,7 +179,7 @@ void celix_dependencyManager_printInfo(celix_dependency_manager_t* manager, bool
* @param bundleId The bundle id for which the dependency manager info should be printed.
* @param stream The output stream (e.g. stdout)
*/
-void celix_dependencyManager_printInfoForBundle(celix_dependency_manager_t* manager, bool fullInfo, bool useAnsiColors, long bundleId, FILE* stream);
+CELIX_FRAMEWORK_EXPORT void celix_dependencyManager_printInfoForBundle(celix_dependency_manager_t* manager, bool fullInfo, bool useAnsiColors, long bundleId, FILE* stream);
#ifdef __cplusplus
}
diff --git a/libs/framework/include/celix_dm_component.h b/libs/framework/include/celix_dm_component.h
index ed853b62..1c4a228f 100644
--- a/libs/framework/include/celix_dm_component.h
+++ b/libs/framework/include/celix_dm_component.h
@@ -68,36 +68,36 @@ typedef void (*celix_dm_cmp_impl_destroy_fpt)(void*);
* Creates a DM Component with a random generated UUID.
* Caller has ownership.
*/
-celix_dm_component_t* celix_dmComponent_create(celix_bundle_context_t *context, const char* name);
+CELIX_FRAMEWORK_EXPORT celix_dm_component_t* celix_dmComponent_create(celix_bundle_context_t *context, const char* name);
/**
* Creates a DM Component with a provided UUID.
* Caller has ownership.
*/
-celix_dm_component_t* celix_dmComponent_createWithUUID(celix_bundle_context_t *context, const char* name, const char* UUID);
+CELIX_FRAMEWORK_EXPORT celix_dm_component_t* celix_dmComponent_createWithUUID(celix_bundle_context_t *context, const char* name, const char* UUID);
/**
* Get the UUID of the component.
*/
-const char* celix_dmComponent_getUUID(celix_dm_component_t* cmp);
+CELIX_FRAMEWORK_EXPORT const char* celix_dmComponent_getUUID(celix_dm_component_t* cmp);
/**
* Destroys a DM Component
*/
-void celix_dmComponent_destroy(celix_dm_component_t* cmp);
+CELIX_FRAMEWORK_EXPORT void celix_dmComponent_destroy(celix_dm_component_t* cmp);
/**
* Destroys a DM Component on the event thread.
* Will call doneCallback (if not NULL) when done.
*
*/
-void celix_dmComponent_destroyAsync(celix_dm_component_t* cmp, void *doneData, void (*doneCallback)(void*));
+CELIX_FRAMEWORK_EXPORT void celix_dmComponent_destroyAsync(celix_dm_component_t* cmp, void *doneData, void (*doneCallback)(void*));
/**
* Specify if a default 'service.lang=C' should be added to the properties of interfaces if no 'service.lang' has been
* provided. Default is false. Note that this should be set before using component_addInterface.
*/
-celix_status_t celix_dmComponent_setCLanguageProperty(celix_dm_component_t *component, bool setCLangProp);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t celix_dmComponent_setCLanguageProperty(celix_dm_component_t *component, bool setCLangProp);
/**
@@ -107,7 +107,7 @@ celix_status_t celix_dmComponent_setCLanguageProperty(celix_dm_component_t *comp
* @param version The version of the interface (e.g. "1.0.0"), Can be a NULL pointer.
* @param properties To (meta) properties to provide with the service. Can be a NULL pointer.
*/
-celix_status_t celix_dmComponent_addInterface(celix_dm_component_t *component, const char* serviceName, const char* serviceVersion, const void* service, celix_properties_t *properties);
+CELIX_FRAMEWORK_EXPORT celix_status_t celix_dmComponent_addInterface(celix_dm_component_t *component, const char* serviceName, const char* serviceVersion, const void* service, celix_properties_t *properties);
/**
* Removed a C interface from a component the Celix framework.
@@ -115,11 +115,11 @@ celix_status_t celix_dmComponent_addInterface(celix_dm_component_t *component, c
* @param serviceName the service name.
* @return CELIX_SUCCESS when removed, CELIX_ILLEGAL_ARGUMENT when the component does not provide the interface
*/
-celix_status_t celix_dmComponent_removeInterface(celix_dm_component_t *component, const void* service);
+CELIX_FRAMEWORK_EXPORT celix_status_t celix_dmComponent_removeInterface(celix_dm_component_t *component, const void* service);
/**
* Sets the implementation of the component. e.g. the component handle/self/this pointer.
*/
-celix_status_t celix_dmComponent_setImplementation(celix_dm_component_t *component, void* implementation);
+CELIX_FRAMEWORK_EXPORT celix_status_t celix_dmComponent_setImplementation(celix_dm_component_t *component, void* implementation);
/**
* Configures the destroy function for the component implementation.
@@ -130,7 +130,7 @@ celix_status_t celix_dmComponent_setImplementation(celix_dm_component_t *compone
* The destroy function will not be called if the component implementation is not set. e.g. if the
* celix_dmComponent_setImplementation is not called with a non NULL value.
*/
-void celix_dmComponent_setImplementationDestroyFunction(celix_dm_component_t* cmp, celix_dm_cmp_impl_destroy_fpt destroyFn);
+CELIX_FRAMEWORK_EXPORT void celix_dmComponent_setImplementationDestroyFunction(celix_dm_component_t* cmp, celix_dm_cmp_impl_destroy_fpt destroyFn);
/**
* Configures the destroy function for the component implementation using a MACRO for improving the type safety.
@@ -144,48 +144,48 @@ void celix_dmComponent_setImplementationDestroyFunction(celix_dm_component_t* cm
/**
* Returns an arraylist of service names. The caller owns the arraylist and strings (char *)
*/
-celix_status_t celix_dmComponent_getInterfaces(celix_dm_component_t *component, celix_array_list_t **servicesNames);
+CELIX_FRAMEWORK_EXPORT celix_status_t celix_dmComponent_getInterfaces(celix_dm_component_t *component, celix_array_list_t **servicesNames);
/**
* Adds a C service dependency to the component
*/
-celix_status_t celix_dmComponent_addServiceDependency(celix_dm_component_t *component, celix_dm_service_dependency_t *dep);
+CELIX_FRAMEWORK_EXPORT celix_status_t celix_dmComponent_addServiceDependency(celix_dm_component_t *component, celix_dm_service_dependency_t *dep);
/**
* Removes a C service dependency to the component
*/
-celix_status_t celix_dmComponent_removeServiceDependency(celix_dm_component_t *component, celix_dm_service_dependency_t *dependency);
+CELIX_FRAMEWORK_EXPORT celix_status_t celix_dmComponent_removeServiceDependency(celix_dm_component_t *component, celix_dm_service_dependency_t *dependency);
/**
* Returns the current state of the component.
*/
-celix_dm_component_state_t celix_dmComponent_currentState(celix_dm_component_t* cmp);
+CELIX_FRAMEWORK_EXPORT celix_dm_component_state_t celix_dmComponent_currentState(celix_dm_component_t* cmp);
/**
* Returns the implementation of the component. e.g. the component handle/self/this pointer.
*/
-void * celix_dmComponent_getImplementation(celix_dm_component_t* cmp);
+CELIX_FRAMEWORK_EXPORT void * celix_dmComponent_getImplementation(celix_dm_component_t* cmp);
/**
* Returns the configured component implementation destroy function.
*/
-celix_dm_cmp_impl_destroy_fpt celix_dmComponent_getImplementationDestroyFunction(celix_dm_component_t* cmp);
+CELIX_FRAMEWORK_EXPORT celix_dm_cmp_impl_destroy_fpt celix_dmComponent_getImplementationDestroyFunction(celix_dm_component_t* cmp);
/**
* Returns the DM component name. This is used when printing information about the component.
*/
-const char* celix_dmComponent_getName(celix_dm_component_t* cmp);
+CELIX_FRAMEWORK_EXPORT const char* celix_dmComponent_getName(celix_dm_component_t* cmp);
/**
* Returns bundle context for the bundle where this DM component is part of.
*/
-celix_bundle_context_t* celix_dmComponent_getBundleContext(celix_dm_component_t *component);
+CELIX_FRAMEWORK_EXPORT celix_bundle_context_t* celix_dmComponent_getBundleContext(celix_dm_component_t *component);
/**
* Set the component life cycle callbacks.
* The first argument will be the component implementation (@see component_getImplementation)
*/
-celix_status_t celix_dmComponent_setCallbacks(celix_dm_component_t *component, celix_dm_cmp_lifecycle_fpt init, celix_dm_cmp_lifecycle_fpt start, celix_dm_cmp_lifecycle_fpt stop, celix_dm_cmp_lifecycle_fpt deinit);
+CELIX_FRAMEWORK_EXPORT celix_status_t celix_dmComponent_setCallbacks(celix_dm_component_t *component, celix_dm_cmp_lifecycle_fpt init, celix_dm_cmp_lifecycle_fpt start, celix_dm_cmp_lifecycle_fpt stop, celix_dm_cmp_lifecycle_fpt deinit);
/**
* Set the component life cycle callbacks using a MACRO for improving the type safety.
@@ -200,12 +200,12 @@ celix_status_t celix_dmComponent_setCallbacks(celix_dm_component_t *component, c
} while(0)
-bool celix_dmComponent_isActive(celix_dm_component_t *component);
+CELIX_FRAMEWORK_EXPORT bool celix_dmComponent_isActive(celix_dm_component_t *component);
/**
* Returns the string value of a provided state
*/
-const char* celix_dmComponent_stateToString(celix_dm_component_state_t state);
+CELIX_FRAMEWORK_EXPORT const char* celix_dmComponent_stateToString(celix_dm_component_state_t state);
/**
* Deprecated, use CELIX_DM_COMPONENT_SET_CALLBACKS instead.
@@ -218,7 +218,7 @@ const char* celix_dmComponent_stateToString(celix_dm_component_state_t state);
* Create a DM Component info struct. Containing information about the component.
* Caller has ownership.
*/
-celix_status_t celix_dmComponent_getComponentInfo(celix_dm_component_t *component, celix_dm_component_info_t** infoOut);
+CELIX_FRAMEWORK_EXPORT celix_status_t celix_dmComponent_getComponentInfo(celix_dm_component_t *component, celix_dm_component_info_t** infoOut);
/**
* Print the component info to the provided stream.
@@ -227,12 +227,12 @@ celix_status_t celix_dmComponent_getComponentInfo(celix_dm_component_t *componen
* @param useAnsiColors Whether to use ansi colors when printing the component info.
* @param stream The stream to print to (e..g stdout).
*/
-void celix_dmComponent_printComponentInfo(celix_dm_component_info_t* info, bool printFullInfo, bool useAnsiColors, FILE* stream);
+CELIX_FRAMEWORK_EXPORT void celix_dmComponent_printComponentInfo(celix_dm_component_info_t* info, bool printFullInfo, bool useAnsiColors, FILE* stream);
/**
* Destroys a DM Component info struct.
*/
-void celix_dmComponent_destroyComponentInfo(dm_component_info_pt info);
+CELIX_FRAMEWORK_EXPORT void celix_dmComponent_destroyComponentInfo(dm_component_info_pt info);
#ifdef __cplusplus
diff --git a/libs/framework/include/celix_dm_info.h b/libs/framework/include/celix_dm_info.h
index 37be7ba2..ab7c6549 100644
--- a/libs/framework/include/celix_dm_info.h
+++ b/libs/framework/include/celix_dm_info.h
@@ -24,7 +24,6 @@
#include "celix_array_list.h"
#include "celix_properties.h"
-#include "celix_framework_export.h"
#ifdef __cplusplus
extern "C" {
diff --git a/libs/framework/include/celix_dm_service_dependency.h b/libs/framework/include/celix_dm_service_dependency.h
index 8faf31ec..c416c6a0 100644
--- a/libs/framework/include/celix_dm_service_dependency.h
+++ b/libs/framework/include/celix_dm_service_dependency.h
@@ -70,7 +70,7 @@ typedef struct celix_dm_service_dependency_callback_options {
* \warning The dmServiceDependency is not thread safe when constructing or modifying.
* The handling of service updates is thread safe.
*/
-celix_dm_service_dependency_t* celix_dmServiceDependency_create(void);
+CELIX_FRAMEWORK_EXPORT celix_dm_service_dependency_t* celix_dmServiceDependency_create(void);
/**
* Destroys a service dependency.
@@ -79,19 +79,18 @@ celix_dm_service_dependency_t* celix_dmServiceDependency_create(void);
* Can only be called if the serviceDependency is disabled (note that a service dependency not added to a
* component is disabled).
*/
-void celix_dmServiceDependency_destroy(celix_dm_service_dependency_t *dep);
+CELIX_FRAMEWORK_EXPORT void celix_dmServiceDependency_destroy(celix_dm_service_dependency_t *dep);
/**
* Specify if the service dependency is required. default is false
*/
-celix_status_t celix_dmServiceDependency_setRequired(celix_dm_service_dependency_t *dependency, bool required);
+CELIX_FRAMEWORK_EXPORT celix_status_t celix_dmServiceDependency_setRequired(celix_dm_service_dependency_t *dependency, bool required);
/**
* Specify if the service dependency should add a C language filter for this dependency if no "service.lang" part is found the in the provided filter.
* Default is false
*/
-celix_status_t celix_dmServiceDependency_setAddCLanguageFilter(celix_dm_service_dependency_t *dependency, bool addCLangFilter);
-
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t celix_dmServiceDependency_setAddCLanguageFilter(celix_dm_service_dependency_t *dependency, bool addCLangFilter);
/**
* Specify if the service dependency update strategy.
@@ -106,12 +105,12 @@ celix_status_t celix_dmServiceDependency_setAddCLanguageFilter(celix_dm_service_
*
* Default strategy is DM_SERVICE_DEPENDENCY_STRATEGY_SUSPEND
*/
-celix_status_t celix_dmServiceDependency_setStrategy(celix_dm_service_dependency_t *dependency, celix_dm_service_dependency_strategy_t strategy);
+CELIX_FRAMEWORK_EXPORT celix_status_t celix_dmServiceDependency_setStrategy(celix_dm_service_dependency_t *dependency, celix_dm_service_dependency_strategy_t strategy);
/**
* Return the service dependency update strategy.
*/
-celix_dm_service_dependency_strategy_t celix_dmServiceDependency_getStrategy(celix_dm_service_dependency_t *dependency);
+CELIX_FRAMEWORK_EXPORT celix_dm_service_dependency_strategy_t celix_dmServiceDependency_getStrategy(celix_dm_service_dependency_t *dependency);
/**
* Set the service name, version range and filter.
@@ -120,19 +119,19 @@ celix_dm_service_dependency_strategy_t celix_dmServiceDependency_getStrategy(cel
* @param serviceVersionRange The service version range, can be a NULL pointer.
* @param filter The (additional) filter to use (e.g. "(location=front)"). Can be a NULL pointer.
*/
-celix_status_t celix_dmServiceDependency_setService(celix_dm_service_dependency_t *dependency, const char* serviceName, const char* serviceVersionRange, const char* filter);
+CELIX_FRAMEWORK_EXPORT celix_status_t celix_dmServiceDependency_setService(celix_dm_service_dependency_t *dependency, const char* serviceName, const char* serviceVersionRange, const char* filter);
/**
* Returns the service dependency filter.
*/
-const char* celix_dmServiceDependency_getFilter(celix_dm_service_dependency_t *dependency);
+CELIX_FRAMEWORK_EXPORT const char* celix_dmServiceDependency_getFilter(celix_dm_service_dependency_t *dependency);
/**
* Set the set callbacks when services specified by the service dependency
* The first argument of the callbacks will be the component implement (@see component_getImplementation)
* The second the argument a pointer to an instance of a service struct of the specified service dependency.
*/
-celix_status_t celix_dmServiceDependency_setCallback(celix_dm_service_dependency_t *dependency, celix_dm_service_update_fp set);
+CELIX_FRAMEWORK_EXPORT celix_status_t celix_dmServiceDependency_setCallback(celix_dm_service_dependency_t *dependency, celix_dm_service_update_fp set);
/**
* Set the set function callbacks when services specified by the service dependency
@@ -140,7 +139,7 @@ celix_status_t celix_dmServiceDependency_setCallback(celix_dm_service_dependency
* The second argument of th callbacks will be a pointer to an instance of a service struct of the specified service dependency.
* The third argument of th callbacks will be a pointer to a service properties of the a service instance of the specified service dependency.
*/
-celix_status_t celix_dmServiceDependency_setCallbackWithProperties(celix_dm_service_dependency_t *dependency, celix_dm_service_update_with_props_fp set);
+CELIX_FRAMEWORK_EXPORT celix_status_t celix_dmServiceDependency_setCallbackWithProperties(celix_dm_service_dependency_t *dependency, celix_dm_service_update_with_props_fp set);
/**
* Set the set, add, change, remove and swap function callbacks when services specified by the service dependency
@@ -148,25 +147,25 @@ celix_status_t celix_dmServiceDependency_setCallbackWithProperties(celix_dm_serv
*
* The version with the WithProps suffix will be called with as third argument the service properties.
*/
-celix_status_t celix_dmServiceDependency_setCallbacksWithOptions(celix_dm_service_dependency_t *dependency, const celix_dm_service_dependency_callback_options_t *opts);
+CELIX_FRAMEWORK_EXPORT celix_status_t celix_dmServiceDependency_setCallbacksWithOptions(celix_dm_service_dependency_t *dependency, const celix_dm_service_dependency_callback_options_t *opts);
/**
* Set the callback handle to be used in the callbacks. Note that this normally should not be set, because the
* result of component_getImplementation() is used
* This can be used in rare cases when the callbacks are actually interceptors. e.g. in the case of C++ support.
*/
-celix_status_t celix_dmServiceDependency_setCallbackHandle(celix_dm_service_dependency_t *dependency, void* handle);
+CELIX_FRAMEWORK_EXPORT celix_status_t celix_dmServiceDependency_setCallbackHandle(celix_dm_service_dependency_t *dependency, void* handle);
/**
* Creates a service dependency info. The service dependency info struct contains information about the service dependency.
* The caller is the owner
*/
-dm_service_dependency_info_t* celix_dmServiceDependency_createInfo(celix_dm_service_dependency_t* dep);
+CELIX_FRAMEWORK_EXPORT dm_service_dependency_info_t* celix_dmServiceDependency_createInfo(celix_dm_service_dependency_t* dep);
/**
* Destroy a provided service dependency info struct.
*/
-void celix_dmServiceDependency_destroyInfo(celix_dm_service_dependency_t *dep, dm_service_dependency_info_t *info);
+CELIX_FRAMEWORK_EXPORT void celix_dmServiceDependency_destroyInfo(celix_dm_service_dependency_t *dep, dm_service_dependency_info_t *info);
#ifdef __cplusplus
}
diff --git a/libs/framework/include/celix_framework.h b/libs/framework/include/celix_framework.h
index 2f5b8627..c2eb5290 100644
--- a/libs/framework/include/celix_framework.h
+++ b/libs/framework/include/celix_framework.h
@@ -55,7 +55,7 @@ extern "C" {
* @brief Returns the framework UUID. This is unique for every created framework and will not be the same if the process is
* restarted.
*/
-const char* celix_framework_getUUID(const celix_framework_t *fw);
+CELIX_FRAMEWORK_EXPORT const char* celix_framework_getUUID(const celix_framework_t *fw);
/**
* @brief Returns the framework bundle context. This is the same as a 'normal' bundle context and can be used to register, use
@@ -63,7 +63,7 @@ const char* celix_framework_getUUID(const celix_framework_t *fw);
* @param fw The framework
* @return A pointer to the bundle context of the framework or NULL if something went wrong.
*/
-celix_bundle_context_t* celix_framework_getFrameworkContext(const celix_framework_t *fw);
+CELIX_FRAMEWORK_EXPORT celix_bundle_context_t* celix_framework_getFrameworkContext(const celix_framework_t *fw);
/**
* @brief Returns the framework bundle. This is the same as a 'normal' bundle, expect that this bundle cannot be uninstalled
@@ -71,7 +71,7 @@ celix_bundle_context_t* celix_framework_getFrameworkContext(const celix_framewor
* @param fw The framework
* @return A pointer to the bundle of the framework or NULL if something went wrong.
*/
-celix_bundle_t* celix_framework_getFrameworkBundle(const celix_framework_t *fw);
+CELIX_FRAMEWORK_EXPORT celix_bundle_t* celix_framework_getFrameworkBundle(const celix_framework_t *fw);
/**
* @brief Use the currently active (started) bundles.
@@ -83,7 +83,7 @@ celix_bundle_t* celix_framework_getFrameworkBundle(const celix_framework_t *fw);
* @param use The callback which will be called for the currently started bundles.
* The bundle pointers are only guaranteed to be valid during the callback.
*/
-void celix_framework_useBundles(celix_framework_t *fw, bool includeFrameworkBundle, void *callbackHandle, void(*use)(void *handle, const celix_bundle_t *bnd));
+CELIX_FRAMEWORK_EXPORT void celix_framework_useBundles(celix_framework_t *fw, bool includeFrameworkBundle, void *callbackHandle, void(*use)(void *handle, const celix_bundle_t *bnd));
/**
* @brief Use the bundle with the provided bundle id
@@ -97,7 +97,7 @@ void celix_framework_useBundles(celix_framework_t *fw, bool includeFrameworkBund
* The bundle pointers are only guaranteed to be valid during the callback.
* @return Returns true if the bundle is found and the callback is called.
*/
-bool celix_framework_useBundle(celix_framework_t *fw, bool onlyActive, long bndId, void *callbackHandle, void(*use)(void *handle, const celix_bundle_t *bnd));
+CELIX_FRAMEWORK_EXPORT bool celix_framework_useBundle(celix_framework_t *fw, bool onlyActive, long bndId, void *callbackHandle, void(*use)(void *handle, const celix_bundle_t *bnd));
/**
* @brief Check whether a bundle is installed.
@@ -105,7 +105,7 @@ bool celix_framework_useBundle(celix_framework_t *fw, bool onlyActive, long bndI
* @param bndId The bundle id to check
* @return true if the bundle is installed.
*/
-bool celix_framework_isBundleInstalled(celix_framework_t *fw, long bndId);
+CELIX_FRAMEWORK_EXPORT bool celix_framework_isBundleInstalled(celix_framework_t *fw, long bndId);
/**
* @brief Check whether the bundle is active.
@@ -113,7 +113,7 @@ bool celix_framework_isBundleInstalled(celix_framework_t *fw, long bndId);
* @param bndId The bundle id to check
* @return true if the bundle is installed and active.
*/
-bool celix_framework_isBundleActive(celix_framework_t *fw, long bndId);
+CELIX_FRAMEWORK_EXPORT bool celix_framework_isBundleActive(celix_framework_t *fw, long bndId);
/**
@@ -125,7 +125,7 @@ bool celix_framework_isBundleActive(celix_framework_t *fw, long bndId);
* @param autoStart If the bundle should also be started.
* @return the bundleId (>= 0) or < 0 if the bundle could not be installed and possibly started.
*/
-long celix_framework_installBundle(celix_framework_t *fw, const char *bundleLoc, bool autoStart);
+CELIX_FRAMEWORK_EXPORT long celix_framework_installBundle(celix_framework_t *fw, const char *bundleLoc, bool autoStart);
/**
* @brief Uninstall the bundle with the provided bundle id. If needed the bundle will be stopped first.
@@ -135,7 +135,7 @@ long celix_framework_installBundle(celix_framework_t *fw, const char *bundleLoc,
* @param bndId The bundle id to uninstall.
* @return true if the bundle is correctly uninstalled. False if not.
*/
-bool celix_framework_uninstallBundle(celix_framework_t *fw, long bndId);
+CELIX_FRAMEWORK_EXPORT bool celix_framework_uninstallBundle(celix_framework_t *fw, long bndId);
/**
* @brief Update the bundle with the provided bundle id.
@@ -155,7 +155,7 @@ bool celix_framework_uninstallBundle(celix_framework_t *fw, long bndId);
* from the bundle cache will be used.
* @return true if the bundle is correctly updated. False if not.
*/
-bool celix_framework_updateBundle(celix_framework_t *fw, long bndId, const char* updatedBundleUrl);
+CELIX_FRAMEWORK_EXPORT bool celix_framework_updateBundle(celix_framework_t *fw, long bndId, const char* updatedBundleUrl);
/**
* @brief Stop the bundle with the provided bundle id.
@@ -165,7 +165,7 @@ bool celix_framework_updateBundle(celix_framework_t *fw, long bndId, const char*
* @param bndId The bundle id to stop.
* @return true if the bundle is found & correctly stop. False if not.
*/
-bool celix_framework_stopBundle(celix_framework_t *fw, long bndId);
+CELIX_FRAMEWORK_EXPORT bool celix_framework_stopBundle(celix_framework_t *fw, long bndId);
/**
* @brief Start the bundle with the provided bundle id.
@@ -175,7 +175,7 @@ bool celix_framework_stopBundle(celix_framework_t *fw, long bndId);
* @param bndId The bundle id to start.
* @return true if the bundle is found & correctly started. False if not.
*/
-bool celix_framework_startBundle(celix_framework_t *fw, long bndId);
+CELIX_FRAMEWORK_EXPORT bool celix_framework_startBundle(celix_framework_t *fw, long bndId);
/**
* @brief Install and optional start a bundle async.
@@ -188,7 +188,7 @@ bool celix_framework_startBundle(celix_framework_t *fw, long bndId);
* @param autoStart If the bundle should also be started.
* @return The bundle id of the installed bundle or -1 if the bundle could not be installed
*/
-long celix_framework_installBundleAsync(celix_framework_t *fw, const char *bundleLoc, bool autoStart);
+CELIX_FRAMEWORK_EXPORT long celix_framework_installBundleAsync(celix_framework_t *fw, const char *bundleLoc, bool autoStart);
/**
* @brief Update the bundle with the provided bundle id async.
@@ -207,7 +207,7 @@ long celix_framework_installBundleAsync(celix_framework_t *fw, const char *bundl
* @param updatedBundleUrl The optional updated bundle url to the bundle zip file. If NULL, the existing bundle url
* from the bundle cache will be used.
*/
-void celix_framework_updateBundleAsync(celix_framework_t *fw, long bndId, const char* updatedBundleUrl);
+CELIX_FRAMEWORK_EXPORT void celix_framework_updateBundleAsync(celix_framework_t *fw, long bndId, const char* updatedBundleUrl);
/**
* @brief Uninstall the bundle with the provided bundle id async. If needed the bundle will be stopped first.
@@ -218,7 +218,7 @@ void celix_framework_updateBundleAsync(celix_framework_t *fw, long bndId, const
* @param fw The Celix framework
* @param bndId The bundle id to uninstall.
*/
-void celix_framework_uninstallBundleAsync(celix_framework_t *fw, long bndId);
+CELIX_FRAMEWORK_EXPORT void celix_framework_uninstallBundleAsync(celix_framework_t *fw, long bndId);
/**
* @brief Stop the bundle with the provided bundle id async.
@@ -229,7 +229,7 @@ void celix_framework_uninstallBundleAsync(celix_framework_t *fw, long bndId);
* @param fw The Celix framework
* @param bndId The bundle id to stop.
*/
-void celix_framework_stopBundleAsync(celix_framework_t *fw, long bndId);
+CELIX_FRAMEWORK_EXPORT void celix_framework_stopBundleAsync(celix_framework_t *fw, long bndId);
/**
* @brief Start the bundle with the provided bundle id async.
@@ -240,7 +240,7 @@ void celix_framework_stopBundleAsync(celix_framework_t *fw, long bndId);
* @param fw The Celix framework
* @param bndId The bundle id to start.
*/
-void celix_framework_startBundleAsync(celix_framework_t *fw, long bndId);
+CELIX_FRAMEWORK_EXPORT void celix_framework_startBundleAsync(celix_framework_t *fw, long bndId);
/**
* @brief List the installed and started bundle ids.
@@ -249,7 +249,7 @@ void celix_framework_startBundleAsync(celix_framework_t *fw, long bndId);
* @param framework The Celix framework.
* @return A array with bundle ids (long). The caller is responsible for destroying the array.
*/
-celix_array_list_t* celix_framework_listBundles(celix_framework_t* framework);
+CELIX_FRAMEWORK_EXPORT celix_array_list_t* celix_framework_listBundles(celix_framework_t* framework);
/**
* @brief List the installed bundle ids.
@@ -258,7 +258,7 @@ celix_array_list_t* celix_framework_listBundles(celix_framework_t* framework);
* @param framework The Celix framework.
* @return A array with bundle ids (long). The caller is responsible for destroying the array.
*/
-celix_array_list_t* celix_framework_listInstalledBundles(celix_framework_t* framework);
+CELIX_FRAMEWORK_EXPORT celix_array_list_t* celix_framework_listInstalledBundles(celix_framework_t* framework);
/**
* @brief Wait until the framework event queue is empty.
@@ -269,7 +269,7 @@ celix_array_list_t* celix_framework_listInstalledBundles(celix_framework_t* fram
*
* @param fw The Celix Framework
*/
-void celix_framework_waitForEmptyEventQueue(celix_framework_t *fw);
+CELIX_FRAMEWORK_EXPORT void celix_framework_waitForEmptyEventQueue(celix_framework_t *fw);
/**
* @brief Sets the log function for this framework.
@@ -278,23 +278,23 @@ void celix_framework_waitForEmptyEventQueue(celix_framework_t *fw);
* A log function can be injected to change how the Celix framework logs.
* Can be reset by setting the log function to NULL.
*/
-void celix_framework_setLogCallback(celix_framework_t* fw, void* logHandle, void (*logFunction)(void* handle, celix_log_level_e level, const char* file, const char *function, int line, const char *format, va_list formatArgs));
+CELIX_FRAMEWORK_EXPORT void celix_framework_setLogCallback(celix_framework_t* fw, void* logHandle, void (*logFunction)(void* handle, celix_log_level_e level, const char* file, const char *function, int line, const char *format, va_list formatArgs));
/**
* @brief wait until all events for the bundle identified by the bndId are processed.
*/
-void celix_framework_waitUntilNoEventsForBnd(celix_framework_t* fw, long bndId);
+CELIX_FRAMEWORK_EXPORT void celix_framework_waitUntilNoEventsForBnd(celix_framework_t* fw, long bndId);
/**
* @brief wait until all pending service registration are processed.
*/
-void celix_framework_waitUntilNoPendingRegistration(celix_framework_t* fw);
+CELIX_FRAMEWORK_EXPORT void celix_framework_waitUntilNoPendingRegistration(celix_framework_t* fw);
/**
* @brief Returns whether the current thread is the Celix framework event loop thread.
*/
-bool celix_framework_isCurrentThreadTheEventLoop(celix_framework_t* fw);
+CELIX_FRAMEWORK_EXPORT bool celix_framework_isCurrentThreadTheEventLoop(celix_framework_t* fw);
/**
@@ -306,7 +306,7 @@ bool celix_framework_isCurrentThreadTheEventLoop(celix_framework_t* fw);
* if eventId >=0 this will be used, otherwise a new event id will be generated
* return eventId
*/
-long celix_framework_fireGenericEvent(celix_framework_t* fw, long eventId, long bndId, const char *eventName, void* processData, void (*processCallback)(void *data), void* doneData, void (*doneCallback)(void* doneData));
+CELIX_FRAMEWORK_EXPORT long celix_framework_fireGenericEvent(celix_framework_t* fw, long eventId, long bndId, const char *eventName, void* processData, void (*processCallback)(void *data), void* doneData, void (*doneCallback)(void* doneData));
/**
* @brief Get the next event id.
@@ -315,18 +315,18 @@ long celix_framework_fireGenericEvent(celix_framework_t* fw, long eventId, long
* The returned event id will not be used by the framework itself unless followed up with a
* celix_framework_fireGenericEvent call using the returned event id.
*/
-long celix_framework_nextEventId(celix_framework_t *fw);
+CELIX_FRAMEWORK_EXPORT long celix_framework_nextEventId(celix_framework_t *fw);
/**
* @brief Wait until a event with the provided event id is completely handled.
* This function will directly return if the provided event id is not in the event loop (already done or never issued).
*/
-void celix_framework_waitForGenericEvent(celix_framework_t *fw, long eventId);
+CELIX_FRAMEWORK_EXPORT void celix_framework_waitForGenericEvent(celix_framework_t *fw, long eventId);
/**
* @brief Wait until the framework is stopped.
*/
-void celix_framework_waitForStop(celix_framework_t *framework);
+CELIX_FRAMEWORK_EXPORT void celix_framework_waitForStop(celix_framework_t *framework);
#ifdef __cplusplus
}
diff --git a/libs/framework/include/celix_framework_factory.h b/libs/framework/include/celix_framework_factory.h
index 50192229..73b97ae0 100644
--- a/libs/framework/include/celix_framework_factory.h
+++ b/libs/framework/include/celix_framework_factory.h
@@ -32,13 +32,13 @@ extern "C" {
* @param config The framework configuration. Can be NULL.
* @return a started framework or NULL
*/
-celix_framework_t* celix_frameworkFactory_createFramework(celix_properties_t *config);
+CELIX_FRAMEWORK_EXPORT celix_framework_t* celix_frameworkFactory_createFramework(celix_properties_t *config);
/**
* Stop and destroys a Celix framework
* Note that this call block till the Celix framework is stopped
*/
-void celix_frameworkFactory_destroyFramework(celix_framework_t *fw);
+CELIX_FRAMEWORK_EXPORT void celix_frameworkFactory_destroyFramework(celix_framework_t *fw);
#ifdef __cplusplus
diff --git a/libs/framework/include/celix_framework_utils.h b/libs/framework/include/celix_framework_utils.h
index 7cf449ac..fede40c5 100644
--- a/libs/framework/include/celix_framework_utils.h
+++ b/libs/framework/include/celix_framework_utils.h
@@ -44,7 +44,7 @@ extern "C" {
* This function will always return w new array list. If no embedded bundles are found the size of the array
* list will be 0.
*/
-celix_array_list_t* celix_framework_utils_listEmbeddedBundles();
+CELIX_FRAMEWORK_EXPORT celix_array_list_t* celix_framework_utils_listEmbeddedBundles();
/**
* @brief Install the embedded bundles in the executable.
@@ -58,7 +58,7 @@ celix_array_list_t* celix_framework_utils_listEmbeddedBundles();
* @param autoStart Whether to also start the installed bundles.
* @return The number of installed bundles.
*/
-size_t celix_framework_utils_installEmbeddedBundles(celix_framework_t* fw, bool autoStart);
+CELIX_FRAMEWORK_EXPORT size_t celix_framework_utils_installEmbeddedBundles(celix_framework_t* fw, bool autoStart);
/**
* @brief Install bundles to the provided framework using the provided bundle set.
@@ -79,7 +79,7 @@ size_t celix_framework_utils_installEmbeddedBundles(celix_framework_t* fw, bool
* @param autoStart Whether to also start the installed bundles.
* @return The number of installed bundles.
*/
-size_t celix_framework_utils_installBundleSet(celix_framework_t* fw, const char* bundleSet, bool autoStart);
+CELIX_FRAMEWORK_EXPORT size_t celix_framework_utils_installBundleSet(celix_framework_t* fw, const char* bundleSet, bool autoStart);
/**
@@ -90,7 +90,7 @@ size_t celix_framework_utils_installBundleSet(celix_framework_t* fw, const char*
* @param fw The Celix framework used to create the bundle archives cache.
* @return CELIX_SUCCESS if the bundle archives cache is created successfully.
*/
-celix_status_t celix_framework_utils_createBundleArchivesCache(celix_framework_t* fw);
+CELIX_FRAMEWORK_EXPORT celix_status_t celix_framework_utils_createBundleArchivesCache(celix_framework_t* fw);
#ifdef __cplusplus
}
diff --git a/libs/framework/include/celix_launcher.h b/libs/framework/include/celix_launcher.h
index 3627b40f..1eddf194 100644
--- a/libs/framework/include/celix_launcher.h
+++ b/libs/framework/include/celix_launcher.h
@@ -44,7 +44,7 @@ extern "C" {
* @param embeddedConfig The optional embedded config, will be overridden with the config.properties if found.
* @return 0 if successful.
*/
-int celixLauncher_launchAndWaitForShutdown(int argc, char *argv[], celix_properties_t *embeddedConfig);
+CELIX_FRAMEWORK_EXPORT int celixLauncher_launchAndWaitForShutdown(int argc, char *argv[], celix_properties_t *embeddedConfig);
/**
@@ -58,7 +58,7 @@ int celixLauncher_launchAndWaitForShutdown(int argc, char *argv[], celix_propert
* @param[out] framework The framework instance.
* @return 0 if successful.
*/
-int celixLauncher_launchWithArgv(int argc, char *argv[], celix_properties_t* embeddedConfig, celix_framework_t** framework);
+CELIX_FRAMEWORK_EXPORT int celixLauncher_launchWithArgv(int argc, char *argv[], celix_properties_t* embeddedConfig, celix_framework_t** framework);
/**
* Launches the a celix framework and returns the framework.
@@ -71,7 +71,7 @@ int celixLauncher_launchWithArgv(int argc, char *argv[], celix_properties_t* emb
* @param framework Output parameter for the framework.
* @return 0 if successful.
*/
-int celixLauncher_launch(const char *configFile, celix_framework_t **framework);
+CELIX_FRAMEWORK_EXPORT int celixLauncher_launch(const char *configFile, celix_framework_t **framework);
/**
* Launches the a celix framework and returns the framework.
@@ -84,7 +84,7 @@ int celixLauncher_launch(const char *configFile, celix_framework_t **framework);
* @param framework Output parameter for the framework.
* @return 0 if successful.
*/
-int celixLauncher_launchWithStream(FILE *config, celix_framework_t **framework);
+CELIX_FRAMEWORK_EXPORT int celixLauncher_launchWithStream(FILE *config, celix_framework_t **framework);
/**
* Launches the a celix framework and returns the framework.
@@ -97,25 +97,25 @@ int celixLauncher_launchWithStream(FILE *config, celix_framework_t **framework);
* @param framework Output parameter for the framework.
* @return 0 if successful.
*/
-int celixLauncher_launchWithProperties(celix_properties_t *config, celix_framework_t **framework);
+CELIX_FRAMEWORK_EXPORT int celixLauncher_launchWithProperties(celix_properties_t *config, celix_framework_t **framework);
/**
* Wait (blocks) for the shutdown of the provided celix framework.
* @param framework The framework to wait for.
*/
-void celixLauncher_waitForShutdown(celix_framework_t *framework);
+CELIX_FRAMEWORK_EXPORT void celixLauncher_waitForShutdown(celix_framework_t *framework);
/**
* Stop the provided celix framework.
* @param framework The framework to stop.
*/
-void celixLauncher_stop(celix_framework_t *framework);
+CELIX_FRAMEWORK_EXPORT void celixLauncher_stop(celix_framework_t *framework);
/**
* Destroys the provided framework and if needed stops it first.
* @param framework The framework to stop.
*/
-void celixLauncher_destroy(celix_framework_t *framework);
+CELIX_FRAMEWORK_EXPORT void celixLauncher_destroy(celix_framework_t *framework);
#ifdef __cplusplus
}
diff --git a/libs/framework/include/celix_log.h b/libs/framework/include/celix_log.h
index e43d2709..70fdf47e 100644
--- a/libs/framework/include/celix_log.h
+++ b/libs/framework/include/celix_log.h
@@ -43,12 +43,12 @@ typedef struct celix_framework_logger celix_framework_logger_t; //opaque
}
-celix_framework_logger_t* celix_frameworkLogger_create(celix_log_level_e activeLogLevel);
-void celix_frameworkLogger_destroy(celix_framework_logger_t* logger);
-void celix_frameworkLogger_setLogCallback(celix_framework_logger_t* logger, void* logHandle, void (*logFunction)(void* handle, celix_log_level_e level, const char* file, const char *function, int line, const char *format, va_list formatArgs));
-celix_framework_logger_t* celix_frameworkLogger_globalLogger();
+CELIX_FRAMEWORK_EXPORT celix_framework_logger_t* celix_frameworkLogger_create(celix_log_level_e activeLogLevel);
+CELIX_FRAMEWORK_EXPORT void celix_frameworkLogger_destroy(celix_framework_logger_t* logger);
+CELIX_FRAMEWORK_EXPORT void celix_frameworkLogger_setLogCallback(celix_framework_logger_t* logger, void* logHandle, void (*logFunction)(void* handle, celix_log_level_e level, const char* file, const char *function, int line, const char *format, va_list formatArgs));
+CELIX_FRAMEWORK_EXPORT celix_framework_logger_t* celix_frameworkLogger_globalLogger();
-void celix_framework_log(
+CELIX_FRAMEWORK_EXPORT void celix_framework_log(
celix_framework_logger_t* logger,
celix_log_level_e level,
const char *func,
@@ -57,7 +57,7 @@ void celix_framework_log(
const char *format,
...) __attribute__((format(printf,6,7)));
-void celix_framework_logCode(
+CELIX_FRAMEWORK_EXPORT void celix_framework_logCode(
celix_framework_logger_t* logger,
celix_log_level_e level,
const char *func,
@@ -67,7 +67,7 @@ void celix_framework_logCode(
const char *format,
...) __attribute__((format(printf,7,8)));
-void celix_framework_vlog(
+CELIX_FRAMEWORK_EXPORT void celix_framework_vlog(
celix_framework_logger_t* logger,
celix_log_level_e level,
const char* file,
diff --git a/libs/framework/include/celix_types.h b/libs/framework/include/celix_types.h
index 8767dd8b..201875fe 100644
--- a/libs/framework/include/celix_types.h
+++ b/libs/framework/include/celix_types.h
@@ -34,6 +34,9 @@
#define CELIX_DEPRECATED_ATTR_MSG(msg)
#endif
+#ifdef __cplusplus
+extern "C" {
+#endif
typedef struct celix_framework celix_framework_t;
typedef struct celix_bundle celix_bundle_t;
@@ -66,5 +69,11 @@ typedef struct bundleRevision *bundle_revision_pt;
typedef struct bundleRevision bundle_revision_t;
typedef struct service_factory *service_factory_pt;
typedef struct serviceReference * service_reference_pt;
+typedef struct serviceRegistration service_registration_t;
+typedef struct serviceRegistration * service_registration_pt;
+
+#ifdef __cplusplus
+}
+#endif
#endif //CELIX_CELIX_TYPES_H
diff --git a/libs/framework/include_deprecated/archive.h b/libs/framework/include_deprecated/archive.h
index 2f1fe71c..808be38f 100644
--- a/libs/framework/include_deprecated/archive.h
+++ b/libs/framework/include_deprecated/archive.h
@@ -31,6 +31,7 @@
#define ARCHIVE_H_
#include "celix_errno.h"
+#include "celix_framework_export.h"
#ifdef __cplusplus
extern "C" {
@@ -46,7 +47,7 @@ extern "C" {
* - CELIX_SUCCESS when no errors are encountered.
* - CELIX_FILE_IO_EXCEPTION If the zip file cannot be extracted.
*/
-celix_status_t extractBundle(const char *bundleName, const char *revisionRoot);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t extractBundle(const char *bundleName, const char *revisionRoot);
#ifdef __cplusplus
}
diff --git a/libs/framework/include_deprecated/bundle.h b/libs/framework/include_deprecated/bundle.h
index 442293e4..cdc463dd 100644
--- a/libs/framework/include_deprecated/bundle.h
+++ b/libs/framework/include_deprecated/bundle.h
@@ -32,6 +32,7 @@
#include "celix_log.h"
#include "celix_threads.h"
#include "bundle_context.h"
+#include "celix_framework_export.h"
#ifdef __cplusplus
extern "C" {
@@ -40,73 +41,73 @@ extern "C" {
struct celix_bundle_activator;
typedef struct celix_bundle_activator celix_bundle_activator_t;
-FRAMEWORK_EXPORT celix_status_t bundle_isSystemBundle(const celix_bundle_t *bundle, bool *systemBundle);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundle_isSystemBundle(const celix_bundle_t *bundle, bool *systemBundle);
-FRAMEWORK_EXPORT celix_status_t bundle_getArchive(const celix_bundle_t *bundle, bundle_archive_pt *archive);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundle_getArchive(const celix_bundle_t *bundle, bundle_archive_pt *archive);
-FRAMEWORK_EXPORT celix_status_t bundle_getCurrentModule(const celix_bundle_t *bundle, module_pt *module);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundle_getCurrentModule(const celix_bundle_t *bundle, module_pt *module);
-FRAMEWORK_EXPORT celix_array_list_t *bundle_getModules(const celix_bundle_t *bundle);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_array_list_t *bundle_getModules(const celix_bundle_t *bundle);
-FRAMEWORK_EXPORT void *bundle_getHandle(celix_bundle_t *bundle);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT void *bundle_getHandle(celix_bundle_t *bundle);
-FRAMEWORK_EXPORT void bundle_setHandle(celix_bundle_t *bundle, void *handle);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT void bundle_setHandle(celix_bundle_t *bundle, void *handle);
-FRAMEWORK_EXPORT celix_bundle_activator_t *bundle_getActivator(const celix_bundle_t *bundle);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_bundle_activator_t *bundle_getActivator(const celix_bundle_t *bundle);
-FRAMEWORK_EXPORT celix_status_t bundle_setActivator(celix_bundle_t *bundle, celix_bundle_activator_t *activator);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundle_setActivator(celix_bundle_t *bundle, celix_bundle_activator_t *activator);
-FRAMEWORK_EXPORT celix_status_t bundle_getContext(const celix_bundle_t *bundle, celix_bundle_context_t **context);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundle_getContext(const celix_bundle_t *bundle, celix_bundle_context_t **context);
-FRAMEWORK_EXPORT celix_status_t bundle_setContext(celix_bundle_t *bundle, celix_bundle_context_t *context);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundle_setContext(celix_bundle_t *bundle, celix_bundle_context_t *context);
-FRAMEWORK_EXPORT celix_status_t bundle_getEntry(const celix_bundle_t *bundle, const char *name, char **entry);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundle_getEntry(const celix_bundle_t *bundle, const char *name, char **entry);
-FRAMEWORK_EXPORT celix_status_t bundle_start(celix_bundle_t *bundle);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundle_start(celix_bundle_t *bundle);
-FRAMEWORK_EXPORT celix_status_t bundle_update(celix_bundle_t *bundle, const char *inputFile);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundle_update(celix_bundle_t *bundle, const char *inputFile);
-FRAMEWORK_EXPORT celix_status_t bundle_stop(celix_bundle_t *bundle);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundle_stop(celix_bundle_t *bundle);
-FRAMEWORK_EXPORT celix_status_t bundle_uninstall(celix_bundle_t *bundle);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundle_uninstall(celix_bundle_t *bundle);
-FRAMEWORK_EXPORT celix_status_t bundle_setState(celix_bundle_t *bundle, bundle_state_e state);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundle_setState(celix_bundle_t *bundle, bundle_state_e state);
-FRAMEWORK_EXPORT celix_status_t bundle_setPersistentStateInactive(celix_bundle_t *bundle);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundle_setPersistentStateInactive(celix_bundle_t *bundle);
-FRAMEWORK_EXPORT celix_status_t bundle_setPersistentStateUninstalled(celix_bundle_t *bundle);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundle_setPersistentStateUninstalled(celix_bundle_t *bundle);
-FRAMEWORK_EXPORT void uninstallBundle(celix_bundle_t *bundle);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT void uninstallBundle(celix_bundle_t *bundle);
-FRAMEWORK_EXPORT celix_status_t bundle_revise(celix_bundle_t *bundle, const char *location, const char *inputFile);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundle_revise(celix_bundle_t *bundle, const char *location, const char *inputFile);
-FRAMEWORK_EXPORT celix_status_t bundle_addModule(celix_bundle_t *bundle, module_pt module);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundle_addModule(celix_bundle_t *bundle, module_pt module);
-FRAMEWORK_EXPORT celix_status_t bundle_closeModules(const celix_bundle_t *bundle);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundle_closeModules(const celix_bundle_t *bundle);
// Service Reference Functions
-FRAMEWORK_EXPORT celix_array_list_t *getUsingBundles(service_reference_pt reference);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_array_list_t *getUsingBundles(service_reference_pt reference);
-FRAMEWORK_EXPORT int compareTo(service_reference_pt a, service_reference_pt b);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT int compareTo(service_reference_pt a, service_reference_pt b);
-FRAMEWORK_EXPORT celix_status_t bundle_getState(const celix_bundle_t *bundle, bundle_state_e *state);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundle_getState(const celix_bundle_t *bundle, bundle_state_e *state);
-FRAMEWORK_EXPORT celix_status_t bundle_closeAndDelete(const celix_bundle_t *bundle);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundle_closeAndDelete(const celix_bundle_t *bundle);
-FRAMEWORK_EXPORT celix_status_t bundle_close(const celix_bundle_t *bundle)
+CELIX_FRAMEWORK_EXPORT celix_status_t bundle_close(const celix_bundle_t *bundle)
__attribute__((deprecated("bundle_close is deprecated and does nothing")));
-FRAMEWORK_EXPORT celix_status_t bundle_refresh(celix_bundle_t *bundle);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundle_refresh(celix_bundle_t *bundle);
-FRAMEWORK_EXPORT celix_status_t bundle_getBundleId(const celix_bundle_t *bundle, long *id);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundle_getBundleId(const celix_bundle_t *bundle, long *id);
-FRAMEWORK_EXPORT celix_status_t bundle_getRegisteredServices(celix_bundle_t *bundle, celix_array_list_t **list);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundle_getRegisteredServices(celix_bundle_t *bundle, celix_array_list_t **list);
-FRAMEWORK_EXPORT celix_status_t bundle_getServicesInUse(celix_bundle_t *bundle, celix_array_list_t **list);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundle_getServicesInUse(celix_bundle_t *bundle, celix_array_list_t **list);
-FRAMEWORK_EXPORT celix_status_t bundle_getFramework(const celix_bundle_t *bundle, celix_framework_t **framework);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundle_getFramework(const celix_bundle_t *bundle, celix_framework_t **framework);
-FRAMEWORK_EXPORT celix_status_t bundle_getBundleLocation(const celix_bundle_t *bundle, const char **location);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundle_getBundleLocation(const celix_bundle_t *bundle, const char **location);
#ifdef __cplusplus
diff --git a/libs/framework/include_deprecated/bundle_activator.h b/libs/framework/include_deprecated/bundle_activator.h
index 0e7dc3c8..42dc470d 100644
--- a/libs/framework/include_deprecated/bundle_activator.h
+++ b/libs/framework/include_deprecated/bundle_activator.h
@@ -17,14 +17,15 @@
* under the License.
*/
+#ifndef BUNDLE_ACTIVATOR_H_
+#define BUNDLE_ACTIVATOR_H_
+
#include <stdlib.h>
#include "bundle_context.h"
#include "celix_bundle_context.h"
#include "framework_exports.h"
-
-#ifndef BUNDLE_ACTIVATOR_H_
-#define BUNDLE_ACTIVATOR_H_
+#include "celix_framework_export.h"
#ifdef __cplusplus
extern "C" {
@@ -44,7 +45,7 @@ extern "C" {
* - Any other status code will mark the bundle as stopped and the framework will remove this
* bundle's listeners, unregister all services, and release all services used by this bundle.
*/
-ACTIVATOR_EXPORT celix_status_t bundleActivator_create(celix_bundle_context_t *ctx, void **userData);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundleActivator_create(celix_bundle_context_t *ctx, void **userData);
/**
* Called when this bundle is started so the Framework can perform the bundle-specific activities necessary
@@ -62,7 +63,7 @@ ACTIVATOR_EXPORT celix_status_t bundleActivator_create(celix_bundle_context_t *c
* - Any other status code will mark the bundle as stopped and the framework will remove this
* bundle's listeners, unregister all services, and release all services used by this bundle.
*/
-ACTIVATOR_EXPORT celix_status_t bundleActivator_start(void *userData, celix_bundle_context_t *ctx);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundleActivator_start(void *userData, celix_bundle_context_t *ctx);
/**
* Called when this bundle is stopped so the Framework can perform the bundle-specific activities necessary
@@ -81,7 +82,7 @@ ACTIVATOR_EXPORT celix_status_t bundleActivator_start(void *userData, celix_bund
* - Any other status code will mark the bundle as stopped and the framework will remove this
* bundle's listeners, unregister all services, and release all services used by this bundle.
*/
-ACTIVATOR_EXPORT celix_status_t bundleActivator_stop(void *userData, celix_bundle_context_t *ctx);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundleActivator_stop(void *userData, celix_bundle_context_t *ctx);
/**
* Called when this bundle is stopped so the bundle can destroy the instance of its activator. In general, this
@@ -98,7 +99,7 @@ ACTIVATOR_EXPORT celix_status_t bundleActivator_stop(void *userData, celix_bundl
* - Any other status code will mark the bundle as stopped and the framework will remove this
* bundle's listeners, unregister all services, and release all services used by this bundle.
*/
-ACTIVATOR_EXPORT celix_status_t
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t
bundleActivator_destroy(void *userData, celix_bundle_context_t* ctx);
#ifdef __cplusplus
diff --git a/libs/framework/include_deprecated/bundle_archive.h b/libs/framework/include_deprecated/bundle_archive.h
index 8ad72070..7ea6f061 100644
--- a/libs/framework/include_deprecated/bundle_archive.h
+++ b/libs/framework/include_deprecated/bundle_archive.h
@@ -35,53 +35,57 @@
#include "bundle_revision.h"
#include "celix_bundle_state.h"
#include "celix_errno.h"
-#include "framework_exports.h"
#include "celix_log.h"
+#include <stdlib.h>
+
+#include "bundle_context.h"
+#include "celix_bundle_context.h"
+#include "celix_framework_export.h"
#ifdef __cplusplus
extern "C" {
#endif
-FRAMEWORK_EXPORT celix_status_t bundleArchive_getId(bundle_archive_pt archive, long *id);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundleArchive_getId(bundle_archive_pt archive, long *id);
/**
* Return the current location of the bundle.
* @warning Not safe, because location can change during bundle revise.
* @return
*/
-FRAMEWORK_EXPORT celix_status_t bundleArchive_getLocation(bundle_archive_pt archive, const char **location)
+CELIX_FRAMEWORK_EXPORT celix_status_t bundleArchive_getLocation(bundle_archive_pt archive, const char **location)
__attribute__((deprecated("use celix_bundle_getLocation instead")));
-FRAMEWORK_EXPORT celix_status_t bundleArchive_getArchiveRoot(bundle_archive_pt archive, const char **archiveRoot);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundleArchive_getArchiveRoot(bundle_archive_pt archive, const char **archiveRoot);
-FRAMEWORK_EXPORT celix_status_t
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t
bundleArchive_revise(bundle_archive_pt archive, const char *location, const char *inputFile);
-FRAMEWORK_EXPORT celix_status_t bundleArchive_rollbackRevise(bundle_archive_pt archive, bool *rolledback);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundleArchive_rollbackRevise(bundle_archive_pt archive, bool *rolledback);
-FRAMEWORK_EXPORT celix_status_t
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t
bundleArchive_getRevision(bundle_archive_pt archive, long revNr, bundle_revision_pt *revision);
-FRAMEWORK_EXPORT celix_status_t
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t
bundleArchive_getCurrentRevision(bundle_archive_pt archive, bundle_revision_pt *revision);
-FRAMEWORK_EXPORT celix_status_t bundleArchive_getCurrentRevisionNumber(bundle_archive_pt archive, long *revisionNumber) __attribute__((deprecated));
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundleArchive_getCurrentRevisionNumber(bundle_archive_pt archive, long *revisionNumber) __attribute__((deprecated));
-FRAMEWORK_EXPORT celix_status_t bundleArchive_getRefreshCount(bundle_archive_pt archive, long *refreshCount);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundleArchive_getRefreshCount(bundle_archive_pt archive, long *refreshCount);
-FRAMEWORK_EXPORT celix_status_t bundleArchive_setRefreshCount(bundle_archive_pt archive);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundleArchive_setRefreshCount(bundle_archive_pt archive);
-FRAMEWORK_EXPORT celix_status_t bundleArchive_close(bundle_archive_pt archive);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundleArchive_close(bundle_archive_pt archive);
-FRAMEWORK_EXPORT celix_status_t bundleArchive_closeAndDelete(bundle_archive_pt archive);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundleArchive_closeAndDelete(bundle_archive_pt archive);
-FRAMEWORK_EXPORT celix_status_t bundleArchive_setLastModified(bundle_archive_pt archive, time_t lastModifiedTime);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundleArchive_setLastModified(bundle_archive_pt archive, time_t lastModifiedTime);
-FRAMEWORK_EXPORT celix_status_t bundleArchive_getLastModified(bundle_archive_pt archive, time_t *lastModified);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundleArchive_getLastModified(bundle_archive_pt archive, time_t *lastModified);
-FRAMEWORK_EXPORT celix_status_t bundleArchive_setPersistentState(bundle_archive_pt archive, bundle_state_e state);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundleArchive_setPersistentState(bundle_archive_pt archive, bundle_state_e state);
-FRAMEWORK_EXPORT celix_status_t bundleArchive_getPersistentState(bundle_archive_pt archive, bundle_state_e *state);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundleArchive_getPersistentState(bundle_archive_pt archive, bundle_state_e *state);
/**
* @brief Return the last modified time of the bundle archive.
@@ -95,14 +99,14 @@ FRAMEWORK_EXPORT celix_status_t bundleArchive_getPersistentState(bundle_archive_
* @return CELIX_SUCCESS if the last modified time could be retrieved, CELIX_FILE_IO_EXCEPTION if the last modified
* time could not be retrieved. Check errno for more specific error information.
*/
-FRAMEWORK_EXPORT celix_status_t celix_bundleArchive_getLastModified(bundle_archive_pt archive, struct timespec* lastModified);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t celix_bundleArchive_getLastModified(bundle_archive_pt archive, struct timespec* lastModified);
/**
* @brief Return the location of the bundle archive.b
* @param[in] archive The bundle archive.
* @return The location of the bundle archive. The caller is responsible for freeing the returned string.
*/
-FRAMEWORK_EXPORT char* celix_bundleArchive_getLocation(bundle_archive_pt archive);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT char* celix_bundleArchive_getLocation(bundle_archive_pt archive);
#ifdef __cplusplus
diff --git a/libs/framework/include_deprecated/bundle_context.h b/libs/framework/include_deprecated/bundle_context.h
index b0dc0d51..ef38e5bd 100644
--- a/libs/framework/include_deprecated/bundle_context.h
+++ b/libs/framework/include_deprecated/bundle_context.h
@@ -38,31 +38,36 @@
#include "celix_service_listener.h"
#include "dm_dependency_manager.h"
+#include <stdlib.h>
+
+#include "bundle_context.h"
+#include "celix_bundle_context.h"
+#include "celix_framework_export.h"
#ifdef __cplusplus
extern "C" {
#endif
-celix_status_t
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t
bundleContext_create(celix_framework_t *framework, celix_framework_logger_t* logger, celix_bundle_t *bundle, celix_bundle_context_t **bundle_context);
-celix_status_t bundleContext_destroy(celix_bundle_context_t *context);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundleContext_destroy(celix_bundle_context_t *context);
-FRAMEWORK_EXPORT celix_status_t bundleContext_getBundle(celix_bundle_context_t *context, celix_bundle_t **bundle);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundleContext_getBundle(celix_bundle_context_t *context, celix_bundle_t **bundle);
-FRAMEWORK_EXPORT celix_status_t bundleContext_getFramework(celix_bundle_context_t *context, celix_framework_t **framework);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundleContext_getFramework(celix_bundle_context_t *context, celix_framework_t **framework);
-FRAMEWORK_EXPORT celix_status_t
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t
bundleContext_installBundle(celix_bundle_context_t *context, const char *location, celix_bundle_t **bundle);
-FRAMEWORK_EXPORT celix_status_t
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t
bundleContext_installBundle2(celix_bundle_context_t *context, const char *location, const char *inputFile, celix_bundle_t **bundle);
-FRAMEWORK_EXPORT celix_status_t
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t
bundleContext_registerService(celix_bundle_context_t *context, const char *serviceName, const void *svcObj,
celix_properties_t *properties, service_registration_pt *service_registration);
-FRAMEWORK_EXPORT celix_status_t
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t
bundleContext_registerServiceFactory(celix_bundle_context_t *context, const char *serviceName, service_factory_pt factory,
celix_properties_t *properties, service_registration_pt *service_registration);
@@ -75,7 +80,7 @@ bundleContext_registerServiceFactory(celix_bundle_context_t *context, const char
* @param service_reference _output_ The found service reference, or NULL when no service is found.
* @return CELIX_SUCCESS on success
*/
-FRAMEWORK_EXPORT celix_status_t bundleContext_getServiceReference(celix_bundle_context_t *context, const char *serviceName,
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundleContext_getServiceReference(celix_bundle_context_t *context, const char *serviceName,
service_reference_pt *service_reference);
/** Same as bundleContext_getServiceReference, but than for a optional serviceName combined with a optional filter.
@@ -87,7 +92,7 @@ FRAMEWORK_EXPORT celix_status_t bundleContext_getServiceReference(celix_bundle_c
* @param service_references _output_ a array list, can be size 0.
* @return CELIX_SUCCESS on success
*/
-FRAMEWORK_EXPORT celix_status_t
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t
bundleContext_getServiceReferences(celix_bundle_context_t *context, const char *serviceName, const char *filter,
celix_array_list_t **service_references);
@@ -99,7 +104,7 @@ bundleContext_getServiceReferences(celix_bundle_context_t *context, const char *
* @param reference the service reference to retain
* @return CELIX_SUCCES on success
*/
-FRAMEWORK_EXPORT celix_status_t
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t
bundleContext_retainServiceReference(celix_bundle_context_t *context, service_reference_pt reference);
/**
@@ -111,34 +116,34 @@ bundleContext_retainServiceReference(celix_bundle_context_t *context, service_re
* @param reference the service reference to unget
* @return CELIX_SUCCESS on success.
*/
-FRAMEWORK_EXPORT celix_status_t
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t
bundleContext_ungetServiceReference(celix_bundle_context_t *context, service_reference_pt reference);
-FRAMEWORK_EXPORT celix_status_t
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t
bundleContext_getService(celix_bundle_context_t *context, service_reference_pt reference, void **service_instance);
-FRAMEWORK_EXPORT celix_status_t
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t
bundleContext_ungetService(celix_bundle_context_t *context, service_reference_pt reference, bool *result);
-FRAMEWORK_EXPORT celix_status_t bundleContext_getBundles(celix_bundle_context_t *context, celix_array_list_t **bundles);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundleContext_getBundles(celix_bundle_context_t *context, celix_array_list_t **bundles);
-FRAMEWORK_EXPORT celix_status_t bundleContext_getBundleById(celix_bundle_context_t *context, long id, celix_bundle_t **bundle);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundleContext_getBundleById(celix_bundle_context_t *context, long id, celix_bundle_t **bundle);
-FRAMEWORK_EXPORT celix_status_t
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t
bundleContext_addServiceListener(celix_bundle_context_t *context, celix_service_listener_t *listener, const char *filter) __attribute__((deprecated("using service listeners directly is deprecated, use a service tracker instead!")));
-FRAMEWORK_EXPORT celix_status_t
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t
bundleContext_removeServiceListener(celix_bundle_context_t *context, celix_service_listener_t *listener);
-FRAMEWORK_EXPORT celix_status_t bundleContext_addBundleListener(celix_bundle_context_t *context, bundle_listener_pt listener);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundleContext_addBundleListener(celix_bundle_context_t *context, bundle_listener_pt listener);
-FRAMEWORK_EXPORT celix_status_t
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t
bundleContext_removeBundleListener(celix_bundle_context_t *context, bundle_listener_pt listener);
-FRAMEWORK_EXPORT celix_status_t
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t
bundleContext_addFrameworkListener(celix_bundle_context_t *context, framework_listener_pt listener);
-FRAMEWORK_EXPORT celix_status_t
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t
bundleContext_removeFrameworkListener(celix_bundle_context_t *context, framework_listener_pt listener);
/**
@@ -149,7 +154,7 @@ bundleContext_removeFrameworkListener(celix_bundle_context_t *context, framework
* @param value A ptr to the output value. This will be set when a value is found or else will be set to NULL.
* @return 0 if successful.
*/
-FRAMEWORK_EXPORT celix_status_t
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t
bundleContext_getProperty(celix_bundle_context_t *context, const char *name, const char **value);
/**
@@ -161,7 +166,7 @@ bundleContext_getProperty(celix_bundle_context_t *context, const char *name, con
* @param value A ptr to the output value. This will be set when a value is found or else will be set to NULL.
* @return 0 if successful.
*/
-FRAMEWORK_EXPORT celix_status_t
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t
bundleContext_getPropertyWithDefault(celix_bundle_context_t *context, const char *name, const char *defaultValue, const char **value);
diff --git a/libs/framework/include_deprecated/bundle_revision.h b/libs/framework/include_deprecated/bundle_revision.h
index 7d4bbe8c..6b39ca4f 100644
--- a/libs/framework/include_deprecated/bundle_revision.h
+++ b/libs/framework/include_deprecated/bundle_revision.h
@@ -28,6 +28,7 @@
#include "manifest.h"
#include "celix_log.h"
#include "array_list.h"
+#include "celix_framework_export.h"
#ifdef __cplusplus
extern "C" {
@@ -53,7 +54,7 @@ extern "C" {
* - CELIX_SUCCESS when no errors are encountered.
* - CELIX_ILLEGAL_ARGUMENT If <code>revision</code> is illegal.
*/
-celix_status_t bundleRevision_getNumber(const bundle_revision_t* revision, long *revisionNr) __attribute__((deprecated));
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundleRevision_getNumber(const bundle_revision_t* revision, long *revisionNr) __attribute__((deprecated));
/**
* Retrieves the location of the given revision.
@@ -65,7 +66,7 @@ celix_status_t bundleRevision_getNumber(const bundle_revision_t* revision, long
* - CELIX_SUCCESS when no errors are encountered.
* - CELIX_ILLEGAL_ARGUMENT If <code>revision</code> is illegal.
*/
-celix_status_t bundleRevision_getLocation(const bundle_revision_t* revision, const char **location);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundleRevision_getLocation(const bundle_revision_t* revision, const char **location);
/**
* Retrieves the root of the given revision.
@@ -77,7 +78,7 @@ celix_status_t bundleRevision_getLocation(const bundle_revision_t* revision, con
* - CELIX_SUCCESS when no errors are encountered.
* - CELIX_ILLEGAL_ARGUMENT If <code>revision</code> is illegal.
*/
-celix_status_t bundleRevision_getRoot(const bundle_revision_t* revision, const char **root);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundleRevision_getRoot(const bundle_revision_t* revision, const char **root);
/**
* Retrieves the manifest of the given revision.
@@ -89,14 +90,14 @@ celix_status_t bundleRevision_getRoot(const bundle_revision_t* revision, const c
* - CELIX_SUCCESS when no errors are encountered.
* - CELIX_ILLEGAL_ARGUMENT If <code>revision</code> is illegal.
*/
-celix_status_t bundleRevision_getManifest(const bundle_revision_t* revision, manifest_pt *manifest);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t bundleRevision_getManifest(const bundle_revision_t* revision, manifest_pt *manifest);
/**
* Originally retrieved the handles of the installed libraries for this revision.
* Currently deprecated and will not return any handles.
* @return CELIX_SUCCESS and an empty list.
*/
-celix_status_t bundleRevision_getHandles(const bundle_revision_t* revision, celix_array_list_t **handles)
+CELIX_FRAMEWORK_EXPORT celix_status_t bundleRevision_getHandles(const bundle_revision_t* revision, celix_array_list_t **handles)
__attribute__((deprecated("Deprecated. Library handles are no now handled by the bundle module.")));
#ifdef __cplusplus
diff --git a/libs/framework/include_deprecated/capability.h b/libs/framework/include_deprecated/capability.h
index 6ea843cf..ada46bc3 100644
--- a/libs/framework/include_deprecated/capability.h
+++ b/libs/framework/include_deprecated/capability.h
@@ -31,21 +31,22 @@ typedef struct capability *capability_pt;
#include "hash_map.h"
#include "module.h"
+#include "celix_framework_export.h"
#ifdef __cplusplus
extern "C" {
#endif
-celix_status_t
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t
capability_create(module_pt module, hash_map_pt directives, hash_map_pt attributes, capability_pt *capability);
-celix_status_t capability_destroy(capability_pt capability);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t capability_destroy(capability_pt capability);
-celix_status_t capability_getServiceName(capability_pt capability, const char **serviceName);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t capability_getServiceName(capability_pt capability, const char **serviceName);
-celix_status_t capability_getVersion(capability_pt capability, version_pt *version);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t capability_getVersion(capability_pt capability, version_pt *version);
-celix_status_t capability_getModule(capability_pt capability, module_pt *module);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t capability_getModule(capability_pt capability, module_pt *module);
#ifdef __cplusplus
}
diff --git a/libs/framework/include_deprecated/dm_activator.h b/libs/framework/include_deprecated/dm_activator.h
index adca8512..5b8e7f93 100644
--- a/libs/framework/include_deprecated/dm_activator.h
+++ b/libs/framework/include_deprecated/dm_activator.h
@@ -35,6 +35,7 @@
#include "dm_component.h"
#include "dm_service_dependency.h"
#include "celix_bundle_activator.h"
+#include "celix_framework_export.h"
#ifdef __cplusplus
extern "C" {
@@ -48,20 +49,20 @@ extern "C" {
* Should be implemented by a bundle specific DM activator.
* Should allocate and initialize a bundle specific activator struct.
*/
-celix_status_t dm_create(bundle_context_pt context, void ** userData);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t dm_create(bundle_context_pt context, void ** userData);
/**
* Should be implemented by a bundle specific DM activator.
* Will be called after the dm_create function.
* Can be used to specify with use of the provided dependency manager the bundle specific components.
*/
-celix_status_t dm_init(void * userData, bundle_context_pt context, celix_dependency_manager_t *manager);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t dm_init(void * userData, bundle_context_pt context, celix_dependency_manager_t *manager);
/**
* Should be implemented by a bundle specific DM activator.
* Should deinitialize and deallocate the bundle specific activator struct.
*/
-celix_status_t dm_destroy(void * userData, bundle_context_pt context, celix_dependency_manager_t *manager);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t dm_destroy(void * userData, bundle_context_pt context, celix_dependency_manager_t *manager);
#ifdef __cplusplus
}
diff --git a/libs/framework/include_deprecated/dm_component.h b/libs/framework/include_deprecated/dm_component.h
index 92b5b93c..abe1e42e 100644
--- a/libs/framework/include_deprecated/dm_component.h
+++ b/libs/framework/include_deprecated/dm_component.h
@@ -35,37 +35,38 @@
#include "array_list.h"
#include "celix_dm_info.h"
#include "celix_dm_component.h"
+#include "celix_framework_export.h"
#ifdef __cplusplus
extern "C" {
#endif
-typedef enum celix_dm_component_state_enum dm_component_state_t CELIX_DEPRECATED_ATTR; //deprecated
+typedef enum celix_dm_component_state_enum dm_component_state_t; //deprecated
#define DM_COMPONENT_MAX_ID_LENGTH 64
#define DM_COMPONENT_MAX_NAME_LENGTH 128
-typedef int (*init_fpt)(void *userData) CELIX_DEPRECATED_ATTR;
-typedef int (*start_fpt)(void *userData) CELIX_DEPRECATED_ATTR;
-typedef int (*stop_fpt)(void *userData) CELIX_DEPRECATED_ATTR;
-typedef int (*deinit_fpt)(void *userData) CELIX_DEPRECATED_ATTR;
+typedef int (*init_fpt)(void *userData);
+typedef int (*start_fpt)(void *userData);
+typedef int (*stop_fpt)(void *userData);
+typedef int (*deinit_fpt)(void *userData);
/**
* Creates a DM Component
* Caller has ownership.
*/
-celix_status_t component_create(celix_bundle_context_t *context, const char* name, celix_dm_component_t **component) CELIX_DEPRECATED_ATTR;
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t component_create(celix_bundle_context_t *context, const char* name, celix_dm_component_t **component);
/**
* Destroys a DM Component
*/
-void component_destroy(celix_dm_component_t *component) CELIX_DEPRECATED_ATTR;
+CELIX_FRAMEWORK_DEPRECATED_EXPORT void component_destroy(celix_dm_component_t *component);
/**
* @deprecated Deprecated. not used ny mowre
*/
-celix_status_t component_setCLanguageProperty(celix_dm_component_t *component, bool setCLangProp) CELIX_DEPRECATED_ATTR;
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t component_setCLanguageProperty(celix_dm_component_t *component, bool setCLangProp);
/**
@@ -75,7 +76,7 @@ celix_status_t component_setCLanguageProperty(celix_dm_component_t *component, b
* @param version The version of the interface (e.g. "1.0.0"), Can be a NULL pointer.
* @param properties To (meta) properties to provide with the service. Can be a NULL pointer.
*/
-celix_status_t component_addInterface(celix_dm_component_t *component, const char* serviceName, const char* serviceVersion, const void* service, celix_properties_t *properties) CELIX_DEPRECATED_ATTR;
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t component_addInterface(celix_dm_component_t *component, const char* serviceName, const char* serviceVersion, const void* service, celix_properties_t *properties);
/**
* Removed a C interface from a component the Celix framework.
@@ -83,52 +84,52 @@ celix_status_t component_addInterface(celix_dm_component_t *component, const cha
* @param serviceName the service name.
* @return CELIX_SUCCESS when removed, CELIX_ILLEGAL_ARGUMENT when the component does not provide the interface
*/
-celix_status_t component_removeInterface(celix_dm_component_t *component, const void* service) CELIX_DEPRECATED_ATTR;
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t component_removeInterface(celix_dm_component_t *component, const void* service);
/**
* Sets the implementation of the component. e.g. the component handle/self/this pointer.
*/
-celix_status_t component_setImplementation(celix_dm_component_t *component, void* implementation) CELIX_DEPRECATED_ATTR;
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t component_setImplementation(celix_dm_component_t *component, void* implementation);
/**
* Returns an arraylist of service names. The caller owns the arraylist and strings (char *)
*/
-celix_status_t component_getInterfaces(celix_dm_component_t *component, celix_array_list_t **servicesNames) CELIX_DEPRECATED_ATTR;
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t component_getInterfaces(celix_dm_component_t *component, celix_array_list_t **servicesNames);
/**
* Adds a C service dependency to the component
*/
-celix_status_t component_addServiceDependency(celix_dm_component_t *component, celix_dm_service_dependency_t *dep) CELIX_DEPRECATED_ATTR;
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t component_addServiceDependency(celix_dm_component_t *component, celix_dm_service_dependency_t *dep);
/**
* Removes a C service dependency to the component
*/
-celix_status_t component_removeServiceDependency(celix_dm_component_t *component, celix_dm_service_dependency_t *dependency) CELIX_DEPRECATED_ATTR;
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t component_removeServiceDependency(celix_dm_component_t *component, celix_dm_service_dependency_t *dependency);
/**
* Returns the current state of the component.
*/
-celix_dm_component_state_t component_currentState(celix_dm_component_t *cmp) CELIX_DEPRECATED_ATTR;
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_dm_component_state_t component_currentState(celix_dm_component_t *cmp);
/**
* Returns the implementation of the component. e.g. the component handle/self/this pointer.
*/
-void * component_getImplementation(celix_dm_component_t *cmp) CELIX_DEPRECATED_ATTR;
+CELIX_FRAMEWORK_DEPRECATED_EXPORT void * component_getImplementation(celix_dm_component_t *cmp);
/**
* Returns the DM component name. This is used when printing information about the component.
*/
-const char * component_getName(celix_dm_component_t *cmp) CELIX_DEPRECATED_ATTR;
+CELIX_FRAMEWORK_DEPRECATED_EXPORT const char * component_getName(celix_dm_component_t *cmp);
/**
* Returns bundle context for the bundle where this DM component is part of.
*/
-celix_status_t component_getBundleContext(celix_dm_component_t *component, celix_bundle_context_t **out) CELIX_DEPRECATED_ATTR;
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t component_getBundleContext(celix_dm_component_t *component, celix_bundle_context_t **out);
/**
* Set the component life cycle callbacks.
* The first argument will be the component implementation (@see component_getImplementation)
*/
-celix_status_t component_setCallbacks(celix_dm_component_t *component, celix_dm_cmp_lifecycle_fpt init, celix_dm_cmp_lifecycle_fpt start, celix_dm_cmp_lifecycle_fpt stop, celix_dm_cmp_lifecycle_fpt deinit) CELIX_DEPRECATED_ATTR;
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t component_setCallbacks(celix_dm_component_t *component, celix_dm_cmp_lifecycle_fpt init, celix_dm_cmp_lifecycle_fpt start, celix_dm_cmp_lifecycle_fpt stop, celix_dm_cmp_lifecycle_fpt deinit);
/**
* Set the component life cycle callbacks using a MACRO for improving the type safety.
@@ -146,12 +147,12 @@ celix_status_t component_setCallbacks(celix_dm_component_t *component, celix_dm_
* Create a DM Component info struct. Containing information about the component.
* Caller has ownership.
*/
-celix_status_t component_getComponentInfo(celix_dm_component_t *component, dm_component_info_pt *info) CELIX_DEPRECATED_ATTR;
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t component_getComponentInfo(celix_dm_component_t *component, dm_component_info_pt *info);
/**
* Destroys a DM Component info struct.
*/
-void component_destroyComponentInfo(dm_component_info_pt info) CELIX_DEPRECATED_ATTR;
+CELIX_FRAMEWORK_DEPRECATED_EXPORT void component_destroyComponentInfo(dm_component_info_pt info);
#ifdef __cplusplus
}
diff --git a/libs/framework/include_deprecated/dm_dependency_manager.h b/libs/framework/include_deprecated/dm_dependency_manager.h
index 1438bae9..ce322a3f 100644
--- a/libs/framework/include_deprecated/dm_dependency_manager.h
+++ b/libs/framework/include_deprecated/dm_dependency_manager.h
@@ -32,6 +32,7 @@
#include "celix_errno.h"
#include "array_list.h"
#include "celix_dm_info.h"
+#include "celix_framework_export.h"
#ifdef __cplusplus
extern "C" {
@@ -41,38 +42,38 @@ extern "C" {
* Creates a dependency manager.
* Caller has ownership.
*/
-celix_status_t dependencyManager_create(celix_bundle_context_t *context, celix_dependency_manager_t **manager) CELIX_DEPRECATED_ATTR;
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t dependencyManager_create(celix_bundle_context_t *context, celix_dependency_manager_t **manager);
/**
* Destroys the provided dependency manager
*/
-void dependencyManager_destroy(celix_dependency_manager_t *manager) CELIX_DEPRECATED_ATTR;
+CELIX_FRAMEWORK_DEPRECATED_EXPORT void dependencyManager_destroy(celix_dependency_manager_t *manager);
/**
* Adds a DM component to the dependency manager
*/
-celix_status_t dependencyManager_add(celix_dependency_manager_t *manager, celix_dm_component_t *component)CELIX_DEPRECATED_ATTR;
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t dependencyManager_add(celix_dependency_manager_t *manager, celix_dm_component_t *component)CELIX_DEPRECATED_ATTR;
/**
* Removes a DM component from the dependency manager and destroys it
*/
-celix_status_t dependencyManager_remove(celix_dependency_manager_t *manager, celix_dm_component_t *component) CELIX_DEPRECATED_ATTR;
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t dependencyManager_remove(celix_dependency_manager_t *manager, celix_dm_component_t *component);
/**
* Removes all DM components from the dependency manager
*/
-celix_status_t dependencyManager_removeAllComponents(celix_dependency_manager_t *manager) CELIX_DEPRECATED_ATTR;
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t dependencyManager_removeAllComponents(celix_dependency_manager_t *manager);
/**
* Create and returns a DM Info struct. Which contains information about the state of the DM components
* Caller has ownership.
*/
-celix_status_t dependencyManager_getInfo(celix_dependency_manager_t *manager, dm_dependency_manager_info_pt *info) CELIX_DEPRECATED_ATTR;
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t dependencyManager_getInfo(celix_dependency_manager_t *manager, dm_dependency_manager_info_pt *info);
/**
* Destroys a DM info struct.
*/
-void dependencyManager_destroyInfo(celix_dependency_manager_t *manager, dm_dependency_manager_info_pt info) CELIX_DEPRECATED_ATTR;
+CELIX_FRAMEWORK_DEPRECATED_EXPORT void dependencyManager_destroyInfo(celix_dependency_manager_t *manager, dm_dependency_manager_info_pt info);
#ifdef __cplusplus
}
diff --git a/libs/framework/include_deprecated/dm_service_dependency.h b/libs/framework/include_deprecated/dm_service_dependency.h
index 153fcf3d..9d021a65 100644
--- a/libs/framework/include_deprecated/dm_service_dependency.h
+++ b/libs/framework/include_deprecated/dm_service_dependency.h
@@ -34,13 +34,14 @@
#include "celix_dm_info.h"
#include "celix_dm_service_dependency.h"
+#include "celix_framework_export.h"
#ifdef __cplusplus
extern "C" {
#endif
-typedef enum celix_dm_service_dependency_strategy_enum dm_service_dependency_strategy_t CELIX_DEPRECATED_ATTR;
+typedef enum celix_dm_service_dependency_strategy_enum dm_service_dependency_strategy_t;
typedef int (*service_set_fpt)(void *handle, const void* service);
typedef int (*service_add_fpt)(void *handle, const void* service);
@@ -58,7 +59,7 @@ typedef celix_status_t (*service_swap_with_ref_fpt)(void *handle, service_refere
* Create a service dependency.
* Caller has ownership.
*/
-celix_status_t serviceDependency_create(celix_dm_service_dependency_t **dep) CELIX_DEPRECATED_ATTR;
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t serviceDependency_create(celix_dm_service_dependency_t **dep);
/**
* Destroys a service dependency.
@@ -67,19 +68,18 @@ celix_status_t serviceDependency_create(celix_dm_service_dependency_t **dep) CEL
* Can only be called if the serviceDependency is disabled (note that a service dependency not added to a
* component is disabled).
*/
-celix_status_t serviceDependency_destroy(celix_dm_service_dependency_t **dep) CELIX_DEPRECATED_ATTR;
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t serviceDependency_destroy(celix_dm_service_dependency_t **dep);
/**
* Specify if the service dependency is required. default is false
*/
-celix_status_t serviceDependency_setRequired(celix_dm_service_dependency_t *dependency, bool required) CELIX_DEPRECATED_ATTR;
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t serviceDependency_setRequired(celix_dm_service_dependency_t *dependency, bool required);
/**
* Specify if the service dependency should add a C language filter for this dependency if no "service.lang" part is found the in the provided filter.
* Default is false
*/
-celix_status_t serviceDependency_setAddCLanguageFilter(celix_dm_service_dependency_t *dependency, bool addCLangFilter) CELIX_DEPRECATED_ATTR;
-
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t serviceDependency_setAddCLanguageFilter(celix_dm_service_dependency_t *dependency, bool addCLangFilter);
/**
* Specify if the service dependency update strategy.
@@ -94,12 +94,12 @@ celix_status_t serviceDependency_setAddCLanguageFilter(celix_dm_service_dependen
*
* Default strategy is DM_SERVICE_DEPENDENCY_STRATEGY_SUSPEND
*/
-celix_status_t serviceDependency_setStrategy(celix_dm_service_dependency_t *dependency, celix_dm_service_dependency_strategy_t strategy) CELIX_DEPRECATED_ATTR;
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t serviceDependency_setStrategy(celix_dm_service_dependency_t *dependency, celix_dm_service_dependency_strategy_t strategy);
/**
* Return the service dependency update strategy.
*/
-celix_status_t serviceDependency_getStrategy(celix_dm_service_dependency_t *dependency, celix_dm_service_dependency_strategy_t* strategy) CELIX_DEPRECATED_ATTR;
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t serviceDependency_getStrategy(celix_dm_service_dependency_t *dependency, celix_dm_service_dependency_strategy_t* strategy);
/**
* Set the service name, version range and filter.
@@ -108,12 +108,12 @@ celix_status_t serviceDependency_getStrategy(celix_dm_service_dependency_t *depe
* @param serviceVersionRange The service version range, can be a NULL pointer.
* @param filter The (additional) filter to use (e.g. "(location=front)"). Can be a NULL pointer.
*/
-celix_status_t serviceDependency_setService(celix_dm_service_dependency_t *dependency, const char* serviceName, const char* serviceVersionRange, const char* filter) CELIX_DEPRECATED_ATTR;
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t serviceDependency_setService(celix_dm_service_dependency_t *dependency, const char* serviceName, const char* serviceVersionRange, const char* filter);
/**
* Returns the service dependency filter.
*/
-celix_status_t serviceDependency_getFilter(celix_dm_service_dependency_t *dependency, const char** filter) CELIX_DEPRECATED_ATTR;
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t serviceDependency_getFilter(celix_dm_service_dependency_t *dependency, const char** filter);
/**
* Set the set, add, change, remove and swap function callbacks when services specified by the service dependency
@@ -121,7 +121,7 @@ celix_status_t serviceDependency_getFilter(celix_dm_service_dependency_t *depend
* The first argument of the callbacks will be the component implement (@see component_getImplementation)
* The second the argument a pointer to an instance of a service struct of the specified service dependency.
*/
-celix_status_t serviceDependency_setCallbacks(celix_dm_service_dependency_t *dependency, service_set_fpt set, service_add_fpt add, service_change_fpt change, service_remove_fpt remove, service_swap_fpt swap) CELIX_DEPRECATED_ATTR;
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t serviceDependency_setCallbacks(celix_dm_service_dependency_t *dependency, service_set_fpt set, service_add_fpt add, service_change_fpt change, service_remove_fpt remove, service_swap_fpt swap);
#define serviceDependency_setCallbacksSafe(dep, cmpType, servType, set, add, change, remove, swap) \
do { \
@@ -138,18 +138,18 @@ celix_status_t serviceDependency_setCallbacks(celix_dm_service_dependency_t *dep
* result of component_getImplementation() is used
* This can be used in rare cases when the callbacks are actually interceptors. e.g. in the case of C++ support.
*/
-celix_status_t serviceDependency_setCallbackHandle(celix_dm_service_dependency_t *dependency, void* handle) CELIX_DEPRECATED_ATTR;
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t serviceDependency_setCallbackHandle(celix_dm_service_dependency_t *dependency, void* handle);
/**
* Creates a service dependency info. The service dependency info struct contains information about the service dependency.
* The caller is the owner
*/
-celix_status_t serviceDependency_getServiceDependencyInfo(celix_dm_service_dependency_t* dep, dm_service_dependency_info_t **info) CELIX_DEPRECATED_ATTR;
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t serviceDependency_getServiceDependencyInfo(celix_dm_service_dependency_t* dep, dm_service_dependency_info_t **info);
/**
* Destroy a provided service dependency info struct.
*/
-void dependency_destroyDependencyInfo(dm_service_dependency_info_t *info) CELIX_DEPRECATED_ATTR;
+CELIX_FRAMEWORK_DEPRECATED_EXPORT void dependency_destroyDependencyInfo(dm_service_dependency_info_t *info);
#ifdef __cplusplus
}
diff --git a/libs/framework/include_deprecated/framework.h b/libs/framework/include_deprecated/framework.h
index 6ffa8594..d184eb2f 100644
--- a/libs/framework/include_deprecated/framework.h
+++ b/libs/framework/include_deprecated/framework.h
@@ -21,29 +21,28 @@
#define FRAMEWORK_H_
#include "celix_errno.h"
-#include "framework_exports.h"
#include "bundle.h"
#include "properties.h"
#include "bundle_context.h"
+#include "celix_framework_export.h"
#ifdef __cplusplus
extern "C" {
#endif
-// #TODO: Move to FrameworkFactory according the OSGi Spec
-FRAMEWORK_EXPORT celix_status_t framework_create(celix_framework_t **framework, celix_properties_t *config);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t framework_create(celix_framework_t **framework, celix_properties_t *config);
-FRAMEWORK_EXPORT celix_status_t framework_start(celix_framework_t *framework);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t framework_start(celix_framework_t *framework);
-FRAMEWORK_EXPORT celix_status_t framework_stop(celix_framework_t *framework);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t framework_stop(celix_framework_t *framework);
-FRAMEWORK_EXPORT celix_status_t framework_destroy(celix_framework_t *framework);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t framework_destroy(celix_framework_t *framework);
-FRAMEWORK_EXPORT celix_status_t framework_waitForStop(celix_framework_t *framework);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t framework_waitForStop(celix_framework_t *framework);
-FRAMEWORK_EXPORT celix_status_t framework_getFrameworkBundle(const celix_framework_t *framework, celix_bundle_t **bundle);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t framework_getFrameworkBundle(const celix_framework_t *framework, celix_bundle_t **bundle);
-celix_bundle_context_t* framework_getContext(const celix_framework_t *framework);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_bundle_context_t* framework_getContext(const celix_framework_t *framework);
#ifdef __cplusplus
}
diff --git a/libs/framework/include_deprecated/manifest.h b/libs/framework/include_deprecated/manifest.h
index 4a625798..cdd218cc 100644
--- a/libs/framework/include_deprecated/manifest.h
+++ b/libs/framework/include_deprecated/manifest.h
@@ -29,7 +29,7 @@
#include "properties.h"
#include "celix_errno.h"
-#include "framework_exports.h"
+#include "celix_framework_export.h"
#ifdef __cplusplus
extern "C" {
@@ -42,25 +42,25 @@ struct manifest {
typedef struct manifest *manifest_pt;
-FRAMEWORK_EXPORT celix_status_t manifest_create(manifest_pt *manifest);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t manifest_create(manifest_pt *manifest);
-FRAMEWORK_EXPORT manifest_pt manifest_clone(manifest_pt manifest);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT manifest_pt manifest_clone(manifest_pt manifest);
-FRAMEWORK_EXPORT celix_status_t manifest_createFromFile(const char *filename, manifest_pt *manifest);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t manifest_createFromFile(const char *filename, manifest_pt *manifest);
-FRAMEWORK_EXPORT celix_status_t manifest_destroy(manifest_pt manifest);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t manifest_destroy(manifest_pt manifest);
-FRAMEWORK_EXPORT void manifest_clear(manifest_pt manifest);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT void manifest_clear(manifest_pt manifest);
-FRAMEWORK_EXPORT celix_properties_t *manifest_getMainAttributes(manifest_pt manifest);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_properties_t *manifest_getMainAttributes(manifest_pt manifest);
-FRAMEWORK_EXPORT celix_status_t manifest_getEntries(manifest_pt manifest, hash_map_pt *map);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t manifest_getEntries(manifest_pt manifest, hash_map_pt *map);
-FRAMEWORK_EXPORT celix_status_t manifest_read(manifest_pt manifest, const char *filename);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t manifest_read(manifest_pt manifest, const char *filename);
-FRAMEWORK_EXPORT void manifest_write(manifest_pt manifest, const char *filename);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT void manifest_write(manifest_pt manifest, const char *filename);
-FRAMEWORK_EXPORT const char *manifest_getValue(manifest_pt manifest, const char *name);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT const char *manifest_getValue(manifest_pt manifest, const char *name);
#ifdef __cplusplus
}
diff --git a/libs/framework/include_deprecated/module.h b/libs/framework/include_deprecated/module.h
index 9c5aa97e..762280b3 100644
--- a/libs/framework/include_deprecated/module.h
+++ b/libs/framework/include_deprecated/module.h
@@ -37,63 +37,63 @@ typedef struct module celix_module_t;
#include "version.h"
#include "array_list.h"
#include "bundle.h"
-#include "framework_exports.h"
+#include "celix_framework_export.h"
#ifdef __cplusplus
extern "C" {
#endif
-module_pt module_create(manifest_pt headerMap, const char *moduleId, celix_bundle_t *bundle);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT module_pt module_create(manifest_pt headerMap, const char *moduleId, celix_bundle_t *bundle);
-module_pt module_createFrameworkModule(celix_framework_t* fw, celix_bundle_t *bundle);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT module_pt module_createFrameworkModule(celix_framework_t* fw, celix_bundle_t *bundle);
-void module_destroy(module_pt module);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT void module_destroy(module_pt module);
-FRAMEWORK_EXPORT unsigned int module_hash(void *module);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT unsigned int module_hash(void *module);
-FRAMEWORK_EXPORT int module_equals(void *module, void *compare);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT int module_equals(void *module, void *compare);
-FRAMEWORK_EXPORT wire_pt module_getWire(module_pt module, const char *serviceName);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT wire_pt module_getWire(module_pt module, const char *serviceName);
-FRAMEWORK_EXPORT version_pt module_getVersion(module_pt module);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT version_pt module_getVersion(module_pt module);
-FRAMEWORK_EXPORT celix_status_t module_getSymbolicName(module_pt module, const char **symbolicName);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t module_getSymbolicName(module_pt module, const char **symbolicName);
-FRAMEWORK_EXPORT char *module_getId(module_pt module);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT char *module_getId(module_pt module);
-FRAMEWORK_EXPORT linked_list_pt module_getWires(module_pt module);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT linked_list_pt module_getWires(module_pt module);
-FRAMEWORK_EXPORT void module_setWires(module_pt module, linked_list_pt wires);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT void module_setWires(module_pt module, linked_list_pt wires);
-FRAMEWORK_EXPORT bool module_isResolved(module_pt module);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT bool module_isResolved(module_pt module);
-FRAMEWORK_EXPORT void module_setResolved(module_pt module);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT void module_setResolved(module_pt module);
-FRAMEWORK_EXPORT celix_bundle_t *module_getBundle(module_pt module);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_bundle_t *module_getBundle(module_pt module);
-FRAMEWORK_EXPORT linked_list_pt module_getRequirements(module_pt module);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT linked_list_pt module_getRequirements(module_pt module);
-FRAMEWORK_EXPORT linked_list_pt module_getCapabilities(module_pt module);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT linked_list_pt module_getCapabilities(module_pt module);
-FRAMEWORK_EXPORT celix_array_list_t *module_getDependentImporters(module_pt module);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_array_list_t *module_getDependentImporters(module_pt module);
-FRAMEWORK_EXPORT void module_addDependentImporter(module_pt module, module_pt importer);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT void module_addDependentImporter(module_pt module, module_pt importer);
-FRAMEWORK_EXPORT void module_removeDependentImporter(module_pt module, module_pt importer);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT void module_removeDependentImporter(module_pt module, module_pt importer);
-FRAMEWORK_EXPORT celix_array_list_t *module_getDependentRequirers(module_pt module);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_array_list_t *module_getDependentRequirers(module_pt module);
-FRAMEWORK_EXPORT void module_addDependentRequirer(module_pt module, module_pt requirer);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT void module_addDependentRequirer(module_pt module, module_pt requirer);
-FRAMEWORK_EXPORT void module_removeDependentRequirer(module_pt module, module_pt requirer);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT void module_removeDependentRequirer(module_pt module, module_pt requirer);
-FRAMEWORK_EXPORT celix_array_list_t *module_getDependents(module_pt module);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_array_list_t *module_getDependents(module_pt module);
-FRAMEWORK_EXPORT celix_status_t module_getGroup(module_pt module, const char **group);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t module_getGroup(module_pt module, const char **group);
-FRAMEWORK_EXPORT celix_status_t module_getName(module_pt module, const char **name);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t module_getName(module_pt module, const char **name);
-FRAMEWORK_EXPORT celix_status_t module_getDescription(module_pt module, const char **descriptoin);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t module_getDescription(module_pt module, const char **descriptoin);
#ifdef __cplusplus
}
diff --git a/libs/framework/include_deprecated/requirement.h b/libs/framework/include_deprecated/requirement.h
index 8a3c29f8..18679788 100644
--- a/libs/framework/include_deprecated/requirement.h
+++ b/libs/framework/include_deprecated/requirement.h
@@ -25,19 +25,21 @@ typedef struct requirement *requirement_pt;
#include "capability.h"
#include "hash_map.h"
#include "celix_version_range.h"
+#include "celix_framework_export.h"
+
#ifdef __cplusplus
extern "C" {
#endif
-celix_status_t requirement_create(hash_map_pt directives, hash_map_pt attributes, requirement_pt *requirement);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t requirement_create(hash_map_pt directives, hash_map_pt attributes, requirement_pt *requirement);
-celix_status_t requirement_destroy(requirement_pt requirement);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t requirement_destroy(requirement_pt requirement);
-celix_status_t requirement_getVersionRange(requirement_pt requirement, celix_version_range_t **range);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t requirement_getVersionRange(requirement_pt requirement, celix_version_range_t **range);
-celix_status_t requirement_getTargetName(requirement_pt requirement, const char **targetName);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t requirement_getTargetName(requirement_pt requirement, const char **targetName);
-celix_status_t requirement_isSatisfied(requirement_pt requirement, capability_pt capability, bool *inRange);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t requirement_isSatisfied(requirement_pt requirement, capability_pt capability, bool *inRange);
#ifdef __cplusplus
}
diff --git a/libs/framework/include_deprecated/service_listener.h b/libs/framework/include_deprecated/service_listener.h
index e2ca3adc..c40ee222 100644
--- a/libs/framework/include_deprecated/service_listener.h
+++ b/libs/framework/include_deprecated/service_listener.h
@@ -20,7 +20,6 @@
#ifndef SERVICE_LISTENER_H_
#define SERVICE_LISTENER_H_
-
#include "celix_service_listener.h"
#ifdef __cplusplus
diff --git a/libs/framework/include_deprecated/service_reference.h b/libs/framework/include_deprecated/service_reference.h
index bc115a33..184c686d 100644
--- a/libs/framework/include_deprecated/service_reference.h
+++ b/libs/framework/include_deprecated/service_reference.h
@@ -26,43 +26,43 @@
#include "array_list.h"
#include "service_registration.h"
#include "bundle.h"
-#include "framework_exports.h"
+#include "celix_framework_export.h"
#ifdef __cplusplus
extern "C" {
#endif
-FRAMEWORK_EXPORT celix_status_t serviceReference_getBundle(service_reference_pt reference, celix_bundle_t **bundle);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t serviceReference_getBundle(service_reference_pt reference, celix_bundle_t **bundle);
-FRAMEWORK_EXPORT bool
+CELIX_FRAMEWORK_DEPRECATED_EXPORT bool
serviceReference_isAssignableTo(service_reference_pt reference, celix_bundle_t *requester, const char *serviceName);
-FRAMEWORK_EXPORT celix_status_t
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t
serviceReference_getProperty(service_reference_pt reference, const char *key, const char **value);
-FRAMEWORK_EXPORT celix_status_t
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t
serviceReference_getPropertyWithDefault(service_reference_pt reference, const char *key, const char* def, const char **value);
-FRAMEWORK_EXPORT celix_status_t
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t
serviceReference_getPropertyKeys(service_reference_pt reference, char **keys[], unsigned int *size);
-FRAMEWORK_EXPORT celix_status_t
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t
serviceReference_getServiceRegistration(service_reference_pt reference, service_registration_pt *registration);
-FRAMEWORK_EXPORT
+CELIX_FRAMEWORK_DEPRECATED_EXPORT
long serviceReference_getServiceId(service_reference_pt reference);
-FRAMEWORK_EXPORT celix_status_t
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t
serviceReference_equals(service_reference_pt reference, service_reference_pt compareTo, bool *equal);
-FRAMEWORK_EXPORT unsigned int serviceReference_hashCode(const void *referenceP);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT unsigned int serviceReference_hashCode(const void *referenceP);
-FRAMEWORK_EXPORT int serviceReference_equals2(const void *reference1, const void *reference2);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT int serviceReference_equals2(const void *reference1, const void *reference2);
-FRAMEWORK_EXPORT celix_status_t
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t
serviceReference_compareTo(service_reference_pt reference, service_reference_pt compareTo, int *compare);
-FRAMEWORK_EXPORT celix_status_t serviceReference_getUsingBundles(service_reference_pt ref, celix_array_list_t **out);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t serviceReference_getUsingBundles(service_reference_pt ref, celix_array_list_t **out);
#ifdef __cplusplus
}
diff --git a/libs/framework/include_deprecated/service_registration.h b/libs/framework/include_deprecated/service_registration.h
index 8cdc6eee..7bef89bd 100644
--- a/libs/framework/include_deprecated/service_registration.h
+++ b/libs/framework/include_deprecated/service_registration.h
@@ -22,30 +22,27 @@
#include <stdbool.h>
-typedef struct serviceRegistration service_registration_t;
-typedef struct serviceRegistration *service_registration_pt; // TODO: Deprecate
-
-
+#include "celix_types.h"
#include "array_list.h"
#include "bundle.h"
-#include "framework_exports.h"
+#include "celix_framework_export.h"
#ifdef __cplusplus
extern "C" {
#endif
-FRAMEWORK_EXPORT celix_status_t serviceRegistration_unregister(service_registration_t *registration);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t serviceRegistration_unregister(service_registration_t *registration);
-FRAMEWORK_EXPORT celix_status_t
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t
serviceRegistration_getProperties(service_registration_t *registration, celix_properties_t **properties);
-FRAMEWORK_EXPORT celix_status_t
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t
serviceRegistration_getServiceName(service_registration_t *registration, const char **serviceName);
-FRAMEWORK_EXPORT long
+CELIX_FRAMEWORK_DEPRECATED_EXPORT long
serviceRegistration_getServiceId(service_registration_t *registration);
-FRAMEWORK_EXPORT bool
+CELIX_FRAMEWORK_DEPRECATED_EXPORT bool
serviceRegistration_isFactoryService(service_registration_t *registration);
diff --git a/libs/framework/include_deprecated/service_registry.h b/libs/framework/include_deprecated/service_registry.h
index d2fe3227..2b9cf794 100644
--- a/libs/framework/include_deprecated/service_registry.h
+++ b/libs/framework/include_deprecated/service_registry.h
@@ -17,13 +17,9 @@
* under the License.
*/
-
#ifndef SERVICE_REGISTRY_H_
#define SERVICE_REGISTRY_H_
-typedef struct celix_serviceRegistry * service_registry_pt;
-typedef struct celix_serviceRegistry celix_service_registry_t;
-
#include "properties.h"
#include "filter.h"
#include "service_factory.h"
@@ -31,54 +27,59 @@ typedef struct celix_serviceRegistry celix_service_registry_t;
#include "array_list.h"
#include "service_registration.h"
#include "celix_service_factory.h"
+#include "celix_framework_export.h"
+
#ifdef __cplusplus
extern "C" {
#endif
+typedef struct celix_serviceRegistry * service_registry_pt;
+typedef struct celix_serviceRegistry celix_service_registry_t;
+
typedef void (*serviceChanged_function_pt)(celix_framework_t*, celix_service_event_type_t, service_registration_pt, celix_properties_t*);
-celix_service_registry_t* celix_serviceRegistry_create(celix_framework_t *framework);
+CELIX_FRAMEWORK_EXPORT celix_service_registry_t* celix_serviceRegistry_create(celix_framework_t *framework);
-void celix_serviceRegistry_destroy(celix_service_registry_t* registry);
+CELIX_FRAMEWORK_EXPORT void celix_serviceRegistry_destroy(celix_service_registry_t* registry);
-celix_status_t
+CELIX_FRAMEWORK_EXPORT celix_status_t
serviceRegistry_getRegisteredServices(celix_service_registry_t* registry, celix_bundle_t *bundle, celix_array_list_t **services);
-celix_status_t
+CELIX_FRAMEWORK_EXPORT celix_status_t
serviceRegistry_getServicesInUse(celix_service_registry_t* registry, celix_bundle_t *bundle, celix_array_list_t **services);
-celix_status_t serviceRegistry_registerService(celix_service_registry_t* registry, celix_bundle_t *bundle, const char *serviceName,
+CELIX_FRAMEWORK_EXPORT celix_status_t serviceRegistry_registerService(celix_service_registry_t* registry, celix_bundle_t *bundle, const char *serviceName,
const void *serviceObject, celix_properties_t *dictionary,
service_registration_pt *registration);
-celix_status_t
+CELIX_FRAMEWORK_EXPORT celix_status_t
serviceRegistry_registerServiceFactory(celix_service_registry_t* registry, celix_bundle_t *bundle, const char *serviceName,
service_factory_pt factory, celix_properties_t *dictionary,
service_registration_pt *registration);
-celix_status_t serviceRegistry_getServiceReference(celix_service_registry_t* registry, celix_bundle_t *bundle,
+CELIX_FRAMEWORK_EXPORT celix_status_t serviceRegistry_getServiceReference(celix_service_registry_t* registry, celix_bundle_t *bundle,
service_registration_pt registration,
service_reference_pt *reference);
-celix_status_t
+CELIX_FRAMEWORK_EXPORT celix_status_t
serviceRegistry_getServiceReferences(celix_service_registry_t* registry, celix_bundle_t *bundle, const char *serviceName,
filter_pt filter, celix_array_list_t **references);
-celix_status_t serviceRegistry_clearReferencesFor(celix_service_registry_t* registry, celix_bundle_t *bundle);
+CELIX_FRAMEWORK_EXPORT celix_status_t serviceRegistry_clearReferencesFor(celix_service_registry_t* registry, celix_bundle_t *bundle);
-size_t serviceRegistry_nrOfHooks(celix_service_registry_t* registry);
+CELIX_FRAMEWORK_EXPORT size_t serviceRegistry_nrOfHooks(celix_service_registry_t* registry);
/**
* Register a service listener. Will also retroactively call the listener with register events for already registered services.
*/
-celix_status_t celix_serviceRegistry_addServiceListener(celix_service_registry_t *reg, celix_bundle_t *bundle, const char *filter, celix_service_listener_t *listener);
+CELIX_FRAMEWORK_EXPORT celix_status_t celix_serviceRegistry_addServiceListener(celix_service_registry_t *reg, celix_bundle_t *bundle, const char *filter, celix_service_listener_t *listener);
-celix_status_t celix_serviceRegistry_removeServiceListener(celix_service_registry_t *reg, celix_service_listener_t *listener);
+CELIX_FRAMEWORK_EXPORT celix_status_t celix_serviceRegistry_removeServiceListener(celix_service_registry_t *reg, celix_service_listener_t *listener);
-bool celix_serviceRegistry_isServiceRegistered(celix_service_registry_t* reg, long serviceId);
+CELIX_FRAMEWORK_EXPORT bool celix_serviceRegistry_isServiceRegistered(celix_service_registry_t* reg, long serviceId);
-celix_status_t
+CELIX_FRAMEWORK_EXPORT celix_status_t
celix_serviceRegistry_registerService(
celix_service_registry_t *reg,
const celix_bundle_t *bnd,
@@ -88,7 +89,7 @@ celix_serviceRegistry_registerService(
long reserveId,
service_registration_t **registration);
-celix_status_t
+CELIX_FRAMEWORK_EXPORT celix_status_t
celix_serviceRegistry_registerServiceFactory(
celix_service_registry_t *reg,
const celix_bundle_t *bnd,
@@ -102,7 +103,7 @@ celix_serviceRegistry_registerServiceFactory(
* List the registered service for the provided bundle.
* @return A list of service ids. Caller is owner of the array list.
*/
-celix_array_list_t* celix_serviceRegistry_listServiceIdsForOwner(celix_service_registry_t* registry, long bndId);
+CELIX_FRAMEWORK_EXPORT celix_array_list_t* celix_serviceRegistry_listServiceIdsForOwner(celix_service_registry_t* registry, long bndId);
/**
* Get service information for the provided svc id and bnd id.
@@ -112,7 +113,7 @@ celix_array_list_t* celix_serviceRegistry_listServiceIdsForOwner(celix_service_r
*
* Returns true if the bundle is found.
*/
-bool celix_serviceRegistry_getServiceInfo(
+CELIX_FRAMEWORK_EXPORT bool celix_serviceRegistry_getServiceInfo(
celix_service_registry_t* registry,
long svcId,
long bndId,
@@ -124,14 +125,14 @@ bool celix_serviceRegistry_getServiceInfo(
/**
* Returns the next svc id.
*/
-long celix_serviceRegistry_nextSvcId(celix_service_registry_t* registry);
+CELIX_FRAMEWORK_EXPORT long celix_serviceRegistry_nextSvcId(celix_service_registry_t* registry);
/**
* Unregister service for the provided service id (owned by bnd).
* Will print an error if the service id is invalid
*/
-void celix_serviceRegistry_unregisterService(celix_service_registry_t* registry, celix_bundle_t* bnd, long serviceId);
+CELIX_FRAMEWORK_EXPORT void celix_serviceRegistry_unregisterService(celix_service_registry_t* registry, celix_bundle_t* bnd, long serviceId);
/**
@@ -143,7 +144,7 @@ void celix_serviceRegistry_unregisterService(celix_service_registry_t* registry,
* @param ignoreServiceLanguage The whether the service lang filter needs to be added to the filter.
* @return a LDAP filter. Caller is responsible for freeing the filter.
*/
-char* celix_serviceRegistry_createFilterFor(
+CELIX_FRAMEWORK_EXPORT char* celix_serviceRegistry_createFilterFor(
celix_service_registry_t* registry,
const char* serviceName,
const char* versionRange,
@@ -153,7 +154,7 @@ char* celix_serviceRegistry_createFilterFor(
* Find services and return a array list of service ids (long).
* Caller is responsible for freeing the returned array list.
*/
-celix_array_list_t* celix_serviceRegisrty_findServices(celix_service_registry_t* registry, const char* filter);
+CELIX_FRAMEWORK_EXPORT celix_array_list_t* celix_serviceRegisrty_findServices(celix_service_registry_t* registry, const char* filter);
#ifdef __cplusplus
diff --git a/libs/framework/include_deprecated/service_tracker.h b/libs/framework/include_deprecated/service_tracker.h
index fa1ab678..a92b290d 100644
--- a/libs/framework/include_deprecated/service_tracker.h
+++ b/libs/framework/include_deprecated/service_tracker.h
@@ -23,10 +23,9 @@
#include "celix_service_listener.h"
#include "array_list.h"
#include "service_tracker_customizer.h"
-#include "framework_exports.h"
#include "bundle_context.h"
#include "celix_bundle_context.h"
-
+#include "celix_framework_export.h"
#ifdef __cplusplus
extern "C" {
@@ -37,31 +36,31 @@ typedef struct celix_serviceTracker celix_service_tracker_t;
typedef struct celix_serviceTracker *service_tracker_pt;
typedef struct celix_serviceTracker service_tracker_t;
-FRAMEWORK_EXPORT celix_status_t
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t
serviceTracker_create(celix_bundle_context_t *ctx, const char *service, service_tracker_customizer_pt customizer,
service_tracker_t **tracker);
-FRAMEWORK_EXPORT celix_status_t
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t
serviceTracker_createWithFilter(celix_bundle_context_t *ctx, const char *filter, service_tracker_customizer_pt customizer,
service_tracker_t **tracker);
-FRAMEWORK_EXPORT celix_status_t serviceTracker_open(service_tracker_t *tracker);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t serviceTracker_open(service_tracker_t *tracker);
-FRAMEWORK_EXPORT celix_status_t serviceTracker_close(service_tracker_t *tracker);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t serviceTracker_close(service_tracker_t *tracker);
-FRAMEWORK_EXPORT celix_status_t serviceTracker_destroy(service_tracker_t *tracker);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t serviceTracker_destroy(service_tracker_t *tracker);
-FRAMEWORK_EXPORT service_reference_pt serviceTracker_getServiceReference(service_tracker_t *tracker);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT service_reference_pt serviceTracker_getServiceReference(service_tracker_t *tracker);
-FRAMEWORK_EXPORT celix_array_list_t *serviceTracker_getServiceReferences(service_tracker_t *tracker);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_array_list_t *serviceTracker_getServiceReferences(service_tracker_t *tracker);
-FRAMEWORK_EXPORT void *serviceTracker_getService(service_tracker_t *tracker);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT void *serviceTracker_getService(service_tracker_t *tracker);
-FRAMEWORK_EXPORT celix_array_list_t *serviceTracker_getServices(service_tracker_t *tracker);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_array_list_t *serviceTracker_getServices(service_tracker_t *tracker);
-FRAMEWORK_EXPORT void *serviceTracker_getServiceByReference(service_tracker_t *tracker, service_reference_pt reference);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT void *serviceTracker_getServiceByReference(service_tracker_t *tracker, service_reference_pt reference);
-FRAMEWORK_EXPORT size_t serviceTracker_nrOfTrackedServices(service_tracker_t *tracker);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT size_t serviceTracker_nrOfTrackedServices(service_tracker_t *tracker);
@@ -76,7 +75,7 @@ FRAMEWORK_EXPORT size_t serviceTracker_nrOfTrackedServices(service_tracker_t *tr
* Creates and starts (open) a service tracker.
* Note that is different from the serviceTracker_create function, because is also starts the service tracker
*/
-celix_service_tracker_t* celix_serviceTracker_create(
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_service_tracker_t* celix_serviceTracker_create(
celix_bundle_context_t *ctx,
const char *serviceName,
const char *versionRange,
@@ -88,7 +87,7 @@ celix_service_tracker_t* celix_serviceTracker_create(
* Creates and starts (open) a service tracker.
* Note that is different from the serviceTracker_create function, because is also starts the service tracker
*/
-celix_service_tracker_t* celix_serviceTracker_createWithOptions(
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_service_tracker_t* celix_serviceTracker_createWithOptions(
celix_bundle_context_t *ctx,
const celix_service_tracking_options_t *opts
);
@@ -98,7 +97,7 @@ celix_service_tracker_t* celix_serviceTracker_createWithOptions(
* Stops (close) and destroys a service tracker.
* Note that is different from the serviceTracker_destroy function, because is also stops the service tracker
*/
-void celix_serviceTracker_destroy(celix_service_tracker_t *tracker);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT void celix_serviceTracker_destroy(celix_service_tracker_t *tracker);
/**
* Use the highest ranking service of the service tracker.
@@ -110,7 +109,7 @@ void celix_serviceTracker_destroy(celix_service_tracker_t *tracker);
*
* @return bool if the service if found and use has been called.
*/
-bool celix_serviceTracker_useHighestRankingService(
+CELIX_FRAMEWORK_DEPRECATED_EXPORT bool celix_serviceTracker_useHighestRankingService(
celix_service_tracker_t *tracker,
const char *serviceName /*sanity*/,
double waitTimeoutInSeconds /*0 -> do not wait */,
@@ -124,7 +123,7 @@ bool celix_serviceTracker_useHighestRankingService(
* Calls the use callback for every services found by this tracker.
* Returns the number of called services
*/
-size_t celix_serviceTracker_useServices(
+CELIX_FRAMEWORK_DEPRECATED_EXPORT size_t celix_serviceTracker_useServices(
service_tracker_t *tracker,
const char* serviceName /*sanity*/,
void *callbackHandle,
diff --git a/libs/framework/include_deprecated/service_tracker_customizer.h b/libs/framework/include_deprecated/service_tracker_customizer.h
index d3cdd76b..b68bdbad 100644
--- a/libs/framework/include_deprecated/service_tracker_customizer.h
+++ b/libs/framework/include_deprecated/service_tracker_customizer.h
@@ -29,6 +29,7 @@
#include <celix_errno.h>
#include <service_reference.h>
+#include "celix_framework_export.h"
#ifdef __cplusplus
extern "C" {
@@ -53,28 +54,28 @@ struct serviceTrackerCustomizer {
celix_status_t (*removedService)(void * handle, service_reference_pt reference, void * service);
};
-FRAMEWORK_EXPORT celix_status_t serviceTrackerCustomizer_create(void *handle,
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t serviceTrackerCustomizer_create(void *handle,
adding_callback_pt addingFunction,
added_callback_pt addedFunction,
modified_callback_pt modifiedFunction,
removed_callback_pt removedFunction,
service_tracker_customizer_pt *customizer);
-FRAMEWORK_EXPORT celix_status_t serviceTrackerCustomizer_destroy(service_tracker_customizer_pt customizer);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t serviceTrackerCustomizer_destroy(service_tracker_customizer_pt customizer);
-FRAMEWORK_EXPORT celix_status_t
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t
serviceTrackerCustomizer_getHandle(service_tracker_customizer_pt customizer, void **handle);
-FRAMEWORK_EXPORT celix_status_t
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t
serviceTrackerCustomizer_getAddingFunction(service_tracker_customizer_pt customizer, adding_callback_pt *function);
-FRAMEWORK_EXPORT celix_status_t
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t
serviceTrackerCustomizer_getAddedFunction(service_tracker_customizer_pt customizer, added_callback_pt *function);
-FRAMEWORK_EXPORT celix_status_t
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t
serviceTrackerCustomizer_getModifiedFunction(service_tracker_customizer_pt customizer, modified_callback_pt *function);
-FRAMEWORK_EXPORT celix_status_t
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t
serviceTrackerCustomizer_getRemovedFunction(service_tracker_customizer_pt customizer, removed_callback_pt *function);
#ifdef __cplusplus
diff --git a/libs/framework/include_deprecated/wire.h b/libs/framework/include_deprecated/wire.h
index 6f78d792..29c41d9e 100644
--- a/libs/framework/include_deprecated/wire.h
+++ b/libs/framework/include_deprecated/wire.h
@@ -34,6 +34,7 @@ typedef struct wire *wire_pt;
#include "module.h"
#include "linked_list.h"
#include "module.h"
+#include "celix_framework_export.h"
#ifdef __cplusplus
extern "C" {
@@ -57,7 +58,7 @@ extern "C" {
* - CELIX_SUCCESS when no errors are encountered.
* - CELIX_ENOMEM If allocating memory for <code>wire</code> failed.
*/
-celix_status_t wire_create(module_pt importer, requirement_pt requirement,
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t wire_create(module_pt importer, requirement_pt requirement,
module_pt exporter, capability_pt capability, wire_pt *wire);
/**
@@ -68,7 +69,7 @@ celix_status_t wire_create(module_pt importer, requirement_pt requirement,
* @return Status code indication failure or success:
* - CELIX_SUCCESS when no errors are encountered.
*/
-celix_status_t wire_destroy(wire_pt wire);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t wire_destroy(wire_pt wire);
/**
* Getter for the capability of the exporting module.
@@ -78,7 +79,7 @@ celix_status_t wire_destroy(wire_pt wire);
* @return Status code indication failure or success:
* - CELIX_SUCCESS when no errors are encountered.
*/
-celix_status_t wire_getCapability(wire_pt wire, capability_pt *capability);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t wire_getCapability(wire_pt wire, capability_pt *capability);
/**
* Getter for the requirement of the importing module.
@@ -88,7 +89,7 @@ celix_status_t wire_getCapability(wire_pt wire, capability_pt *capability);
* @return Status code indication failure or success:
* - CELIX_SUCCESS when no errors are encountered.
*/
-celix_status_t wire_getRequirement(wire_pt wire, requirement_pt *requirement);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t wire_getRequirement(wire_pt wire, requirement_pt *requirement);
/**
* Getter for the importer of the wire.
@@ -98,7 +99,7 @@ celix_status_t wire_getRequirement(wire_pt wire, requirement_pt *requirement);
* @return Status code indication failure or success:
* - CELIX_SUCCESS when no errors are encountered.
*/
-celix_status_t wire_getImporter(wire_pt wire, module_pt *importer);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t wire_getImporter(wire_pt wire, module_pt *importer);
/**
* Getter for the exporter of the wire.
@@ -108,7 +109,7 @@ celix_status_t wire_getImporter(wire_pt wire, module_pt *importer);
* @return Status code indication failure or success:
* - CELIX_SUCCESS when no errors are encountered.
*/
-celix_status_t wire_getExporter(wire_pt wire, module_pt *exporter);
+CELIX_FRAMEWORK_DEPRECATED_EXPORT celix_status_t wire_getExporter(wire_pt wire, module_pt *exporter);
/**
* @}
diff --git a/libs/framework/src/bundle_context.c b/libs/framework/src/bundle_context.c
index e41ddcc6..324676a9 100644
--- a/libs/framework/src/bundle_context.c
+++ b/libs/framework/src/bundle_context.c
@@ -207,7 +207,7 @@ static bool bundleContext_IsServiceReferenceValid(bundle_context_pt context, ser
return context->bundle == refBundle;
}
-FRAMEWORK_EXPORT celix_status_t bundleContext_retainServiceReference(bundle_context_pt context, service_reference_pt ref) {
+celix_status_t bundleContext_retainServiceReference(bundle_context_pt context, service_reference_pt ref) {
if (context == NULL || ref == NULL || !bundleContext_IsServiceReferenceValid(context, ref)) {
return CELIX_ILLEGAL_ARGUMENT;
}
diff --git a/libs/framework/src/bundle_private.h b/libs/framework/src/bundle_private.h
index 41b7107c..b17df02a 100644
--- a/libs/framework/src/bundle_private.h
+++ b/libs/framework/src/bundle_private.h
@@ -22,6 +22,7 @@
#include "bundle.h"
#include "celix_bundle.h"
+#include "celix_framework_export.h"
#ifdef __cplusplus
extern "C" {
@@ -53,11 +54,14 @@ celix_status_t
celix_bundle_createFromArchive(celix_framework_t *framework, bundle_archive_pt archive, celix_bundle_t **bundleOut);
/**
- * Get the bundle archive.
+ * @brief Get the bundle archive.
+ *
+ * @note Symbol export is needed for unit tests.
+ *
* @param[in] bundle The bundle.
* @return The bundle archive.
*/
-bundle_archive_t *celix_bundle_getArchive(const celix_bundle_t *bundle);
+CELIX_FRAMEWORK_EXPORT bundle_archive_t *celix_bundle_getArchive(const celix_bundle_t *bundle);
/**
* Destroys the bundle.
diff --git a/libs/framework/src/celix_framework_utils_private.h b/libs/framework/src/celix_framework_utils_private.h
index fbd6c3fa..5b123952 100644
--- a/libs/framework/src/celix_framework_utils_private.h
+++ b/libs/framework/src/celix_framework_utils_private.h
@@ -20,10 +20,10 @@
#ifndef CELIX_FRAMEWORK_UTILS_PRIVATE_H_
#define CELIX_FRAMEWORK_UTILS_PRIVATE_H_
+#include <time.h>
#include "celix_framework_utils.h"
-
-#include <time.h>
+#include "celix_framework_export.h"
#ifdef __cplusplus
extern "C" {
@@ -31,6 +31,9 @@ extern "C" {
/**
* @brief Checks whether the provided bundle url is newer than the provided time.
+ *
+ * @note Symbol export is required for unit testing.
+ *
* @param fw Celix framework (used for logging).
* @param bundleURL The bundle url. Which must be the following:
* - prefixed with file:// -> url is a file path.
@@ -41,10 +44,13 @@ extern "C" {
* @return Whether the bundle url is newer than the provided time. Will also be true if time is NULL or if the bundleUrl
* is an embedded:// url.
*/
-bool celix_framework_utils_isBundleUrlNewerThan(celix_framework_t* fw, const char* bundleURL, const struct timespec* time);
+CELIX_FRAMEWORK_EXPORT bool celix_framework_utils_isBundleUrlNewerThan(celix_framework_t* fw, const char* bundleURL, const struct timespec* time);
/**
* @brief extracts a bundle for the given cache.
+ *
+ * @note Symbol export is required for unit testing.
+ *
* @param fw Optional Celix framework (used for logging).
* If NULL the result of celix_frameworkLogger_globalLogger() will be used for logging.
* @param extractPath The path to extract the bundle to.
@@ -55,7 +61,7 @@ bool celix_framework_utils_isBundleUrlNewerThan(celix_framework_t* fw, const cha
* - no :// -> assuming that the url is a file path (same as with a file:// prefix)
* @return CELIX_SUCCESS is the bundle was correctly extracted.
*/
-celix_status_t celix_framework_utils_extractBundle(celix_framework_t *fw, const char *bundleURL, const char* extractPath);
+CELIX_FRAMEWORK_EXPORT celix_status_t celix_framework_utils_extractBundle(celix_framework_t *fw, const char *bundleURL, const char* extractPath);
/**
* @brief Checks whether the provided bundle url is valid.
@@ -67,13 +73,15 @@ celix_status_t celix_framework_utils_extractBundle(celix_framework_t *fw, const
*
* If a bundle url is invalid, this function will print - on error level - why the url is invalid.
*
+ * @note Symbol export is required for unit testing.
+ *
* @param fw Optional Celix framework (used for logging).
* If NULL the result of celix_frameworkLogger_globalLogger() will be used for logging.
* @param bundleURL A bundle url to check.
* @param silent If true, this function will not write error logs when the bundle url is not valid.
* @return Whether the bundle url is valid.
*/
-bool celix_framework_utils_isBundleUrlValid(celix_framework_t *fw, const char *bundleURL, bool silent);
+CELIX_FRAMEWORK_EXPORT bool celix_framework_utils_isBundleUrlValid(celix_framework_t *fw, const char *bundleURL, bool silent);
#ifdef __cplusplus
}
diff --git a/libs/framework/src/framework_private.h b/libs/framework/src/framework_private.h
index 3f7d21a5..47b22c8b 100644
--- a/libs/framework/src/framework_private.h
+++ b/libs/framework/src/framework_private.h
@@ -250,29 +250,29 @@ double celix_framework_getConfigPropertyAsDouble(celix_framework_t* framework, c
bool celix_framework_getConfigPropertyAsBool(celix_framework_t* framework, const char* name, bool defaultValue, bool* found);
-FRAMEWORK_EXPORT celix_status_t celix_framework_installBundleInternal(celix_framework_t *framework, const char *bndLoc, celix_bundle_t **bundleOut);
+celix_status_t celix_framework_installBundleInternal(celix_framework_t *framework, const char *bndLoc, celix_bundle_t **bundleOut);
-FRAMEWORK_EXPORT celix_status_t fw_registerService(framework_pt framework, service_registration_pt * registration, long bundleId, const char* serviceName, const void* svcObj, properties_pt properties);
-FRAMEWORK_EXPORT celix_status_t fw_registerServiceFactory(framework_pt framework, service_registration_pt * registration, long bundleId, const char* serviceName, service_factory_pt factory, properties_pt properties);
+celix_status_t fw_registerService(framework_pt framework, service_registration_pt * registration, long bundleId, const char* serviceName, const void* svcObj, properties_pt properties);
+celix_status_t fw_registerServiceFactory(framework_pt framework, service_registration_pt * registration, long bundleId, const char* serviceName, service_factory_pt factory, properties_pt properties);
-FRAMEWORK_EXPORT celix_status_t fw_getServiceReferences(framework_pt framework, array_list_pt *references, bundle_pt bundle, const char* serviceName, const char* filter);
-FRAMEWORK_EXPORT celix_status_t fw_getBundleRegisteredServices(framework_pt framework, bundle_pt bundle, array_list_pt *services);
-FRAMEWORK_EXPORT celix_status_t fw_getBundleServicesInUse(framework_pt framework, bundle_pt bundle, array_list_pt *services);
+celix_status_t fw_getServiceReferences(framework_pt framework, array_list_pt *references, bundle_pt bundle, const char* serviceName, const char* filter);
+celix_status_t fw_getBundleRegisteredServices(framework_pt framework, bundle_pt bundle, array_list_pt *services);
+celix_status_t fw_getBundleServicesInUse(framework_pt framework, bundle_pt bundle, array_list_pt *services);
-FRAMEWORK_EXPORT void fw_addServiceListener(framework_pt framework, bundle_pt bundle, celix_service_listener_t *listener, const char* filter);
-FRAMEWORK_EXPORT void fw_removeServiceListener(framework_pt framework, bundle_pt bundle, celix_service_listener_t *listener);
+void fw_addServiceListener(framework_pt framework, bundle_pt bundle, celix_service_listener_t *listener, const char* filter);
+void fw_removeServiceListener(framework_pt framework, bundle_pt bundle, celix_service_listener_t *listener);
-FRAMEWORK_EXPORT celix_status_t fw_addBundleListener(framework_pt framework, bundle_pt bundle, bundle_listener_pt listener);
-FRAMEWORK_EXPORT celix_status_t fw_removeBundleListener(framework_pt framework, bundle_pt bundle, bundle_listener_pt listener);
+celix_status_t fw_addBundleListener(framework_pt framework, bundle_pt bundle, bundle_listener_pt listener);
+celix_status_t fw_removeBundleListener(framework_pt framework, bundle_pt bundle, bundle_listener_pt listener);
-FRAMEWORK_EXPORT celix_status_t fw_addFrameworkListener(framework_pt framework, bundle_pt bundle, framework_listener_pt listener);
-FRAMEWORK_EXPORT celix_status_t fw_removeFrameworkListener(framework_pt framework, bundle_pt bundle, framework_listener_pt listener);
+celix_status_t fw_addFrameworkListener(framework_pt framework, bundle_pt bundle, framework_listener_pt listener);
+celix_status_t fw_removeFrameworkListener(framework_pt framework, bundle_pt bundle, framework_listener_pt listener);
-FRAMEWORK_EXPORT celix_status_t framework_markResolvedModules(framework_pt framework, linked_list_pt wires);
+celix_status_t framework_markResolvedModules(framework_pt framework, linked_list_pt wires);
-FRAMEWORK_EXPORT array_list_pt framework_getBundles(framework_pt framework) __attribute__((deprecated("not thread safe, use celix_framework_useBundles instead")));
-FRAMEWORK_EXPORT bundle_pt framework_getBundle(framework_pt framework, const char* location);
-FRAMEWORK_EXPORT bundle_pt framework_getBundleById(framework_pt framework, long id);
+array_list_pt framework_getBundles(framework_pt framework) __attribute__((deprecated("not thread safe, use celix_framework_useBundles instead")));
+bundle_pt framework_getBundle(framework_pt framework, const char* location);
+bundle_pt framework_getBundleById(framework_pt framework, long id);
diff --git a/libs/framework/src/service_reference.c b/libs/framework/src/service_reference.c
index fbb02081..6c5d1d36 100644
--- a/libs/framework/src/service_reference.c
+++ b/libs/framework/src/service_reference.c
@@ -180,7 +180,7 @@ long serviceReference_getServiceId(service_reference_pt ref) {
-FRAMEWORK_EXPORT celix_status_t
+celix_status_t
serviceReference_getPropertyWithDefault(service_reference_pt ref, const char *key, const char* def, const char **value) {
celix_status_t status = CELIX_SUCCESS;
properties_pt props = NULL;
@@ -195,7 +195,7 @@ celix_status_t serviceReference_getProperty(service_reference_pt ref, const char
return serviceReference_getPropertyWithDefault(ref, key, NULL, value);
}
-FRAMEWORK_EXPORT celix_status_t serviceReference_getPropertyKeys(service_reference_pt ref, char **keys[], unsigned int *size) {
+celix_status_t serviceReference_getPropertyKeys(service_reference_pt ref, char **keys[], unsigned int *size) {
celix_status_t status = CELIX_SUCCESS;
properties_pt props = NULL;
diff --git a/libs/utils/include/celix_convert_utils.h b/libs/utils/include/celix_convert_utils.h
index 96e8db70..27f478f4 100644
--- a/libs/utils/include/celix_convert_utils.h
+++ b/libs/utils/include/celix_convert_utils.h
@@ -22,6 +22,7 @@
#include <stdbool.h>
#include "celix_version.h"
+#include "celix_utils_export.h"
#ifdef __cplusplus
extern "C" {
@@ -40,7 +41,7 @@ extern "C" {
* @param[out] converted If not NULL, will be set to true if the string is a valid boolean, otherwise false.
* @return The boolean value.
*/
-bool celix_utils_convertStringToBool(const char* val, bool defaultValue, bool* converted);
+CELIX_UTILS_EXPORT bool celix_utils_convertStringToBool(const char* val, bool defaultValue, bool* converted);
/**
* @brief Convert a string to a double.
@@ -50,7 +51,7 @@ bool celix_utils_convertStringToBool(const char* val, bool defaultValue, bool* c
* @param[out] converted If not NULL, will be set to true if the string is a valid double, otherwise false.
* @return The double value.
*/
-double celix_utils_convertStringToDouble(const char* val, double defaultValue, bool* converted);
+CELIX_UTILS_EXPORT double celix_utils_convertStringToDouble(const char* val, double defaultValue, bool* converted);
/**
* @brief Convert a string to a long.
@@ -60,7 +61,7 @@ double celix_utils_convertStringToDouble(const char* val, double defaultValue, b
* @param[out] converted If not NULL, will be set to true if the string is a valid long, otherwise false.
* @return The long value.
*/
-long celix_utils_convertStringToLong(const char* val, long defaultValue, bool* converted);
+CELIX_UTILS_EXPORT long celix_utils_convertStringToLong(const char* val, long defaultValue, bool* converted);
/**
* @brief Convert a string to a celix_version_t.
@@ -73,7 +74,7 @@ long celix_utils_convertStringToLong(const char* val, long defaultValue, bool* c
* @param[out] converted If not NULL, will be set to true if the string is a valid celix_version_t, otherwise false.
* @return A new celix_version_t* if the string is a valid version, otherwise NULL.
*/
-celix_version_t* celix_utils_convertStringToVersion(const char* val, const celix_version_t* defaultValue, bool* converted);
+CELIX_UTILS_EXPORT celix_version_t* celix_utils_convertStringToVersion(const char* val, const celix_version_t* defaultValue, bool* converted);
#ifdef __cplusplus
}
diff --git a/libs/utils/include/celix_errno.h b/libs/utils/include/celix_errno.h
index 1fd0d6bf..8a3dbf02 100644
--- a/libs/utils/include/celix_errno.h
+++ b/libs/utils/include/celix_errno.h
@@ -40,6 +40,8 @@
#include <stddef.h>
#include <errno.h>
+#include "celix_utils_export.h"
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -69,7 +71,7 @@ typedef int celix_status_t;
/**
* Return a readable string for the given status code.
*/
-const char* celix_strerror(celix_status_t status);
+CELIX_UTILS_EXPORT const char* celix_strerror(celix_status_t status);
/*!
* Customer error code mask
diff --git a/libs/utils/include/celix_file_utils.h b/libs/utils/include/celix_file_utils.h
index 4f4dc84e..f71cdab0 100644
--- a/libs/utils/include/celix_file_utils.h
+++ b/libs/utils/include/celix_file_utils.h
@@ -22,7 +22,9 @@
#include <stdbool.h>
#include <sys/time.h>
+
#include "celix_errno.h"
+#include "celix_utils_export.h"
#ifdef __cplusplus
extern "C" {
@@ -31,12 +33,12 @@ extern "C" {
/**
* @brief Returns whether a file at path exists.
*/
-bool celix_utils_fileExists(const char* path);
+CELIX_UTILS_EXPORT bool celix_utils_fileExists(const char* path);
/**
* @brief Returns whether a file at path exists and is a directory.
*/
-bool celix_utils_directoryExists(const char* path);
+CELIX_UTILS_EXPORT bool celix_utils_directoryExists(const char* path);
/**
* @brief Create dir and if needed subdirs.
@@ -45,7 +47,7 @@ bool celix_utils_directoryExists(const char* path);
* @param errorOut An optional error output argument. If an error occurs this will point to a (static) error message.
* @return CELIX_SUCCESS if the directory was successfully created.
*/
-celix_status_t celix_utils_createDirectory(const char* path, bool failIfPresent, const char** errorOut);
+CELIX_UTILS_EXPORT celix_status_t celix_utils_createDirectory(const char* path, bool failIfPresent, const char** errorOut);
/**
* @brief Recursively delete the directory at path.
@@ -54,7 +56,7 @@ celix_status_t celix_utils_createDirectory(const char* path, bool failIfPresent,
* @param errorOut An optional error output argument. If an error occurs this will point to a (static) error message.
* @return CELIX_SUCCESS if the directory was found and successfully deleted.
*/
-celix_status_t celix_utils_deleteDirectory(const char* path, const char** errorOut);
+CELIX_UTILS_EXPORT celix_status_t celix_utils_deleteDirectory(const char* path, const char** errorOut);
/**
* @brief Extract the zip file to the target dir.
@@ -66,7 +68,7 @@ celix_status_t celix_utils_deleteDirectory(const char* path, const char** errorO
* @param errorOut An optional error output argument. If an error occurs this will point to a (static) error message.
* @return CELIX_SUCCESS if the zip file was extracted successfully.
*/
-celix_status_t celix_utils_extractZipFile(const char* zipPath, const char* extractToDir, const char** errorOut);
+CELIX_UTILS_EXPORT celix_status_t celix_utils_extractZipFile(const char* zipPath, const char* extractToDir, const char** errorOut);
/**
@@ -80,7 +82,7 @@ celix_status_t celix_utils_extractZipFile(const char* zipPath, const char* extra
* @param errorOut An optional error output argument. If an error occurs this will point to a (static) error message.
* @return CELIX_SUCCESS if the zip data was extracted successfully.
*/
-celix_status_t celix_utils_extractZipData(const void *zipData, size_t zipDataSize, const char* extractToDir, const char** errorOut);
+CELIX_UTILS_EXPORT celix_status_t celix_utils_extractZipData(const void *zipData, size_t zipDataSize, const char* extractToDir, const char** errorOut);
/**
* @brief Returns the last modified time of the file at path.
@@ -89,14 +91,14 @@ celix_status_t celix_utils_extractZipData(const void *zipData, size_t zipDataSiz
* @param[out] lastModified The last modified time of the file.
* @return CELIX_SUCCESS if the last modified time was successfully retrieved.
*/
-celix_status_t celix_utils_getLastModified(const char* path, struct timespec* lastModified);
+CELIX_UTILS_EXPORT celix_status_t celix_utils_getLastModified(const char* path, struct timespec* lastModified);
/**
* @brief Touch the file at path and thus update the last modified time.
* @param path The path to the file.
* @return CELIX_SUCCESS if the last modified time was successfully updated.
*/
-celix_status_t celix_utils_touch(const char* path);
+CELIX_UTILS_EXPORT celix_status_t celix_utils_touch(const char* path);
#ifdef __cplusplus
diff --git a/libs/utils/include/celix_filter.h b/libs/utils/include/celix_filter.h
index aed8bd1f..32fbc565 100644
--- a/libs/utils/include/celix_filter.h
+++ b/libs/utils/include/celix_filter.h
@@ -22,6 +22,7 @@
#include "celix_properties.h"
#include "celix_array_list.h"
+#include "celix_utils_export.h"
#ifdef __cplusplus
extern "C" {
@@ -60,21 +61,21 @@ struct celix_filter_struct {
celix_filter_internal_t* internal; //for internal use only
};
-celix_filter_t* celix_filter_create(const char *filterStr);
+CELIX_UTILS_EXPORT celix_filter_t* celix_filter_create(const char *filterStr);
-void celix_filter_destroy(celix_filter_t *filter);
+CELIX_UTILS_EXPORT void celix_filter_destroy(celix_filter_t *filter);
-bool celix_filter_match(const celix_filter_t *filter, const celix_properties_t* props);
+CELIX_UTILS_EXPORT bool celix_filter_match(const celix_filter_t *filter, const celix_properties_t* props);
-bool celix_filter_matchFilter(const celix_filter_t *filter1, const celix_filter_t *filter2);
+CELIX_UTILS_EXPORT bool celix_filter_matchFilter(const celix_filter_t *filter1, const celix_filter_t *filter2);
-const char* celix_filter_getFilterString(const celix_filter_t *filter);
+CELIX_UTILS_EXPORT const char* celix_filter_getFilterString(const celix_filter_t *filter);
/**
* Find the filter attribute.
* @return The attribute value or NULL if the attribute is not found.
*/
-const char* celix_filter_findAttribute(const celix_filter_t *filter, const char *attribute);
+CELIX_UTILS_EXPORT const char* celix_filter_findAttribute(const celix_filter_t *filter, const char *attribute);
/**
* Check whether the filter indicates the mandatory presence of an attribute with a specific value for the provided attribute key.
@@ -85,7 +86,7 @@ const char* celix_filter_findAttribute(const celix_filter_t *filter, const char
* using this function for attribute key "key1" on filter "(key1>=value1)" yields false.
* using this function for attribute key "key1" on filter "(|(key1=value1)(key2=value2))" yields false.
*/
-bool celix_filter_hasMandatoryEqualsValueAttribute(const celix_filter_t *filter, const char *attribute);
+CELIX_UTILS_EXPORT bool celix_filter_hasMandatoryEqualsValueAttribute(const celix_filter_t *filter, const char *attribute);
/**
* Chek whether the filter indicates the mandatory absence of an attribute, regardless of its value, for the provided attribute key.
@@ -96,7 +97,7 @@ bool celix_filter_hasMandatoryEqualsValueAttribute(const celix_filter_t *filter,
* using this function for attribute key "key1" on the filter "(key1=value)" yields false.
* using this function for attribute key "key1" on the filter "(|(!(key1=*))(key2=value2))" yields false.
*/
-bool celix_filter_hasMandatoryNegatedPresenceAttribute(const celix_filter_t *filter, const char *attribute);
+CELIX_UTILS_EXPORT bool celix_filter_hasMandatoryNegatedPresenceAttribute(const celix_filter_t *filter, const char *attribute);
#ifdef __cplusplus
}
diff --git a/libs/utils/include/celix_log_utils.h b/libs/utils/include/celix_log_utils.h
index b7763d0f..92d21e67 100644
--- a/libs/utils/include/celix_log_utils.h
+++ b/libs/utils/include/celix_log_utils.h
@@ -25,6 +25,7 @@
#include <stdbool.h>
#include "celix_log_level.h"
+#include "celix_utils_export.h"
#ifdef __cplusplus
extern "C" {
@@ -33,13 +34,13 @@ extern "C" {
/**
* Convert a celix log level enum to a const char* value.
*/
-const char* celix_logUtils_logLevelToString(celix_log_level_e level);
+CELIX_UTILS_EXPORT const char* celix_logUtils_logLevelToString(celix_log_level_e level);
/**
* Convert a const char* value to a celix log level
* If the provided log level cannot be parsed or is NULL, the fallbackLogLevel is returned.
*/
-celix_log_level_e celix_logUtils_logLevelFromString(const char *level, celix_log_level_e fallbackLogLevel);
+CELIX_UTILS_EXPORT celix_log_level_e celix_logUtils_logLevelFromString(const char *level, celix_log_level_e fallbackLogLevel);
/**
* Convert a const char* value to a celix log level
@@ -47,7 +48,7 @@ celix_log_level_e celix_logUtils_logLevelFromString(const char *level, celix_log
* if a convertedSuccessfully pointer is provided this will be set to false.
* If converted successfully and the convertedSuccessfully pointer is provided. This will be set to true.
*/
-celix_log_level_e celix_logUtils_logLevelFromStringWithCheck(
+CELIX_UTILS_EXPORT celix_log_level_e celix_logUtils_logLevelFromStringWithCheck(
const char *level,
celix_log_level_e fallbackLogLevel,
bool *convertedSuccessfully);
@@ -57,7 +58,7 @@ celix_log_level_e celix_logUtils_logLevelFromStringWithCheck(
* If the provided log level is higher than info, stderr will be used.
*
*/
-void celix_logUtils_logToStdout(
+CELIX_UTILS_EXPORT void celix_logUtils_logToStdout(
const char *logName,
celix_log_level_e level,
const char *format,
@@ -73,7 +74,7 @@ void celix_logUtils_logToStdout(
* If the argument file or function is NULL, the arguments file, function and line are not used.
*
*/
-void celix_logUtils_logToStdoutDetails(
+CELIX_UTILS_EXPORT void celix_logUtils_logToStdoutDetails(
const char *logName,
celix_log_level_e level,
const char* file,
@@ -88,7 +89,7 @@ void celix_logUtils_logToStdoutDetails(
* If the provided log level is higher than info, stderr will be used.
*
*/
-void celix_logUtils_vLogToStdout(
+CELIX_UTILS_EXPORT void celix_logUtils_vLogToStdout(
const char *logName,
celix_log_level_e level,
const char *format,
@@ -104,7 +105,7 @@ void celix_logUtils_vLogToStdout(
* If the argument file or function is NULL, the arguments file, function and line are not used.
*
*/
-void celix_logUtils_vLogToStdoutDetails(
+CELIX_UTILS_EXPORT void celix_logUtils_vLogToStdoutDetails(
const char *logName,
celix_log_level_e level,
const char* file,
@@ -116,7 +117,7 @@ void celix_logUtils_vLogToStdoutDetails(
/**
* Print a backtrace to the provided output stream.
*/
-void celix_logUtils_printBacktrace(FILE* stream);
+CELIX_UTILS_EXPORT void celix_logUtils_printBacktrace(FILE* stream);
#ifdef __cplusplus
}
diff --git a/libs/utils/include/celix_long_hash_map.h b/libs/utils/include/celix_long_hash_map.h
index 3ff1e906..2babecd4 100644
--- a/libs/utils/include/celix_long_hash_map.h
+++ b/libs/utils/include/celix_long_hash_map.h
@@ -21,6 +21,7 @@
#define CELIX_LONG_HASH_MAP_H_
#include "celix_hash_map_value.h"
+#include "celix_utils_export.h"
/**
* @brief Init macro so that the opts are correctly initialized for C++ compilers
@@ -136,13 +137,13 @@ typedef struct celix_long_hash_map_create_options {
/**
* @brief Creates a new empty hash map with a long as key.
*/
-celix_long_hash_map_t* celix_longHashMap_create();
+CELIX_UTILS_EXPORT celix_long_hash_map_t* celix_longHashMap_create();
/**
* @brief Creates a new empty long hash map using using the provided hash map create options.
* @param opts The create options, only used during the creation of the hash map.
*/
-celix_long_hash_map_t* celix_longHashMap_createWithOptions(const celix_long_hash_map_create_options_t* opts);
+CELIX_UTILS_EXPORT celix_long_hash_map_t* celix_longHashMap_createWithOptions(const celix_long_hash_map_create_options_t* opts);
/**
* @brief Clears and then deallocated the hash map.
@@ -151,12 +152,12 @@ celix_long_hash_map_t* celix_longHashMap_createWithOptions(const celix_long_hash
*
* @param map The hashmap
*/
-void celix_longHashMap_destroy(celix_long_hash_map_t* map);
+CELIX_UTILS_EXPORT void celix_longHashMap_destroy(celix_long_hash_map_t* map);
/**
* @brief Returns the size of the hashmap
*/
-size_t celix_longHashMap_size(const celix_long_hash_map_t* map);
+CELIX_UTILS_EXPORT size_t celix_longHashMap_size(const celix_long_hash_map_t* map);
/**
* @brief add pointer entry the string hash map.
@@ -166,7 +167,7 @@ size_t celix_longHashMap_size(const celix_long_hash_map_t* map);
* @param value The value to store with the key
* @return The previous key or NULL of no key was set. Note also returns NULL if the previous value for the key was NULL.
*/
-void* celix_longHashMap_put(celix_long_hash_map_t* map, long key, void* value);
+CELIX_UTILS_EXPORT void* celix_longHashMap_put(celix_long_hash_map_t* map, long key, void* value);
/**
* @brief add long entry the long hash map.
@@ -176,7 +177,7 @@ void* celix_longHashMap_put(celix_long_hash_map_t* map, long key, void* value);
* @param value The value to store with the key.
* @return True if a previous value with the provided has been replaced.
*/
-bool celix_longHashMap_putLong(celix_long_hash_map_t* map, long key, long value);
+CELIX_UTILS_EXPORT bool celix_longHashMap_putLong(celix_long_hash_map_t* map, long key, long value);
/**
* @brief add double entry the long hash map.
@@ -186,7 +187,7 @@ bool celix_longHashMap_putLong(celix_long_hash_map_t* map, long key, long value)
* @param value The value to store with the key.
* @return True if a previous value with the provided has been replaced.
*/
-bool celix_longHashMap_putDouble(celix_long_hash_map_t* map, long key, double value);
+CELIX_UTILS_EXPORT bool celix_longHashMap_putDouble(celix_long_hash_map_t* map, long key, double value);
/**
* @brief add bool entry the long hash map.
@@ -196,7 +197,7 @@ bool celix_longHashMap_putDouble(celix_long_hash_map_t* map, long key, double va
* @param value The value to store with the key.
* @return True if a previous value with the provided has been replaced.
*/
-bool celix_longHashMap_putBool(celix_long_hash_map_t* map, long key, bool value);
+CELIX_UTILS_EXPORT bool celix_longHashMap_putBool(celix_long_hash_map_t* map, long key, bool value);
/**
* @brief Returns the value for the provided key.
@@ -205,7 +206,7 @@ bool celix_longHashMap_putBool(celix_long_hash_map_t* map, long key, bool value)
* @param key The key to lookup.
* @return Return the pointer value for the key or NULL. Note will also return NULL if the pointer value for the provided key is NULL.
*/
-void* celix_longHashMap_get(const celix_long_hash_map_t* map, long key);
+CELIX_UTILS_EXPORT void* celix_longHashMap_get(const celix_long_hash_map_t* map, long key);
/**
* @brief Returns the long value for the provided key.
@@ -215,7 +216,7 @@ void* celix_longHashMap_get(const celix_long_hash_map_t* map, long key);
* @param fallbackValue The fallback value to use if a value for the provided key was not found.
* @return Return the value for the key or fallbackValue if the key is not present.
*/
-long celix_longHashMap_getLong(const celix_long_hash_map_t* map, long key, long fallbackValue);
+CELIX_UTILS_EXPORT long celix_longHashMap_getLong(const celix_long_hash_map_t* map, long key, long fallbackValue);
/**
* @brief Returns the long value for the provided key.
@@ -225,7 +226,7 @@ long celix_longHashMap_getLong(const celix_long_hash_map_t* map, long key, long
* @param fallbackValue The fallback value to use if a value for the provided key was not found.
* @return Return the value for the key or fallbackValue if the key is not present.
*/
-double celix_longHashMap_getDouble(const celix_long_hash_map_t* map, long key, double fallbackValue);
+CELIX_UTILS_EXPORT double celix_longHashMap_getDouble(const celix_long_hash_map_t* map, long key, double fallbackValue);
/**
* @brief Returns the long value for the provided key.
@@ -235,12 +236,12 @@ double celix_longHashMap_getDouble(const celix_long_hash_map_t* map, long key, d
* @param fallbackValue The fallback value to use if a value for the provided key was not found.
* @return Return the value for the key or fallbackValue if the key is not present.
*/
-bool celix_longHashMap_getBool(const celix_long_hash_map_t* map, long key, bool fallbackValue);
+CELIX_UTILS_EXPORT bool celix_longHashMap_getBool(const celix_long_hash_map_t* map, long key, bool fallbackValue);
/**
* @brief Returns true if the map has the provided key.
*/
-bool celix_longHashMap_hasKey(const celix_long_hash_map_t* map, long key);
+CELIX_UTILS_EXPORT bool celix_longHashMap_hasKey(const celix_long_hash_map_t* map, long key);
/**
* @brief Remove a entry from the hashmap and silently ignore if the hash map does not have a entry with the provided
@@ -251,20 +252,20 @@ bool celix_longHashMap_hasKey(const celix_long_hash_map_t* map, long key);
*
* @return True is the value is found and removed.
*/
-bool celix_longHashMap_remove(celix_long_hash_map_t* map, long key);
+CELIX_UTILS_EXPORT bool celix_longHashMap_remove(celix_long_hash_map_t* map, long key);
/**
* @brief Clear all entries in the hash map.
*
* @note If a (simple) removed callback is configured, the callback will be called for every hash map entry.
*/
-void celix_longHashMap_clear(celix_long_hash_map_t* map);
+CELIX_UTILS_EXPORT void celix_longHashMap_clear(celix_long_hash_map_t* map);
/**
* @brief Create and return a hash map iterator for the beginning of the hash map.
*
*/
-celix_long_hash_map_iterator_t celix_longHashMap_begin(const celix_long_hash_map_t* map);
+CELIX_UTILS_EXPORT celix_long_hash_map_iterator_t celix_longHashMap_begin(const celix_long_hash_map_t* map);
/**
* @brief Check if the iterator is the end of the hash map.
@@ -273,12 +274,12 @@ celix_long_hash_map_iterator_t celix_longHashMap_begin(const celix_long_hash_map
*
* @return true if the iterator is the end.
*/
-bool celix_longHashMapIterator_isEnd(const celix_long_hash_map_iterator_t* iter);
+CELIX_UTILS_EXPORT bool celix_longHashMapIterator_isEnd(const celix_long_hash_map_iterator_t* iter);
/**
* @brief Moves the provided iterator to the next entry in the hash map.
*/
-void celix_longHashMapIterator_next(celix_long_hash_map_iterator_t* iter);
+CELIX_UTILS_EXPORT void celix_longHashMapIterator_next(celix_long_hash_map_iterator_t* iter);
/**
* @brief Marco to loop over all the entries of a long hash map.
@@ -311,7 +312,7 @@ void celix_longHashMapIterator_next(celix_long_hash_map_iterator_t* iter);
* }
* @endcode
*/
-void celix_longHashMapIterator_remove(celix_long_hash_map_iterator_t* iter);
+CELIX_UTILS_EXPORT void celix_longHashMapIterator_remove(celix_long_hash_map_iterator_t* iter);
#ifdef __cplusplus
}
diff --git a/libs/utils/include/celix_properties.h b/libs/utils/include/celix_properties.h
index 762fcff3..707bb547 100644
--- a/libs/utils/include/celix_properties.h
+++ b/libs/utils/include/celix_properties.h
@@ -17,13 +17,14 @@
* under the License.
*/
+#ifndef CELIX_PROPERTIES_H_
+#define CELIX_PROPERTIES_H_
+
#include <stdio.h>
#include <stdbool.h>
#include "celix_errno.h"
-
-#ifndef CELIX_PROPERTIES_H_
-#define CELIX_PROPERTIES_H_
+#include "celix_utils_export.h"
#ifdef __cplusplus
extern "C" {
@@ -46,45 +47,45 @@ typedef struct celix_properties_iterator {
* Updated API
**********************************************************************************************************************
**********************************************************************************************************************/
-
-celix_properties_t* celix_properties_create(void);
-void celix_properties_destroy(celix_properties_t *properties);
+CELIX_UTILS_EXPORT celix_properties_t* celix_properties_create(void);
+
+CELIX_UTILS_EXPORT void celix_properties_destroy(celix_properties_t *properties);
-celix_properties_t* celix_properties_load(const char *filename);
+CELIX_UTILS_EXPORT celix_properties_t* celix_properties_load(const char *filename);
-celix_properties_t* celix_properties_loadWithStream(FILE *stream);
+CELIX_UTILS_EXPORT celix_properties_t* celix_properties_loadWithStream(FILE *stream);
-celix_properties_t* celix_properties_loadFromString(const char *input);
+CELIX_UTILS_EXPORT celix_properties_t* celix_properties_loadFromString(const char *input);
-void celix_properties_store(celix_properties_t *properties, const char *file, const char *header);
+CELIX_UTILS_EXPORT void celix_properties_store(celix_properties_t *properties, const char *file, const char *header);
-const char* celix_properties_get(const celix_properties_t *properties, const char *key, const char *defaultValue);
+CELIX_UTILS_EXPORT const char* celix_properties_get(const celix_properties_t *properties, const char *key, const char *defaultValue);
-void celix_properties_set(celix_properties_t *properties, const char *key, const char *value);
+CELIX_UTILS_EXPORT void celix_properties_set(celix_properties_t *properties, const char *key, const char *value);
-void celix_properties_setWithoutCopy(celix_properties_t *properties, char *key, char *value);
+CELIX_UTILS_EXPORT void celix_properties_setWithoutCopy(celix_properties_t *properties, char *key, char *value);
-void celix_properties_unset(celix_properties_t *properties, const char *key);
+CELIX_UTILS_EXPORT void celix_properties_unset(celix_properties_t *properties, const char *key);
-celix_properties_t* celix_properties_copy(const celix_properties_t *properties);
+CELIX_UTILS_EXPORT celix_properties_t* celix_properties_copy(const celix_properties_t *properties);
-long celix_properties_getAsLong(const celix_properties_t *props, const char *key, long defaultValue);
-void celix_properties_setLong(celix_properties_t *props, const char *key, long value);
+CELIX_UTILS_EXPORT long celix_properties_getAsLong(const celix_properties_t *props, const char *key, long defaultValue);
+CELIX_UTILS_EXPORT void celix_properties_setLong(celix_properties_t *props, const char *key, long value);
-bool celix_properties_getAsBool(const celix_properties_t *props, const char *key, bool defaultValue);
-void celix_properties_setBool(celix_properties_t *props, const char *key, bool val);
+CELIX_UTILS_EXPORT bool celix_properties_getAsBool(const celix_properties_t *props, const char *key, bool defaultValue);
+CELIX_UTILS_EXPORT void celix_properties_setBool(celix_properties_t *props, const char *key, bool val);
-void celix_properties_setDouble(celix_properties_t *props, const char *key, double val);
-double celix_properties_getAsDouble(const celix_properties_t *props, const char *key, double defaultValue);
+CELIX_UTILS_EXPORT void celix_properties_setDouble(celix_properties_t *props, const char *key, double val);
+CELIX_UTILS_EXPORT double celix_properties_getAsDouble(const celix_properties_t *props, const char *key, double defaultValue);
-int celix_properties_size(const celix_properties_t *properties);
+CELIX_UTILS_EXPORT int celix_properties_size(const celix_properties_t *properties);
-celix_properties_iterator_t celix_propertiesIterator_construct(const celix_properties_t *properties);
-bool celix_propertiesIterator_hasNext(celix_properties_iterator_t *iter);
-const char* celix_propertiesIterator_nextKey(celix_properties_iterator_t *iter);
-celix_properties_t* celix_propertiesIterator_properties(celix_properties_iterator_t *iter);
+CELIX_UTILS_EXPORT celix_properties_iterator_t celix_propertiesIterator_construct(const celix_properties_t *properties);
+CELIX_UTILS_EXPORT bool celix_propertiesIterator_hasNext(celix_properties_iterator_t *iter);
+CELIX_UTILS_EXPORT const char* celix_propertiesIterator_nextKey(celix_properties_iterator_t *iter);
+CELIX_UTILS_EXPORT celix_properties_t* celix_propertiesIterator_properties(celix_properties_iterator_t *iter);
#define CELIX_PROPERTIES_FOR_EACH(props, key) \
for(celix_properties_iterator_t iter = celix_propertiesIterator_construct(props); \
diff --git a/libs/utils/include/celix_string_hash_map.h b/libs/utils/include/celix_string_hash_map.h
index c402be4c..620fe10e 100644
--- a/libs/utils/include/celix_string_hash_map.h
+++ b/libs/utils/include/celix_string_hash_map.h
@@ -21,6 +21,7 @@
#define CELIX_STRING_HASH_MAP_H_
#include "celix_hash_map_value.h"
+#include "celix_utils_export.h"
/**
* @brief Init macro so that the opts are correctly initialized for C++ compilers
@@ -146,13 +147,13 @@ typedef struct celix_string_hash_map_create_options {
/**
* @brief Creates a new empty hash map with a 'const char*' as key.
*/
-celix_string_hash_map_t* celix_stringHashMap_create();
+CELIX_UTILS_EXPORT celix_string_hash_map_t* celix_stringHashMap_create();
/**
* @brief Creates a new empty string hash map using using the provided hash map create options.
* @param opts The create options, only used during the creation of the hash map.
*/
-celix_string_hash_map_t* celix_stringHashMap_createWithOptions(const celix_string_hash_map_create_options_t* opts);
+CELIX_UTILS_EXPORT celix_string_hash_map_t* celix_stringHashMap_createWithOptions(const celix_string_hash_map_create_options_t* opts);
/**
* @brief Clears and then deallocated the hash map.
@@ -161,12 +162,12 @@ celix_string_hash_map_t* celix_stringHashMap_createWithOptions(const celix_strin
*
* @param map The hashmap
*/
-void celix_stringHashMap_destroy(celix_string_hash_map_t* map);
+CELIX_UTILS_EXPORT void celix_stringHashMap_destroy(celix_string_hash_map_t* map);
/**
* @brief Returns the size of the hashmap.
*/
-size_t celix_stringHashMap_size(const celix_string_hash_map_t* map);
+CELIX_UTILS_EXPORT size_t celix_stringHashMap_size(const celix_string_hash_map_t* map);
/**
* @brief add pointer entry the string hash map.
@@ -176,7 +177,7 @@ size_t celix_stringHashMap_size(const celix_string_hash_map_t* map);
* @param value The value to store with the key.
* @return The previous key or NULL of no key was set. Note also returns NULL if the previous value for the key was NULL.
*/
-void* celix_stringHashMap_put(celix_string_hash_map_t* map, const char* key, void* value);
+CELIX_UTILS_EXPORT void* celix_stringHashMap_put(celix_string_hash_map_t* map, const char* key, void* value);
/**
* @brief add long entry the string hash map.
@@ -186,7 +187,7 @@ void* celix_stringHashMap_put(celix_string_hash_map_t* map, const char* key, voi
* @param value The value to store with the key.
* @return True if a previous value with the provided has been replaced.
*/
-bool celix_stringHashMap_putLong(celix_string_hash_map_t* map, const char* key, long value);
+CELIX_UTILS_EXPORT bool celix_stringHashMap_putLong(celix_string_hash_map_t* map, const char* key, long value);
/**
* @brief add double entry the string hash map.
@@ -195,7 +196,7 @@ bool celix_stringHashMap_putLong(celix_string_hash_map_t* map, const char* key,
* @param key The key to use. The hashmap will create a copy if needed.
* @return True if a previous value with the provided has been replaced.
*/
-bool celix_stringHashMap_putDouble(celix_string_hash_map_t* map, const char* key, double value);
+CELIX_UTILS_EXPORT bool celix_stringHashMap_putDouble(celix_string_hash_map_t* map, const char* key, double value);
/**
* @brief add bool entry the string hash map.
@@ -205,7 +206,7 @@ bool celix_stringHashMap_putDouble(celix_string_hash_map_t* map, const char* key
* @param value The value to store with the key.
* @return True if a previous value with the provided has been replaced.
*/
-bool celix_stringHashMap_putBool(celix_string_hash_map_t* map, const char* key, bool value);
+CELIX_UTILS_EXPORT bool celix_stringHashMap_putBool(celix_string_hash_map_t* map, const char* key, bool value);
/**
* @brief Returns the value for the provided key.
@@ -214,7 +215,7 @@ bool celix_stringHashMap_putBool(celix_string_hash_map_t* map, const char* key,
* @param key The key to lookup.
* @return Return the pointer value for the key or NULL. Note will also return NULL if the pointer value for the provided key is NULL.
*/
-void* celix_stringHashMap_get(const celix_string_hash_map_t* map, const char* key);
+CELIX_UTILS_EXPORT void* celix_stringHashMap_get(const celix_string_hash_map_t* map, const char* key);
/**
* @brief Returns the long value for the provided key.
@@ -224,7 +225,7 @@ void* celix_stringHashMap_get(const celix_string_hash_map_t* map, const char* ke
* @param fallbackValue The fallback value to use if a value for the provided key was not found.
* @return Return the value for the key or fallbackValue if the key is not present.
*/
-long celix_stringHashMap_getLong(const celix_string_hash_map_t* map, const char* key, long fallbackValue);
+CELIX_UTILS_EXPORT long celix_stringHashMap_getLong(const celix_string_hash_map_t* map, const char* key, long fallbackValue);
/**
* @brief Returns the double value for the provided key.
@@ -234,7 +235,7 @@ long celix_stringHashMap_getLong(const celix_string_hash_map_t* map, const char*
* @param fallbackValue The fallback value to use if a value for the provided key was not found.
* @return Return the value for the key or fallbackValue if the key is not present.
*/
-double celix_stringHashMap_getDouble(const celix_string_hash_map_t* map, const char* key, double fallbackValue);
+CELIX_UTILS_EXPORT double celix_stringHashMap_getDouble(const celix_string_hash_map_t* map, const char* key, double fallbackValue);
/**
* @brief Returns the bool value for the provided key.
@@ -244,12 +245,12 @@ double celix_stringHashMap_getDouble(const celix_string_hash_map_t* map, const c
* @param fallbackValue The fallback value to use if a value for the provided key was not found.
* @return Return the value for the key or fallbackValue if the key is not present.
*/
-bool celix_stringHashMap_getBool(const celix_string_hash_map_t* map, const char* key, bool fallbackValue);
+CELIX_UTILS_EXPORT bool celix_stringHashMap_getBool(const celix_string_hash_map_t* map, const char* key, bool fallbackValue);
/**
* @brief Returns true if the map has the provided key.
*/
-bool celix_stringHashMap_hasKey(const celix_string_hash_map_t* map, const char* key);
+CELIX_UTILS_EXPORT bool celix_stringHashMap_hasKey(const celix_string_hash_map_t* map, const char* key);
/**
* @brief Remove a entry from the hashmap and silently ignore if the hash map does not have a entry with the provided
@@ -260,19 +261,19 @@ bool celix_stringHashMap_hasKey(const celix_string_hash_map_t* map, const char*
*
* @return True is the value is found and removed.
*/
-bool celix_stringHashMap_remove(celix_string_hash_map_t* map, const char* key);
+CELIX_UTILS_EXPORT bool celix_stringHashMap_remove(celix_string_hash_map_t* map, const char* key);
/**
* @brief Clear all entries in the hash map.
*
* @note If a (simple) removed callback is configured, the callback will be called for every hash map entry.
*/
-void celix_stringHashMap_clear(celix_string_hash_map_t* map);
+CELIX_UTILS_EXPORT void celix_stringHashMap_clear(celix_string_hash_map_t* map);
/**
* @brief Create and return a hash map iterator for the beginning of the hash map.
*/
-celix_string_hash_map_iterator_t celix_stringHashMap_begin(const celix_string_hash_map_t* map);
+CELIX_UTILS_EXPORT celix_string_hash_map_iterator_t celix_stringHashMap_begin(const celix_string_hash_map_t* map);
/**
* @brief Check if the iterator is the end of the hash map.
@@ -281,12 +282,12 @@ celix_string_hash_map_iterator_t celix_stringHashMap_begin(const celix_string_ha
*
* @return true if the iterator is the end.
*/
-bool celix_stringHashMapIterator_isEnd(const celix_string_hash_map_iterator_t* iter);
+CELIX_UTILS_EXPORT bool celix_stringHashMapIterator_isEnd(const celix_string_hash_map_iterator_t* iter);
/**
* @brief Moves the provided iterator to the next entry in the hash map.
*/
-void celix_stringHashMapIterator_next(celix_string_hash_map_iterator_t* iter);
+CELIX_UTILS_EXPORT void celix_stringHashMapIterator_next(celix_string_hash_map_iterator_t* iter);
/**
* @brief Marco to loop over all the entries of a string hash map.
@@ -319,7 +320,7 @@ void celix_stringHashMapIterator_next(celix_string_hash_map_iterator_t* iter);
* }
* @endcode
*/
-void celix_stringHashMapIterator_remove(celix_string_hash_map_iterator_t* iter);
+CELIX_UTILS_EXPORT void celix_stringHashMapIterator_remove(celix_string_hash_map_iterator_t* iter);
#ifdef __cplusplus
}
diff --git a/libs/utils/include/celix_threads.h b/libs/utils/include/celix_threads.h
index f9458cba..e74074ab 100644
--- a/libs/utils/include/celix_threads.h
+++ b/libs/utils/include/celix_threads.h
@@ -16,13 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
-/**
- * celix_threads.h
- *
- * \date 4 Jun 2014
- * \author <a href="mailto:dev@celix.apache.org">Apache Celix Project Team</a>
- * \copyright Apache License, Version 2.0
- */
#ifndef CELIX_THREADS_H_
#define CELIX_THREADS_H_
@@ -31,6 +24,7 @@
#include <stdbool.h>
#include "celix_errno.h"
+#include "celix_utils_export.h"
#ifdef __cplusplus
extern "C" {
@@ -51,23 +45,23 @@ typedef void *(*celix_thread_start_t)(void *);
static const celix_thread_t celix_thread_default = {0, 0};
-celix_status_t
+CELIX_UTILS_EXPORT celix_status_t
celixThread_create(celix_thread_t *new_thread, celix_thread_attr_t *attr, celix_thread_start_t func, void *data);
/**
* If supported by the platform sets the name of the thread.
*/
-void celixThread_setName(celix_thread_t *thread, const char *threadName);
+CELIX_UTILS_EXPORT void celixThread_setName(celix_thread_t *thread, const char *threadName);
-void celixThread_exit(void *exitStatus);
+CELIX_UTILS_EXPORT void celixThread_exit(void *exitStatus);
-celix_status_t celixThread_detach(celix_thread_t thread);
+CELIX_UTILS_EXPORT celix_status_t celixThread_detach(celix_thread_t thread);
-celix_status_t celixThread_join(celix_thread_t thread, void **status);
+CELIX_UTILS_EXPORT celix_status_t celixThread_join(celix_thread_t thread, void **status);
-celix_status_t celixThread_kill(celix_thread_t thread, int sig);
+CELIX_UTILS_EXPORT celix_status_t celixThread_kill(celix_thread_t thread, int sig);
-celix_thread_t celixThread_self(void);
+CELIX_UTILS_EXPORT celix_thread_t celixThread_self(void);
/**
* Return true - as int - if the threads are equals
@@ -75,9 +69,9 @@ celix_thread_t celixThread_self(void);
* @param[in] thread2
* @return non-zero if the thread IDs t1 and t2 correspond to the same thread, otherwise it will return zero.
*/
-int celixThread_equals(celix_thread_t thread1, celix_thread_t thread2);
+CELIX_UTILS_EXPORT int celixThread_equals(celix_thread_t thread1, celix_thread_t thread2);
-bool celixThread_initialized(celix_thread_t thread);
+CELIX_UTILS_EXPORT bool celixThread_initialized(celix_thread_t thread);
typedef pthread_mutex_t celix_thread_mutex_t;
@@ -92,55 +86,55 @@ enum {
};
-celix_status_t celixThreadMutex_create(celix_thread_mutex_t *mutex, celix_thread_mutexattr_t *attr);
+CELIX_UTILS_EXPORT celix_status_t celixThreadMutex_create(celix_thread_mutex_t *mutex, celix_thread_mutexattr_t *attr);
-celix_status_t celixThreadMutex_destroy(celix_thread_mutex_t *mutex);
+CELIX_UTILS_EXPORT celix_status_t celixThreadMutex_destroy(celix_thread_mutex_t *mutex);
-celix_status_t celixThreadMutex_lock(celix_thread_mutex_t *mutex);
+CELIX_UTILS_EXPORT celix_status_t celixThreadMutex_lock(celix_thread_mutex_t *mutex);
-celix_status_t celixThreadMutex_unlock(celix_thread_mutex_t *mutex);
+CELIX_UTILS_EXPORT celix_status_t celixThreadMutex_unlock(celix_thread_mutex_t *mutex);
-celix_status_t celixThreadMutexAttr_create(celix_thread_mutexattr_t *attr);
+CELIX_UTILS_EXPORT celix_status_t celixThreadMutexAttr_create(celix_thread_mutexattr_t *attr);
-celix_status_t celixThreadMutexAttr_destroy(celix_thread_mutexattr_t *attr);
+CELIX_UTILS_EXPORT celix_status_t celixThreadMutexAttr_destroy(celix_thread_mutexattr_t *attr);
-celix_status_t celixThreadMutexAttr_settype(celix_thread_mutexattr_t *attr, int type);
+CELIX_UTILS_EXPORT celix_status_t celixThreadMutexAttr_settype(celix_thread_mutexattr_t *attr, int type);
typedef pthread_rwlock_t celix_thread_rwlock_t;
typedef pthread_rwlockattr_t celix_thread_rwlockattr_t;
-celix_status_t celixThreadRwlock_create(celix_thread_rwlock_t *lock, celix_thread_rwlockattr_t *attr);
+CELIX_UTILS_EXPORT celix_status_t celixThreadRwlock_create(celix_thread_rwlock_t *lock, celix_thread_rwlockattr_t *attr);
-celix_status_t celixThreadRwlock_destroy(celix_thread_rwlock_t *lock);
+CELIX_UTILS_EXPORT celix_status_t celixThreadRwlock_destroy(celix_thread_rwlock_t *lock);
-celix_status_t celixThreadRwlock_readLock(celix_thread_rwlock_t *lock);
+CELIX_UTILS_EXPORT celix_status_t celixThreadRwlock_readLock(celix_thread_rwlock_t *lock);
-celix_status_t celixThreadRwlock_writeLock(celix_thread_rwlock_t *lock);
+CELIX_UTILS_EXPORT celix_status_t celixThreadRwlock_writeLock(celix_thread_rwlock_t *lock);
-celix_status_t celixThreadRwlock_unlock(celix_thread_rwlock_t *lock);
+CELIX_UTILS_EXPORT celix_status_t celixThreadRwlock_unlock(celix_thread_rwlock_t *lock);
-celix_status_t celixThreadRwlockAttr_create(celix_thread_rwlockattr_t *attr);
+CELIX_UTILS_EXPORT celix_status_t celixThreadRwlockAttr_create(celix_thread_rwlockattr_t *attr);
-celix_status_t celixThreadRwlockAttr_destroy(celix_thread_rwlockattr_t *attr);
+CELIX_UTILS_EXPORT celix_status_t celixThreadRwlockAttr_destroy(celix_thread_rwlockattr_t *attr);
//NOTE: No support yet for setting specific rw lock attributes
typedef pthread_cond_t celix_thread_cond_t;
typedef pthread_condattr_t celix_thread_condattr_t;
-celix_status_t celixThreadCondition_init(celix_thread_cond_t *condition, celix_thread_condattr_t *attr);
+CELIX_UTILS_EXPORT celix_status_t celixThreadCondition_init(celix_thread_cond_t *condition, celix_thread_condattr_t *attr);
-celix_status_t celixThreadCondition_destroy(celix_thread_cond_t *condition);
+CELIX_UTILS_EXPORT celix_status_t celixThreadCondition_destroy(celix_thread_cond_t *condition);
-celix_status_t celixThreadCondition_wait(celix_thread_cond_t *cond, celix_thread_mutex_t *mutex);
+CELIX_UTILS_EXPORT celix_status_t celixThreadCondition_wait(celix_thread_cond_t *cond, celix_thread_mutex_t *mutex);
-celix_status_t celixThreadCondition_timedwaitRelative(celix_thread_cond_t *cond, celix_thread_mutex_t *mutex, long seconds, long nanoseconds);
+CELIX_UTILS_EXPORT celix_status_t celixThreadCondition_timedwaitRelative(celix_thread_cond_t *cond, celix_thread_mutex_t *mutex, long seconds, long nanoseconds);
-celix_status_t celixThreadCondition_broadcast(celix_thread_cond_t *cond);
+CELIX_UTILS_EXPORT celix_status_t celixThreadCondition_broadcast(celix_thread_cond_t *cond);
-celix_status_t celixThreadCondition_signal(celix_thread_cond_t *cond);
+CELIX_UTILS_EXPORT celix_status_t celixThreadCondition_signal(celix_thread_cond_t *cond);
-celix_status_t celixThread_once(celix_thread_once_t *once_control, void (*init_routine)(void));
+CELIX_UTILS_EXPORT celix_status_t celixThread_once(celix_thread_once_t *once_control, void (*init_routine)(void));
#ifdef __cplusplus
}
diff --git a/libs/utils/include/celix_utils.h b/libs/utils/include/celix_utils.h
index 0b9b17d0..b7e8a8c5 100644
--- a/libs/utils/include/celix_utils.h
+++ b/libs/utils/include/celix_utils.h
@@ -28,6 +28,8 @@ extern "C" {
#include <stdarg.h>
#include <stdbool.h>
+#include "celix_utils_export.h"
+
#define CELIX_UTILS_MAX_STRLEN 1024*1024*1024
#define CELIX_US_IN_SEC (1000000)
#define CELIX_NS_IN_SEC ((CELIX_US_IN_SEC)*1000)
@@ -38,14 +40,14 @@ extern "C" {
* The strdup is limited to the CELIX_UTILS_MAX_STRLEN and uses strndup to achieve this.
* @return a copy of the string (including null terminator).
*/
-char* celix_utils_strdup(const char *str);
+CELIX_UTILS_EXPORT char* celix_utils_strdup(const char *str);
/**
* @brief Creates a hash from a string
* @param string
* @return hash
*/
-unsigned int celix_utils_stringHash(const char* string);
+CELIX_UTILS_EXPORT unsigned int celix_utils_stringHash(const char* string);
/**
* The proposed buffer size to use for celix_utils_writeOrCreateString with a buffer on the stcck.
@@ -61,7 +63,7 @@ unsigned int celix_utils_stringHash(const char* string);
* @return The formatted string in the provided buffer or a newly allocated buffer if the provided buffer is to small.
* @retval NULL if a allocation was needed, but failed.
*/
-char* celix_utils_writeOrCreateString(char* buffer, size_t bufferSize, const char* format, ...)
+CELIX_UTILS_EXPORT char* celix_utils_writeOrCreateString(char* buffer, size_t bufferSize, const char* format, ...)
__attribute__((format(printf, 3, 4)));
/**
@@ -73,7 +75,7 @@ char* celix_utils_writeOrCreateString(char* buffer, size_t bufferSize, const cha
* @return The formatted string in the provided buffer or a newly allocated buffer if the provided buffer is to small.
* @retval NULL if a allocation was needed, but failed.
*/
-char* celix_utils_writeOrCreateVString(char* buffer, size_t bufferSize, const char* format, va_list formatArgs)
+CELIX_UTILS_EXPORT char* celix_utils_writeOrCreateVString(char* buffer, size_t bufferSize, const char* format, va_list formatArgs)
__attribute__((format(printf, 3, 0)));
/**
@@ -82,19 +84,19 @@ __attribute__((format(printf, 3, 0)));
* @param buffer The buffer to compare the str to.
* @param str The string to free if it is not equal to the buffer.
*/
-void celix_utils_freeStringIfNotEqual(const char* buffer, char* str);
+CELIX_UTILS_EXPORT void celix_utils_freeStringIfNotEqual(const char* buffer, char* str);
/**
* @brief Compares two strings and returns true if the strings are equal.
*/
-bool celix_utils_stringEquals(const char* a, const char* b);
+CELIX_UTILS_EXPORT bool celix_utils_stringEquals(const char* a, const char* b);
/**
* Check if the provided string contains a whitespace (spaces, tabs, etc).
* The check is based on `isspace`.
*/
-bool celix_utils_containsWhitespace(const char* s);
+CELIX_UTILS_EXPORT bool celix_utils_containsWhitespace(const char* s);
/**
* @brief Returns a trimmed string.
@@ -102,12 +104,12 @@ bool celix_utils_containsWhitespace(const char* s);
* The trim will remove eny leading and trailing whitespaces (' ', '\t', etc based on `isspace`)/
* Caller is owner of the returned string.
*/
-char* celix_utils_trim(const char* string);
+CELIX_UTILS_EXPORT char* celix_utils_trim(const char* string);
/**
* @brief Check if a string is NULL or empty "".
*/
-bool celix_utils_isStringNullOrEmpty(const char* s);
+CELIX_UTILS_EXPORT bool celix_utils_isStringNullOrEmpty(const char* s);
/** @brief create a C identifier from the provided string by replacing each non-alphanumeric character with a
* underscore.
@@ -118,7 +120,7 @@ bool celix_utils_isStringNullOrEmpty(const char* s);
* @param string the input string to make a C identifier for.
* @return new newly allocated string or NULL if the input was wrong. The caller is owner of the returned string.
*/
-char* celix_utils_makeCIdentifier(const char* s);
+CELIX_UTILS_EXPORT char* celix_utils_makeCIdentifier(const char* s);
/**
@@ -132,7 +134,7 @@ char* celix_utils_makeCIdentifier(const char* s);
* @param outLocalName A output argument for the local name part. Caller is owner of the data.
* @param outNamespace A output argument for the (optional) namespace part. Caller is owner of the data.
*/
-void celix_utils_extractLocalNameAndNamespaceFromFullyQualifiedName(const char *fullyQualifiedName, const char *namespaceSeparator, char **outLocalName, char **outNamespace);
+CELIX_UTILS_EXPORT void celix_utils_extractLocalNameAndNamespaceFromFullyQualifiedName(const char *fullyQualifiedName, const char *namespaceSeparator, char **outLocalName, char **outNamespace);
/**
* @brief Returns the diff in seconds between tBegin and tEnd.
@@ -140,24 +142,24 @@ void celix_utils_extractLocalNameAndNamespaceFromFullyQualifiedName(const char *
* @param tEnd The end time.
* @return Diff in seconds.
*/
-double celix_difftime(const struct timespec *tBegin, const struct timespec *tEnd);
+CELIX_UTILS_EXPORT double celix_difftime(const struct timespec *tBegin, const struct timespec *tEnd);
/**
* @brief Returns the current time as struct timespec
* @param clockId The clock to use (see time.h)
*/
-struct timespec celix_gettime(clockid_t clockId);
+CELIX_UTILS_EXPORT struct timespec celix_gettime(clockid_t clockId);
/**
* @brief Returns the elapsed time - in seconds - relative to the startTime
* using the clock for the provided clockid.
*/
-double celix_elapsedtime(clockid_t clockId, struct timespec startTime);
+CELIX_UTILS_EXPORT double celix_elapsedtime(clockid_t clockId, struct timespec startTime);
/**
* @brief Creates a hash from a string
*/
-unsigned int celix_utils_stringHash(const char* string);
+CELIX_UTILS_EXPORT unsigned int celix_utils_stringHash(const char* string);
/**
* @brief Compares services using the service id and ranking.
@@ -171,7 +173,7 @@ unsigned int celix_utils_stringHash(const char* string);
*
* And vica versa.
*/
-int celix_utils_compareServiceIdsAndRanking(long svcIdA, long svcRankA, long svcIdB, long svcRankB);
+CELIX_UTILS_EXPORT int celix_utils_compareServiceIdsAndRanking(long svcIdA, long svcRankA, long svcIdB, long svcRankB);
#ifdef __cplusplus
diff --git a/libs/utils/include/celix_version.h b/libs/utils/include/celix_version.h
index a5b7073d..d736c3c0 100644
--- a/libs/utils/include/celix_version.h
+++ b/libs/utils/include/celix_version.h
@@ -26,6 +26,8 @@ extern "C" {
#include <stdbool.h>
+#include "celix_utils_export.h"
+
/**
* The definition of the celix_version_t* abstract data type.
*/
@@ -42,9 +44,9 @@ typedef struct celix_version celix_version_t;
* the empty string.
* @return The created version or NULL if the input was incorrect
*/
-celix_version_t* celix_version_createVersion(int major, int minor, int micro, const char* qualifier);
+CELIX_UTILS_EXPORT celix_version_t* celix_version_createVersion(int major, int minor, int micro, const char* qualifier);
-void celix_version_destroy(celix_version_t* version);
+CELIX_UTILS_EXPORT void celix_version_destroy(celix_version_t* version);
/**
* Creates a copy of <code>version</code>.
@@ -52,7 +54,7 @@ void celix_version_destroy(celix_version_t* version);
* @param version The version to copy
* @return the copied version
*/
-celix_version_t* celix_version_copy(const celix_version_t* version);
+CELIX_UTILS_EXPORT celix_version_t* celix_version_copy(const celix_version_t* version);
/**
* Creates a version identifier from the specified string.
@@ -75,21 +77,21 @@ celix_version_t* celix_version_copy(const celix_version_t* version);
* @param versionStr String representation of the version identifier.
* @return The created version or NULL if the input was invalid.
*/
-celix_version_t* celix_version_createVersionFromString(const char *versionStr);
+CELIX_UTILS_EXPORT celix_version_t* celix_version_createVersionFromString(const char *versionStr);
/**
* The empty version "0.0.0".
*
*/
-celix_version_t* celix_version_createEmptyVersion();
+CELIX_UTILS_EXPORT celix_version_t* celix_version_createEmptyVersion();
-int celix_version_getMajor(const celix_version_t* version);
+CELIX_UTILS_EXPORT int celix_version_getMajor(const celix_version_t* version);
-int celix_version_getMinor(const celix_version_t* version);
+CELIX_UTILS_EXPORT int celix_version_getMinor(const celix_version_t* version);
-int celix_version_getMicro(const celix_version_t* version);
+CELIX_UTILS_EXPORT int celix_version_getMicro(const celix_version_t* version);
-const char* celix_version_getQualifier(const celix_version_t* version);
+CELIX_UTILS_EXPORT const char* celix_version_getQualifier(const celix_version_t* version);
/**
* Compares this <code>Version</code> object to another object.
@@ -114,12 +116,12 @@ const char* celix_version_getQualifier(const celix_version_t* version);
* @return A negative integer, zero, or a positive integer if <code>version</code> is
* less than, equal to, or greater than the <code>compare</code>.
*/
-int celix_version_compareTo(const celix_version_t* version, const celix_version_t* compare);
+CELIX_UTILS_EXPORT int celix_version_compareTo(const celix_version_t* version, const celix_version_t* compare);
/**
* Creates a hash of the version
*/
-unsigned int celix_version_hash(const celix_version_t* version);
+CELIX_UTILS_EXPORT unsigned int celix_version_hash(const celix_version_t* version);
/**
* Returns the string representation of <code>version</code> identifier.
@@ -133,7 +135,7 @@ unsigned int celix_version_hash(const celix_version_t* version);
* @param version The <code>celix_version_t*</code> to get the string representation from.
* @return Pointer to the string (char *) in which the result will be placed. Caller is owner of the string.
*/
-char* celix_version_toString(const celix_version_t* version);
+CELIX_UTILS_EXPORT char* celix_version_toString(const celix_version_t* version);
/**
* Check if two versions are semantically compatible.
@@ -146,7 +148,7 @@ char* celix_version_toString(const celix_version_t* version);
* @param version The reference provider <code>celix_version_t*</code> .
* @return Boolean indicating if the versions are compatible
*/
-bool celix_version_isCompatible(const celix_version_t* user, const celix_version_t* provider);
+CELIX_UTILS_EXPORT bool celix_version_isCompatible(const celix_version_t* user, const celix_version_t* provider);
/**
* Check if two versions are semantically compatible.
@@ -160,7 +162,7 @@ bool celix_version_isCompatible(const celix_version_t* user, const celix_version
* @param provideMinorVersionPart The minor part of the provider version
* @return Boolean indicating if the versions are compatible
*/
-bool celix_version_isUserCompatible(const celix_version_t* user, int providerMajorVersionPart, int provideMinorVersionPart);
+CELIX_UTILS_EXPORT bool celix_version_isUserCompatible(const celix_version_t* user, int providerMajorVersionPart, int provideMinorVersionPart);
/**
* Compare a provider celix version is with a provided major and minor version. Ignoring the patch version part.
@@ -171,7 +173,7 @@ bool celix_version_isUserCompatible(const celix_version_t* user, int providerMaj
* @return A negative integer, zero, or a positive integer if <code>version</code> is
* less than, equal to, or greater than the <code>majorVersionPart</code> and <code>minorVersionPart</code>.
*/
-int celix_version_compareToMajorMinor(const celix_version_t* version, int majorVersionPart, int minorVersionPart);
+CELIX_UTILS_EXPORT int celix_version_compareToMajorMinor(const celix_version_t* version, int majorVersionPart, int minorVersionPart);
#ifdef __cplusplus
}
diff --git a/libs/utils/include/celix_version_range.h b/libs/utils/include/celix_version_range.h
index b44719b4..9f677009 100644
--- a/libs/utils/include/celix_version_range.h
+++ b/libs/utils/include/celix_version_range.h
@@ -25,6 +25,7 @@
#include "celix_errno.h"
#include "celix_version.h"
+#include "celix_utils_export.h"
#ifdef __cplusplus
extern "C" {
@@ -45,7 +46,7 @@ typedef struct celix_version_range celix_version_range_t;
* @param versionRange The created range
* @return The service range or NULL if the service range could not be created
*/
-celix_version_range_t*
+CELIX_UTILS_EXPORT celix_version_range_t*
celix_versionRange_createVersionRange(celix_version_t* low, bool isLowInclusive, celix_version_t* high, bool isHighInclusive);
/**
@@ -54,9 +55,9 @@ celix_versionRange_createVersionRange(celix_version_t* low, bool isLowInclusive,
*
* @return The created range
*/
-celix_version_range_t* celix_versionRange_createInfiniteVersionRange();
+CELIX_UTILS_EXPORT celix_version_range_t* celix_versionRange_createInfiniteVersionRange();
-void celix_versionRange_destroy(celix_version_range_t* range);
+CELIX_UTILS_EXPORT void celix_versionRange_destroy(celix_version_range_t* range);
/**
* Determine if the specified version is part of the version range or not.
@@ -65,7 +66,7 @@ void celix_versionRange_destroy(celix_version_range_t* range);
* @param version The version to check.
* @return True if the specified version is included in this version range, false otherwise.
*/
-bool celix_versionRange_isInRange(const celix_version_range_t* versionRange, const celix_version_t* version);
+CELIX_UTILS_EXPORT bool celix_versionRange_isInRange(const celix_version_range_t* versionRange, const celix_version_t* version);
/**
* Determines whether the lower bound is included in the given range
@@ -73,7 +74,7 @@ bool celix_versionRange_isInRange(const celix_version_range_t* versionRange, con
* @param versionRange The range to check
* @return true in case, the lower bound the lower bound is included, otherwise false.
*/
-bool celix_versionRange_isLowInclusive(const celix_version_range_t* versionRange);
+CELIX_UTILS_EXPORT bool celix_versionRange_isLowInclusive(const celix_version_range_t* versionRange);
/**
* Determines whether the higher bound is included in the given range
@@ -81,7 +82,7 @@ bool celix_versionRange_isLowInclusive(const celix_version_range_t* versionRange
* @param versionRange The range to check.
* @return true in case, the lower bound the higher bound is included, otherwise false.
*/
-bool celix_versionRange_isHighInclusive(const celix_version_range_t* versionRange);
+CELIX_UTILS_EXPORT bool celix_versionRange_isHighInclusive(const celix_version_range_t* versionRange);
/**
* Retrieves whether the lower bound version from the given range
@@ -89,7 +90,7 @@ bool celix_versionRange_isHighInclusive(const celix_version_range_t* versionRang
* @param versionRange The range
* @param The lower bound version.
*/
-celix_version_t* celix_versionRange_getLowVersion(const celix_version_range_t* versionRange);
+CELIX_UTILS_EXPORT celix_version_t* celix_versionRange_getLowVersion(const celix_version_range_t* versionRange);
/**
* Retrieves whether the upper bound version from the given range
@@ -97,7 +98,7 @@ celix_version_t* celix_versionRange_getLowVersion(const celix_version_range_t* v
* @param versionRange The range
* @return The upper bound version.
*/
-celix_version_t* celix_versionRange_getHighVersion(const celix_version_range_t* versionRange);
+CELIX_UTILS_EXPORT celix_version_t* celix_versionRange_getHighVersion(const celix_version_range_t* versionRange);
/**
* Parses a version range from the specified string.
@@ -118,7 +119,7 @@ celix_version_t* celix_versionRange_getHighVersion(const celix_version_range_t*
* @param rangeString String representation of the version range.
* @return The created celix_version_range_t or NULL if the range string was invalid.
*/
-celix_version_range_t* celix_versionRange_parse(const char *rangeString);
+CELIX_UTILS_EXPORT celix_version_range_t* celix_versionRange_parse(const char *rangeString);
/**
* Returns the LDAP filter for a version range. Caller is owner of the returned string.
@@ -127,7 +128,7 @@ celix_version_range_t* celix_versionRange_parse(const char *rangeString);
* @param serviceVersionPropertyName The service version name to be used in the filter (i.e. service.version)
* @return LDAP filter string if valid, NULL otherwise
*/
-char* celix_versionRange_createLDAPFilter(const celix_version_range_t* range, const char *serviceVersionAttributeName);
+CELIX_UTILS_EXPORT char* celix_versionRange_createLDAPFilter(const celix_version_range_t* range, const char *serviceVersionAttributeName);
/**
* construct a LDAP filter for the provided version range.
@@ -135,7 +136,7 @@ char* celix_versionRange_createLDAPFilter(const celix_version_range_t* range, co
*
* @return True if parse successful, False otherwise.
*/
-bool celix_versionRange_createLDAPFilterInPlace(const celix_version_range_t* range, const char *serviceVersionAttributeName, char* buffer, size_t bufferLength);
+CELIX_UTILS_EXPORT bool celix_versionRange_createLDAPFilterInPlace(const celix_version_range_t* range, const char *serviceVersionAttributeName, char* buffer, size_t bufferLength);
#ifdef __cplusplus
diff --git a/libs/utils/src/celix_convert_utils.c b/libs/utils/src/celix_convert_utils.c
index 369db645..e5aa2251 100644
--- a/libs/utils/src/celix_convert_utils.c
+++ b/libs/utils/src/celix_convert_utils.c
@@ -17,13 +17,15 @@
* under the License.
*/
+#include "celix_convert_utils.h"
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+#include <ctype.h>
-#include "utils.h"
#include "celix_utils.h"
-#include "celix_version.h"
+#include "utils.h"
static bool celix_utils_isEndptrEndOfStringOrOnlyContainsWhitespaces(const char* endptr) {
bool result = false;
[celix] 09/09: Remove resolved TODO comment
Posted by pn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
pnoltes pushed a commit to branch feature/export_headers
in repository https://gitbox.apache.org/repos/asf/celix.git
commit 92230e485ee66c2d42df855394f354b39ce74cae
Author: Pepijn Noltes <pe...@gmail.com>
AuthorDate: Sun Apr 16 22:25:59 2023 +0200
Remove resolved TODO comment
---
libs/utils/CMakeLists.txt | 1 -
1 file changed, 1 deletion(-)
diff --git a/libs/utils/CMakeLists.txt b/libs/utils/CMakeLists.txt
index ead1a020..4288b872 100644
--- a/libs/utils/CMakeLists.txt
+++ b/libs/utils/CMakeLists.txt
@@ -53,7 +53,6 @@ if (CELIX_UTILS_CMAKE_CONFIGURE_ALT_OPTION)
list(GET ARGN 0 UTILS_TARGET_NAME)
target_link_libraries(${UTILS_TARGET_NAME} PRIVATE libzip::libzip)
- #TODO if hidden is set to default, we have no issues
set_target_properties(${UTILS_TARGET_NAME} PROPERTIES C_VISIBILITY_PRESET hidden)
if (NOT OPEN_MEMSTREAM_EXISTS)
target_compile_definitions(${UTILS_TARGET_NAME} PUBLIC -DCELIX_UTILS_NO_MEMSTREAM_AVAILABLE)
[celix] 06/09: Refactor framework and utils object library for export headers
Posted by pn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
pnoltes pushed a commit to branch feature/export_headers
in repository https://gitbox.apache.org/repos/asf/celix.git
commit 0e45c16994e0916a82ce213efb9cf160c564ca6d
Author: Pepijn Noltes <pe...@gmail.com>
AuthorDate: Sun Apr 16 19:59:40 2023 +0200
Refactor framework and utils object library for export headers
---
libs/framework/CMakeLists.txt | 84 +++++++++++++++++++++---------
libs/utils/CMakeLists.txt | 117 ++++++++++++++++++++++++++++++------------
2 files changed, 144 insertions(+), 57 deletions(-)
diff --git a/libs/framework/CMakeLists.txt b/libs/framework/CMakeLists.txt
index 3febe6be..302d7b83 100644
--- a/libs/framework/CMakeLists.txt
+++ b/libs/framework/CMakeLists.txt
@@ -36,32 +36,70 @@ set(SOURCES
src/celix_framework_utils.c
src/celix_module_private.h)
add_library(framework_obj OBJECT ${SOURCES})
-target_include_directories(framework_obj PUBLIC
- $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
-)
-target_include_directories(framework_obj PRIVATE ${CMAKE_CURRENT_LIST_DIR}/include_deprecated)
-target_compile_options(framework_obj PRIVATE -DUSE_FILE32API)
-target_compile_options(framework_obj PRIVATE -Wno-deprecated-declarations) #note part of the api is deprecated, ignore this warning on own api
-target_link_libraries(framework_obj PUBLIC Celix::utils ${CELIX_OPTIONAL_EXTRA_LIBS})
-target_link_libraries(framework_obj PUBLIC libuuid::libuuid CURL::libcurl ZLIB::ZLIB)
-target_link_libraries(framework_obj PRIVATE ${CMAKE_DL_LIBS})
-celix_deprecated_utils_headers(framework_obj)
-generate_export_header(framework_obj
- BASE_NAME "CELIX_FRAMWORK"
- EXPORT_FILE_NAME "${CMAKE_BINARY_DIR}/celix/gen/includes/framework/celix_framework_export.h")
-target_include_directories(utils_obj PUBLIC $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/celix/gen/includes/framework>)
+set(CELIX_FRAMEWORK_CMAKE_CONFIGURE_ALT_OPTION ON)
+if (CELIX_FRAMEWORK_CMAKE_CONFIGURE_ALT_OPTION)
+ function (celix_configure_framework_target)
+ list(GET ARGN 0 FRAMEWORK_TARGET_NAME)
-add_library(framework SHARED)
-target_link_libraries(framework PUBLIC framework_obj)
-set_target_properties(framework
- PROPERTIES
- C_VISIBILITY_PRESET hidden
- "VERSION" "${CELIX_MAJOR}.${CELIX_MINOR}.${CELIX_MICRO}"
- "SOVERSION" ${CELIX_MAJOR}
- OUTPUT_NAME "celix_framework")
+ target_include_directories(${FRAMEWORK_TARGET_NAME}
+ PRIVATE
+ ${CMAKE_CURRENT_LIST_DIR}/include_deprecated
+ PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
+ $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/celix/gen/includes/${FRAMEWORK_TARGET_NAME}>)
+ target_compile_options(${FRAMEWORK_TARGET_NAME} PRIVATE -DUSE_FILE32API)
+ target_compile_options(${FRAMEWORK_TARGET_NAME} PRIVATE -Wno-deprecated-declarations) #note part of the api is deprecated, ignore this warning on own api
+ target_link_libraries(${FRAMEWORK_TARGET_NAME} PUBLIC Celix::utils ${CELIX_OPTIONAL_EXTRA_LIBS})
+ target_link_libraries(${FRAMEWORK_TARGET_NAME} PUBLIC libuuid::libuuid CURL::libcurl ZLIB::ZLIB)
+ target_link_libraries(${FRAMEWORK_TARGET_NAME} PRIVATE ${CMAKE_DL_LIBS})
+ set_target_properties(${FRAMEWORK_TARGET_NAME} PROPERTIES C_VISIBILITY_PRESET hidden)
+ celix_deprecated_utils_headers(${FRAMEWORK_TARGET_NAME})
-celix_deprecated_utils_headers(framework)
+ generate_export_header(${FRAMEWORK_TARGET_NAME}
+ BASE_NAME "CELIX_FRAMEWORK"
+ EXPORT_FILE_NAME "${CMAKE_BINARY_DIR}/celix/gen/includes/${FRAMEWORK_TARGET_NAME}/celix_framework_export.h")
+ endfunction ()
+
+ celix_configure_framework_target(framework_obj)
+
+ add_library(framework SHARED $<TARGET_OBJECTS:framework_obj>)
+ celix_configure_framework_target(framework)
+ set_target_properties(framework
+ PROPERTIES
+ "VERSION" "${CELIX_MAJOR}.${CELIX_MINOR}.${CELIX_MICRO}"
+ "SOVERSION" ${CELIX_MAJOR}
+ OUTPUT_NAME "celix_framework")
+else ()
+ target_include_directories(framework_obj PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
+ )
+ target_include_directories(framework_obj PRIVATE ${CMAKE_CURRENT_LIST_DIR}/include_deprecated)
+ target_compile_options(framework_obj PRIVATE -DUSE_FILE32API)
+ target_compile_options(framework_obj PRIVATE -Wno-deprecated-declarations) #note part of the api is deprecated, ignore this warning on own api
+ target_link_libraries(framework_obj PUBLIC Celix::utils ${CELIX_OPTIONAL_EXTRA_LIBS})
+ target_link_libraries(framework_obj PUBLIC libuuid::libuuid CURL::libcurl ZLIB::ZLIB)
+ target_link_libraries(framework_obj PRIVATE ${CMAKE_DL_LIBS})
+ #Note visibility preset is also needed on OBJECT libraries, to work correctly
+ set_target_properties(framework_obj PROPERTIES C_VISIBILITY_PRESET hidden)
+ celix_deprecated_utils_headers(framework_obj)
+
+ generate_export_header(framework_obj
+ BASE_NAME "CELIX_FRAMEWORK"
+ EXPORT_FILE_NAME "${CMAKE_BINARY_DIR}/celix/gen/includes/framework/celix_framework_export.h")
+ target_include_directories(utils_obj PUBLIC $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/celix/gen/includes/framework>)
+
+ add_library(framework SHARED)
+ target_link_libraries(framework PUBLIC framework_obj)
+ set_target_properties(framework
+ PROPERTIES
+ C_VISIBILITY_PRESET hidden
+ "VERSION" "${CELIX_MAJOR}.${CELIX_MINOR}.${CELIX_MICRO}"
+ "SOVERSION" ${CELIX_MAJOR}
+ OUTPUT_NAME "celix_framework")
+
+ celix_deprecated_utils_headers(framework)
+endif ()
# By omitting OBJECTS DESTINATION, object files will NOT be installed.
install(TARGETS framework framework_obj EXPORT celix LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT framework
diff --git a/libs/utils/CMakeLists.txt b/libs/utils/CMakeLists.txt
index 3623a29d..ead1a020 100644
--- a/libs/utils/CMakeLists.txt
+++ b/libs/utils/CMakeLists.txt
@@ -46,43 +46,92 @@ add_library(utils_obj OBJECT
src/celix_convert_utils.c
${MEMSTREAM_SOURCES}
)
-target_link_libraries(utils_obj PRIVATE libzip::libzip)
-if (NOT OPEN_MEMSTREAM_EXISTS)
- target_compile_definitions(utils_obj PUBLIC -DCELIX_UTILS_NO_MEMSTREAM_AVAILABLE)
-endif ()
-if (ANDROID)
- target_compile_definitions(utils_obj PRIVATE -DUSE_FILE32API)
-endif ()
+set(CELIX_UTILS_CMAKE_CONFIGURE_ALT_OPTION ON)
+if (CELIX_UTILS_CMAKE_CONFIGURE_ALT_OPTION)
+ function (celix_configure_utils_target)
+ list(GET ARGN 0 UTILS_TARGET_NAME)
-if (NOT APPLE)
- target_link_libraries(utils_obj PUBLIC -lrt)
-endif ()
+ target_link_libraries(${UTILS_TARGET_NAME} PRIVATE libzip::libzip)
+ #TODO if hidden is set to default, we have no issues
+ set_target_properties(${UTILS_TARGET_NAME} PROPERTIES C_VISIBILITY_PRESET hidden)
+ if (NOT OPEN_MEMSTREAM_EXISTS)
+ target_compile_definitions(${UTILS_TARGET_NAME} PUBLIC -DCELIX_UTILS_NO_MEMSTREAM_AVAILABLE)
+ endif ()
-target_include_directories(utils_obj PUBLIC
- $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
- $<BUILD_INTERFACE:${MEMSTREAM_INCLUDE_DIR}>
- )
-target_include_directories(utils_obj PRIVATE src include_deprecated)
-IF(UNIX AND NOT ANDROID)
- target_link_libraries(utils_obj PRIVATE m pthread)
-ELSEIF(ANDROID)
- target_link_libraries(utils_obj PRIVATE m)
-ENDIF()
-
-generate_export_header(utils_obj
- BASE_NAME "CELIX_UTILS"
- EXPORT_FILE_NAME "${CMAKE_BINARY_DIR}/celix/gen/includes/utils/celix_utils_export.h")
-target_include_directories(utils_obj PUBLIC $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/celix/gen/includes/utils>)
-
-add_library(utils SHARED)
-target_link_libraries(utils PUBLIC utils_obj)
-
-set_target_properties(utils
- PROPERTIES
- C_VISIBILITY_PRESET hidden
- SOVERSION ${CELIX_MAJOR}
- OUTPUT_NAME "celix_utils")
+ if (ANDROID)
+ target_compile_definitions(${UTILS_TARGET_NAME} PRIVATE -DUSE_FILE32API)
+ endif ()
+
+ if (NOT APPLE)
+ target_link_libraries(${UTILS_TARGET_NAME} PUBLIC -lrt)
+ endif ()
+
+ target_include_directories(${UTILS_TARGET_NAME} PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
+ $<BUILD_INTERFACE:${MEMSTREAM_INCLUDE_DIR}>
+ $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/celix/gen/includes/${UTILS_TARGET_NAME}>)
+ target_include_directories(${UTILS_TARGET_NAME} PRIVATE src include_deprecated)
+ IF(UNIX AND NOT ANDROID)
+ target_link_libraries(${UTILS_TARGET_NAME} PRIVATE m pthread)
+ ELSEIF(ANDROID)
+ target_link_libraries(${UTILS_TARGET_NAME} PRIVATE m)
+ ENDIF()
+
+ generate_export_header(${UTILS_TARGET_NAME}
+ BASE_NAME "CELIX_UTILS"
+ EXPORT_FILE_NAME "${CMAKE_BINARY_DIR}/celix/gen/includes/${UTILS_TARGET_NAME}/celix_utils_export.h")
+ endfunction ()
+
+ celix_configure_utils_target(utils_obj)
+
+ add_library(utils SHARED $<TARGET_OBJECTS:utils_obj>)
+ celix_configure_utils_target(utils)
+ set_target_properties(utils
+ PROPERTIES
+ VERSION "${CELIX_MAJOR}.${CELIX_MINOR}.${CELIX_MICRO}"
+ SOVERSION ${CELIX_MAJOR}
+ OUTPUT_NAME "celix_utils")
+else ()
+ target_link_libraries(utils_obj PRIVATE libzip::libzip)
+ #Note visibility preset is also needed on OBJECT libraries, to work correctly
+ set_target_properties(utils_obj PROPERTIES C_VISIBILITY_PRESET hidden)
+ if (NOT OPEN_MEMSTREAM_EXISTS)
+ target_compile_definitions(utils_obj PUBLIC -DCELIX_UTILS_NO_MEMSTREAM_AVAILABLE)
+ endif ()
+
+ if (ANDROID)
+ target_compile_definitions(utils_obj PRIVATE -DUSE_FILE32API)
+ endif ()
+
+ if (NOT APPLE)
+ target_link_libraries(utils_obj PUBLIC -lrt)
+ endif ()
+
+ target_include_directories(utils_obj PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
+ $<BUILD_INTERFACE:${MEMSTREAM_INCLUDE_DIR}>
+ )
+ target_include_directories(utils_obj PRIVATE src include_deprecated)
+ IF(UNIX AND NOT ANDROID)
+ target_link_libraries(utils_obj PRIVATE m pthread)
+ ELSEIF(ANDROID)
+ target_link_libraries(utils_obj PRIVATE m)
+ ENDIF()
+
+ add_library(utils SHARED)
+ target_link_libraries(utils PUBLIC utils_obj)
+ generate_export_header(utils
+ BASE_NAME "CELIX_UTILS"
+ EXPORT_FILE_NAME "${CMAKE_BINARY_DIR}/celix/gen/includes/utils/celix_utils_export.h")
+ target_include_directories(utils_obj PUBLIC $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/celix/gen/includes/utils>)
+
+ set_target_properties(utils
+ PROPERTIES
+ C_VISIBILITY_PRESET hidden
+ SOVERSION ${CELIX_MAJOR}
+ OUTPUT_NAME "celix_utils")
+endif ()
# By omitting OBJECTS DESTINATION, object files will NOT be installed.
install(TARGETS utils utils_obj EXPORT celix LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT framework
[celix] 08/09: Add export macro for private functions used in unit tests
Posted by pn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
pnoltes pushed a commit to branch feature/export_headers
in repository https://gitbox.apache.org/repos/asf/celix.git
commit 01cdb31d42493c29bd2a7d6817d61ba6c65f7c52
Author: Pepijn Noltes <pe...@gmail.com>
AuthorDate: Sun Apr 16 22:04:07 2023 +0200
Add export macro for private functions used in unit tests
---
.../BundleArchiveWithErrorInjectionTestSuite.cc | 28 +++++++++++-----------
libs/framework/src/bundle_archive.c | 6 ++---
libs/framework/src/bundle_archive_private.h | 4 ++--
libs/framework/src/bundle_revision.c | 4 ++--
libs/framework/src/bundle_revision_private.h | 4 +++-
libs/framework/src/celix_bundle_cache.c | 2 +-
6 files changed, 25 insertions(+), 23 deletions(-)
diff --git a/libs/framework/gtest/src/BundleArchiveWithErrorInjectionTestSuite.cc b/libs/framework/gtest/src/BundleArchiveWithErrorInjectionTestSuite.cc
index 238535eb..350fd3f1 100644
--- a/libs/framework/gtest/src/BundleArchiveWithErrorInjectionTestSuite.cc
+++ b/libs/framework/gtest/src/BundleArchiveWithErrorInjectionTestSuite.cc
@@ -27,9 +27,9 @@
#include "asprintf_ei.h"
//extern declarations for testing purposes. Note signatures are not correct, but that is not important for the test.
-extern "C" celix_status_t bundleArchive_create(void);
+extern "C" celix_status_t celix_bundleArchive_create(void);
extern "C" celix_status_t manifest_create(void);
-extern "C" celix_status_t bundleRevision_create(void);
+extern "C" celix_status_t celix_bundleRevision_create(void);
class BundleArchiveWithErrorInjectionTestSuite : public ::testing::Test {
public:
@@ -75,12 +75,12 @@ protected:
TEST_F(BundleArchiveWithErrorInjectionTestSuite, BundleArchiveCreatedFailedTest) {
teardownErrorInjectors();
//Given a mocked calloc which returns NULL from a (indirect) call from bundleArchive_create
- celix_ei_expect_calloc((void*)bundleArchive_create, 1, nullptr);
+ celix_ei_expect_calloc((void*)celix_bundleArchive_create, 1, nullptr);
installBundleAndExpectFailure();
teardownErrorInjectors();
//Given a mocked celix_utils_strdup which returns NULL from a (indirect) call from bundleArchive_create
- celix_ei_expect_celix_utils_strdup((void*)bundleArchive_create, 1, nullptr);
+ celix_ei_expect_celix_utils_strdup((void*)celix_bundleArchive_create, 1, nullptr);
installBundleAndExpectFailure();
teardownErrorInjectors();
@@ -90,15 +90,15 @@ TEST_F(BundleArchiveWithErrorInjectionTestSuite, BundleArchiveCreatedFailedTest)
teardownErrorInjectors();
//Given a mocked calloc which returns NULL from a call from bundleRevision_create
- celix_ei_expect_calloc((void*)bundleRevision_create, 0, nullptr);
+ celix_ei_expect_calloc((void*)celix_bundleRevision_create, 0, nullptr);
installBundleAndExpectFailure();
teardownErrorInjectors();
//Given a mocked celix_utils_strdup which returns NULL from a call from bundleRevision_create
- celix_ei_expect_celix_utils_strdup((void*)bundleRevision_create, 0, nullptr);
+ celix_ei_expect_celix_utils_strdup((void*)celix_bundleRevision_create, 0, nullptr);
installBundleAndExpectFailure();
- celix_ei_expect_celix_utils_strdup((void*)bundleRevision_create, 0, nullptr, 2);
+ celix_ei_expect_celix_utils_strdup((void*)celix_bundleRevision_create, 0, nullptr, 2);
installBundleAndExpectFailure();
}
@@ -106,38 +106,38 @@ TEST_F(BundleArchiveWithErrorInjectionTestSuite, BundleArchiveCreateCacheDirecto
teardownErrorInjectors();
//Given a mocked celix_utils_createDirectory which returns CELIX_FILE_IO_EXCEPTION from a (indirect) call from
//bundleArchive_create
- celix_ei_expect_celix_utils_createDirectory((void*)bundleArchive_create, 2, CELIX_FILE_IO_EXCEPTION);
+ celix_ei_expect_celix_utils_createDirectory((void*)celix_bundleArchive_create, 2, CELIX_FILE_IO_EXCEPTION);
installBundleAndExpectFailure();
teardownErrorInjectors();
//Given a mocked asprintf which returns -1 from a (indirect) call from bundleArchive_create
- celix_ei_expect_asprintf((void*)bundleArchive_create, 2, -1);
+ celix_ei_expect_asprintf((void*)celix_bundleArchive_create, 2, -1);
installBundleAndExpectFailure();
teardownErrorInjectors();
//Given a mocked celix_utils_createDirectory which returns CELIX_FILE_IO_EXCEPTION from a second (indirect) call
// from bundleArchive_create
- celix_ei_expect_celix_utils_createDirectory((void*)bundleArchive_create, 2, CELIX_FILE_IO_EXCEPTION, 2);
+ celix_ei_expect_celix_utils_createDirectory((void*)celix_bundleArchive_create, 2, CELIX_FILE_IO_EXCEPTION, 2);
installBundleAndExpectFailure();
teardownErrorInjectors();
//Given a mocked asprintf which returns -1 from a (indirect) call from bundleArchive_create
- celix_ei_expect_asprintf((void*)bundleArchive_create, 2, -1, 2);
+ celix_ei_expect_asprintf((void*)celix_bundleArchive_create, 2, -1, 2);
installBundleAndExpectFailure();
teardownErrorInjectors();
//Given a mocked celix_utils_createDirectory which returns CELIX_FILE_IO_EXCEPTION from a third (indirect) call
// from bundleArchive_create
- celix_ei_expect_celix_utils_createDirectory((void*)bundleArchive_create, 2, CELIX_FILE_IO_EXCEPTION, 3);
+ celix_ei_expect_celix_utils_createDirectory((void*)celix_bundleArchive_create, 2, CELIX_FILE_IO_EXCEPTION, 3);
installBundleAndExpectFailure();
teardownErrorInjectors();
//Given a mocked celix_utils_strdup which returns NULL from a (indirect) call from bundleArchive_create
- celix_ei_expect_celix_utils_strdup((void*)bundleArchive_create, 2, nullptr);
+ celix_ei_expect_celix_utils_strdup((void*)celix_bundleArchive_create, 2, nullptr);
installBundleAndExpectFailure();
teardownErrorInjectors();
//Given a mocked celix_utils_strdup which returns NULL from a second (indirect) call from bundleArchive_create
- celix_ei_expect_celix_utils_strdup((void*)bundleArchive_create, 2, nullptr, 2);
+ celix_ei_expect_celix_utils_strdup((void*)celix_bundleArchive_create, 2, nullptr, 2);
installBundleAndExpectFailure();
}
diff --git a/libs/framework/src/bundle_archive.c b/libs/framework/src/bundle_archive.c
index 87856a9a..b06300b8 100644
--- a/libs/framework/src/bundle_archive.c
+++ b/libs/framework/src/bundle_archive.c
@@ -263,9 +263,9 @@ celix_status_t celix_bundleArchive_createArchiveInternal(celix_framework_t* fw,
}
if (archive->isSystemBundle) {
- status = bundleRevision_create(fw, archive->archiveRoot, NULL, manifest, &archive->revision);
+ status = celix_bundleRevision_create(fw, archive->archiveRoot, NULL, manifest, &archive->revision);
} else {
- status = bundleRevision_create(fw, archive->archiveRoot, archive->location, manifest, &archive->revision);
+ status = celix_bundleRevision_create(fw, archive->archiveRoot, archive->location, manifest, &archive->revision);
}
if (status != CELIX_SUCCESS) {
fw_logCode(fw->logger, CELIX_LOG_LEVEL_ERROR, status, "Could not create archive. Could not create bundle revision.");
@@ -281,7 +281,7 @@ celix_status_t celix_bundleArchive_createArchiveInternal(celix_framework_t* fw,
return status;
}
-celix_status_t bundleArchive_create(celix_framework_t* fw, const char *archiveRoot, long id, const char *location, bundle_archive_pt *bundle_archive) {
+celix_status_t celix_bundleArchive_create(celix_framework_t* fw, const char *archiveRoot, long id, const char *location, bundle_archive_pt *bundle_archive) {
return celix_bundleArchive_createArchiveInternal(fw, archiveRoot, id, location, bundle_archive);
}
diff --git a/libs/framework/src/bundle_archive_private.h b/libs/framework/src/bundle_archive_private.h
index aafd28c5..f4974cf5 100644
--- a/libs/framework/src/bundle_archive_private.h
+++ b/libs/framework/src/bundle_archive_private.h
@@ -41,9 +41,9 @@ extern "C" {
/**
* @brief Create bundle archive.
- *
+ * @note Symbol exported for testing purposes.
*/
-celix_status_t bundleArchive_create(celix_framework_t* fw, const char *archiveRoot, long id, const char *location, bundle_archive_pt *bundle_archive);
+CELIX_FRAMEWORK_EXPORT celix_status_t celix_bundleArchive_create(celix_framework_t* fw, const char *archiveRoot, long id, const char *location, bundle_archive_pt *bundle_archive);
celix_status_t bundleArchive_destroy(bundle_archive_pt archive);
diff --git a/libs/framework/src/bundle_revision.c b/libs/framework/src/bundle_revision.c
index 704d7679..febbeb41 100644
--- a/libs/framework/src/bundle_revision.c
+++ b/libs/framework/src/bundle_revision.c
@@ -23,7 +23,7 @@
#include "bundle_revision_private.h"
#include "framework_private.h"
-celix_status_t bundleRevision_create(celix_framework_t* fw, const char *root, const char *location, manifest_pt manifest, bundle_revision_pt *bundle_revision) {
+celix_status_t celix_bundleRevision_create(celix_framework_t* fw, const char *root, const char *location, manifest_pt manifest, bundle_revision_pt *bundle_revision) {
celix_status_t status = CELIX_SUCCESS;
bundle_revision_pt revision = calloc(1, sizeof(*revision));
if (revision != NULL) {
@@ -55,7 +55,7 @@ celix_status_t bundleRevision_create(celix_framework_t* fw, const char *root, co
bundle_revision_t* bundleRevision_revise(const bundle_revision_t* rev, const char* updatedBundleUrl) {
bundle_revision_pt newRev = NULL;
manifest_pt clonedManifest = manifest_clone(rev->manifest);
- bundleRevision_create(rev->fw, rev->root, updatedBundleUrl, clonedManifest, &newRev);
+ celix_bundleRevision_create(rev->fw, rev->root, updatedBundleUrl, clonedManifest, &newRev);
return newRev;
}
diff --git a/libs/framework/src/bundle_revision_private.h b/libs/framework/src/bundle_revision_private.h
index b74dc92b..7a165339 100644
--- a/libs/framework/src/bundle_revision_private.h
+++ b/libs/framework/src/bundle_revision_private.h
@@ -50,6 +50,8 @@ struct bundleRevision {
* Creates a new revision for the given inputFile or location.
* The location parameter is used to identify the bundle.
*
+ * @note Symbol exported for testing purposes.
+ *
* @param fw The Celix framework where to create the bundle revision.
* @param root The root for this revision in which the bundle is extracted and state is stored.
* @param location The location associated with the revision.
@@ -60,7 +62,7 @@ struct bundleRevision {
* - CELIX_SUCCESS when no errors are encountered.
* - CELIX_ENOMEM If allocating memory for <code>bundle_revision</code> failed.
*/
-celix_status_t bundleRevision_create(celix_framework_t* fw, const char *root, const char *location, manifest_pt manifest, bundle_revision_pt *bundle_revision);
+CELIX_FRAMEWORK_EXPORT celix_status_t celix_bundleRevision_create(celix_framework_t* fw, const char *root, const char *location, manifest_pt manifest, bundle_revision_pt *bundle_revision);
bundle_revision_t* bundleRevision_revise(const bundle_revision_t* revision, const char* updatedBundleUrl);
diff --git a/libs/framework/src/celix_bundle_cache.c b/libs/framework/src/celix_bundle_cache.c
index d4a7941c..c315164a 100644
--- a/libs/framework/src/celix_bundle_cache.c
+++ b/libs/framework/src/celix_bundle_cache.c
@@ -193,7 +193,7 @@ celix_status_t celix_bundleCache_createArchive(celix_framework_t* fw, long id, c
char *archiveRoot = celix_utils_writeOrCreateString(archiveRootBuffer, sizeof(archiveRootBuffer), CELIX_BUNDLE_ARCHIVE_ROOT_FORMAT, fw->cache->cacheDir, id);
if (archiveRoot) {
celixThreadMutex_lock(&fw->cache->mutex);
- status = bundleArchive_create(fw, archiveRoot, id, location, &archive);
+ status = celix_bundleArchive_create(fw, archiveRoot, id, location, &archive);
celixThreadMutex_unlock(&fw->cache->mutex);
celix_utils_freeStringIfNotEqual(archiveRootBuffer, archiveRoot);
} else {
[celix] 01/09: Add export header for etcdlib
Posted by pn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
pnoltes pushed a commit to branch feature/export_headers
in repository https://gitbox.apache.org/repos/asf/celix.git
commit 35ecfceb4855be5c0e76bdae0fbad54cb520ab79
Author: Pepijn Noltes <pe...@gmail.com>
AuthorDate: Sun Apr 16 10:34:17 2023 +0200
Add export header for etcdlib
---
CMakeLists.txt | 3 +++
libs/dfi/include/dyn_interface.h | 24 +++++++++++------------
libs/dfi/include/json_rpc.h | 7 ++++---
libs/dfi/include/json_serializer.h | 9 +++++----
libs/etcdlib/CMakeLists.txt | 39 ++++++++++++++++++++++----------------
libs/etcdlib/api/etcd.h | 25 ++++++++++++------------
libs/etcdlib/api/etcdlib.h | 23 +++++++++++-----------
libs/utils/CMakeLists.txt | 17 +++++++----------
8 files changed, 79 insertions(+), 68 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f75072df..dbc06c44 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -196,6 +196,9 @@ include(CheckLinkerFlag)
check_linker_flag(CXX LINKER:--wrap,celix_nonexistent_symbol LINKER_WRAP_SUPPORTED)
cmake_pop_check_state()
+#Add generate_export_header to cmake
+include(GenerateExportHeader)
+
#Libraries and Launcher
add_subdirectory(libs)
diff --git a/libs/dfi/include/dyn_interface.h b/libs/dfi/include/dyn_interface.h
index 2e080fa7..6927485a 100644
--- a/libs/dfi/include/dyn_interface.h
+++ b/libs/dfi/include/dyn_interface.h
@@ -24,8 +24,8 @@
#include "dyn_type.h"
#include "dyn_function.h"
#include "dfi_log_util.h"
-
#include "celix_version.h"
+#include "celix_df_export.h"
#ifdef __cplusplus
extern "C" {
@@ -57,20 +57,20 @@ struct method_entry {
TAILQ_ENTRY(method_entry) entries;
};
-int dynInterface_parse(FILE *descriptor, dyn_interface_type **out);
-void dynInterface_destroy(dyn_interface_type *intf);
+CELIX_DFI_EXPORT int dynInterface_parse(FILE *descriptor, dyn_interface_type **out);
+CELIX_DFI_EXPORT void dynInterface_destroy(dyn_interface_type *intf);
-int dynInterface_getName(dyn_interface_type *intf, char **name);
-int dynInterface_getVersion(dyn_interface_type *intf, celix_version_t** version);
-int dynInterface_getVersionString(dyn_interface_type *intf, char **version);
-int dynInterface_getHeaderEntry(dyn_interface_type *intf, const char *name, char **value);
-int dynInterface_getAnnotationEntry(dyn_interface_type *intf, const char *name, char **value);
-int dynInterface_methods(dyn_interface_type *intf, struct methods_head **list);
-int dynInterface_nrOfMethods(dyn_interface_type *intf);
+CELIX_DFI_EXPORT int dynInterface_getName(dyn_interface_type *intf, char **name);
+CELIX_DFI_EXPORT int dynInterface_getVersion(dyn_interface_type *intf, celix_version_t** version);
+CELIX_DFI_EXPORT int dynInterface_getVersionString(dyn_interface_type *intf, char **version);
+CELIX_DFI_EXPORT int dynInterface_getHeaderEntry(dyn_interface_type *intf, const char *name, char **value);
+CELIX_DFI_EXPORT int dynInterface_getAnnotationEntry(dyn_interface_type *intf, const char *name, char **value);
+CELIX_DFI_EXPORT int dynInterface_methods(dyn_interface_type *intf, struct methods_head **list);
+CELIX_DFI_EXPORT int dynInterface_nrOfMethods(dyn_interface_type *intf);
// Avpr parsing
-dyn_interface_type * dynInterface_parseAvprWithStr(const char * avpr);
-dyn_interface_type * dynInterface_parseAvpr(FILE * avprStream);
+CELIX_DFI_DEPRECATED_EXPORT dyn_interface_type * dynInterface_parseAvprWithStr(const char * avpr);
+CELIX_DFI_DEPRECATED_EXPORT dyn_interface_type * dynInterface_parseAvpr(FILE * avprStream);
#ifdef __cplusplus
}
diff --git a/libs/dfi/include/json_rpc.h b/libs/dfi/include/json_rpc.h
index 363d051e..68783fa8 100644
--- a/libs/dfi/include/json_rpc.h
+++ b/libs/dfi/include/json_rpc.h
@@ -25,6 +25,7 @@
#include "dyn_type.h"
#include "dyn_function.h"
#include "dyn_interface.h"
+#include "celix_df_export.h"
#ifdef __cplusplus
extern "C" {
@@ -33,11 +34,11 @@ extern "C" {
//logging
DFI_SETUP_LOG_HEADER(jsonRpc);
-int jsonRpc_call(dyn_interface_type *intf, void *service, const char *request, char **out);
+CELIX_DFI_EXPORT int jsonRpc_call(dyn_interface_type *intf, void *service, const char *request, char **out);
-int jsonRpc_prepareInvokeRequest(dyn_function_type *func, const char *id, void *args[], char **out);
-int jsonRpc_handleReply(dyn_function_type *func, const char *reply, void *args[], int *rsErrno);
+CELIX_DFI_EXPORT int jsonRpc_prepareInvokeRequest(dyn_function_type *func, const char *id, void *args[], char **out);
+CELIX_DFI_EXPORT int jsonRpc_handleReply(dyn_function_type *func, const char *reply, void *args[], int *rsErrno);
#ifdef __cplusplus
}
diff --git a/libs/dfi/include/json_serializer.h b/libs/dfi/include/json_serializer.h
index 7ff1d610..91311dcf 100644
--- a/libs/dfi/include/json_serializer.h
+++ b/libs/dfi/include/json_serializer.h
@@ -25,6 +25,7 @@
#include "dyn_type.h"
#include "dyn_function.h"
#include "dyn_interface.h"
+#include "celix_df_export.h"
#ifdef __cplusplus
extern "C" {
@@ -33,11 +34,11 @@ extern "C" {
//logging
DFI_SETUP_LOG_HEADER(jsonSerializer);
-int jsonSerializer_deserialize(dyn_type *type, const char *input, size_t length, void **result);
-int jsonSerializer_deserializeJson(dyn_type *type, json_t *input, void **result);
+CELIX_DFI_EXPORT int jsonSerializer_deserialize(dyn_type *type, const char *input, size_t length, void **result);
+CELIX_DFI_EXPORT int jsonSerializer_deserializeJson(dyn_type *type, json_t *input, void **result);
-int jsonSerializer_serialize(dyn_type *type, const void* input, char **output);
-int jsonSerializer_serializeJson(dyn_type *type, const void* input, json_t **out);
+CELIX_DFI_EXPORT int jsonSerializer_serialize(dyn_type *type, const void* input, char **output);
+CELIX_DFI_EXPORT int jsonSerializer_serializeJson(dyn_type *type, const void* input, json_t **out);
#ifdef __cplusplus
}
diff --git a/libs/etcdlib/CMakeLists.txt b/libs/etcdlib/CMakeLists.txt
index 885bb38a..760b8bad 100644
--- a/libs/etcdlib/CMakeLists.txt
+++ b/libs/etcdlib/CMakeLists.txt
@@ -54,32 +54,39 @@ endif ()
if (CELIX_ETCDLIB OR ETCDLIB_STANDALONE)
find_package(jansson REQUIRED)
- add_library(etcdlib SHARED
- src/etcd.c
- )
- target_include_directories(etcdlib PUBLIC
- $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/api>
- )
- target_include_directories(etcdlib PRIVATE src)
- set_target_properties(etcdlib PROPERTIES SOVERSION 1)
- set_target_properties(etcdlib PROPERTIES VERSION 1.0.0)
+ add_library(etcdlib SHARED src/etcd.c)
+ target_include_directories(etcdlib PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/api>)
+ target_include_directories(etcdlib PRIVATE src)
+ set_target_properties(etcdlib
+ PROPERTIES
+ VERSION 1.0.0
+ SOVERSION 1
+ C_VISIBILITY_PRESET hidden
+ VISIBILITY_INLINES_HIDDEN ON
+ )
target_link_libraries(etcdlib PUBLIC CURL::libcurl jansson::jansson ${CELIX_OPTIONAL_EXTRA_LIBS})
- add_library(etcdlib_static STATIC
- src/etcd.c
- )
- target_include_directories(etcdlib_static PUBLIC
- $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/api>
- )
+ generate_export_header(etcdlib
+ BASE_NAME "ETCDLIB"
+ EXPORT_FILE_NAME "${CMAKE_BINARY_DIR}/celix/gen/includes/etcdlib/etcdlib_export.h")
+ target_include_directories(etcdlib PUBLIC $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/celix/gen/includes/etcdlib>)
+
+
+ add_library(etcdlib_static STATIC src/etcd.c)
+ target_include_directories(etcdlib_static PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/api>)
target_include_directories(etcdlib_static PRIVATE src)
- set_target_properties(etcdlib_static PROPERTIES "SOVERSION" 1)
+ set_target_properties(etcdlib_static
+ PROPERTIES
+ POSITION_INDEPENDENT_CODE 1
+ OUTPUT_NAME "celix_etcdlib_static")
target_link_libraries(etcdlib_static PUBLIC CURL::libcurl jansson::jansson ${CELIX_OPTIONAL_EXTRA_LIBS})
add_executable(etcdlib_test ${CMAKE_CURRENT_SOURCE_DIR}/test/etcdlib_test.c)
target_link_libraries(etcdlib_test PRIVATE etcdlib_static CURL::libcurl jansson::jansson)
install(DIRECTORY api/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/etcdlib COMPONENT ${ETCDLIB_CMP})
+ install(DIRECTORY ${CMAKE_BINARY_DIR}/celix/gen/includes/etcdlib/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/etcdlib COMPONENT ${ETCDLIB_CMP})
if (NOT COMMAND celix_subproject)
install(TARGETS etcdlib etcdlib_static DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT ${ETCDLIB_CMP}
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/etcdlib)
diff --git a/libs/etcdlib/api/etcd.h b/libs/etcdlib/api/etcd.h
index 4b6fe2fd..6555c6b4 100644
--- a/libs/etcdlib/api/etcd.h
+++ b/libs/etcdlib/api/etcd.h
@@ -26,8 +26,7 @@ extern "C"
#endif
#include "etcdlib.h"
-
-#define DEP_ATTRIBUTE __attribute__((deprecated("etcd_ call are placed by etcdlib_ calls, use etcdlib.h instead of etcd.h")))
+#include "etcdlib_export.h"
/**
* @desc Initialize the ETCD-LIB with the server/port where Etcd can be reached.
@@ -36,7 +35,7 @@ extern "C"
* @param int flags. bitwise flags to control etcdlib initialization.
* @return 0 on success, non zero otherwise.
*/
-int etcd_init(const char* server, int port, int flags) DEP_ATTRIBUTE;
+ETCDLIB_DEPRECATED_EXPORT int etcd_init(const char* server, int port, int flags);
/**
* @desc Retrieve a single value from Etcd.
@@ -45,7 +44,7 @@ int etcd_init(const char* server, int port, int flags) DEP_ATTRIBUTE;
* @param int* modifiedIndex. If not NULL the Etcd-index of the last modified value.
* @return 0 on success, non zero otherwise
*/
-int etcd_get(const char* key, char** value, int* modifiedIndex) DEP_ATTRIBUTE;
+ETCDLIB_DEPRECATED_EXPORT int etcd_get(const char* key, char** value, int* modifiedIndex);
/**
* @desc Retrieve the contents of a directory. For every found key/value pair the given callback function is called.
@@ -55,7 +54,11 @@ int etcd_get(const char* key, char** value, int* modifiedIndex) DEP_ATTRIBUTE;
* @param int* modifiedIndex. If not NULL the Etcd-index of the last modified value.
* @return 0 on success, non zero otherwise
*/
-int etcd_get_directory(const char* directory, etcdlib_key_value_callback callback, void *arg, long long* modifiedIndex) DEP_ATTRIBUTE;
+ETCDLIB_DEPRECATED_EXPORT int etcd_get_directory(
+ const char* directory,
+ etcdlib_key_value_callback callback,
+ void *arg,
+ long long* modifiedIndex);
/**
* @desc Setting an Etcd-key/value
@@ -65,7 +68,7 @@ int etcd_get_directory(const char* directory, etcdlib_key_value_callback callbac
* @param bool prevExist. If true the value is only set when the key already exists, if false it is always set
* @return 0 on success, non zero otherwise
*/
-int etcd_set(const char* key, const char* value, int ttl, bool prevExist) DEP_ATTRIBUTE;
+ETCDLIB_DEPRECATED_EXPORT int etcd_set(const char* key, const char* value, int ttl, bool prevExist);
/**
* @desc Refresh the ttl of an existing key.
@@ -73,7 +76,7 @@ int etcd_set(const char* key, const char* value, int ttl, bool prevExist) DEP_AT
* @param ttl the ttl value to use.
* @return 0 on success, non zero otherwise.
*/
-int etcd_refresh(const char *key, int ttl) DEP_ATTRIBUTE;
+ETCDLIB_DEPRECATED_EXPORT int etcd_refresh(const char *key, int ttl);
/**
* @desc Setting an Etcd-key/value and checks if there is a different previous value
@@ -83,14 +86,14 @@ int etcd_refresh(const char *key, int ttl) DEP_ATTRIBUTE;
* @param bool always_write. If true the value is written, if false only when the given value is equal to the value in etcd.
* @return 0 on success, non zero otherwise
*/
-int etcd_set_with_check(const char* key, const char* value, int ttl, bool always_write) DEP_ATTRIBUTE;
+ETCDLIB_DEPRECATED_EXPORT int etcd_set_with_check(const char* key, const char* value, int ttl, bool always_write);
/**
* @desc Deleting an Etcd-key
* @param const char* key. The Etcd-key (Note: a leading '/' should be avoided)
* @return 0 on success, non zero otherwise
*/
-int etcd_del(const char* key) DEP_ATTRIBUTE;
+ETCDLIB_DEPRECATED_EXPORT int etcd_del(const char* key);
/**
* @desc Watching an etcd directory for changes
@@ -103,9 +106,7 @@ int etcd_del(const char* key) DEP_ATTRIBUTE;
* @param long long* modifiedIndex. If not NULL, the index of the modification is written.
* @return ETCDLIB_RC_OK (0) on success, non zero otherwise. Note that a timeout is signified by a ETCDLIB_RC_TIMEOUT return code.
*/
-int etcd_watch(const char* key, long long index, char** action, char** prevValue, char** value, char** rkey, long long* modifiedIndex) DEP_ATTRIBUTE;
-
-#undef DEP_ATTRIBUTE
+ETCDLIB_DEPRECATED_EXPORT int etcd_watch(const char* key, long long index, char** action, char** prevValue, char** value, char** rkey, long long* modifiedIndex);
#ifdef __cplusplus
}
diff --git a/libs/etcdlib/api/etcdlib.h b/libs/etcdlib/api/etcdlib.h
index 809163e6..19b63133 100644
--- a/libs/etcdlib/api/etcdlib.h
+++ b/libs/etcdlib/api/etcdlib.h
@@ -26,6 +26,7 @@ extern "C"
#endif
#include <stdbool.h>
+#include "etcdlib_export.h"
/*
* If set etcdlib will _not_ initialize curl
@@ -57,23 +58,23 @@ typedef void (*etcdlib_key_value_callback) (const char *key, const char *value,
* @param int flags. bitwise flags to control etcdlib initialization.
* @return Pointer to the etcdlib_t struct needed by subsequent api calls
*/
-etcdlib_t* etcdlib_create(const char* server, int port, int flags);
+ETCDLIB_EXPORT etcdlib_t* etcdlib_create(const char* server, int port, int flags);
/**
* @desc Destroys the ETCD-LIB. with the server/port where Etcd can be reached.
* @param etcdlib_t* The ETCD-LIB instance.
*/
-void etcdlib_destroy(etcdlib_t *etcdlib);
+ETCDLIB_EXPORT void etcdlib_destroy(etcdlib_t *etcdlib);
/**
* Returns the configured etcd host for etcdlib.
*/
-const char* etcdlib_host(etcdlib_t *etcdlib);
+ETCDLIB_EXPORT const char* etcdlib_host(etcdlib_t *etcdlib);
/**
* Returns the configured etcd port for etcdlib.
*/
-int etcdlib_port(etcdlib_t *etcdlib);
+ETCDLIB_EXPORT int etcdlib_port(etcdlib_t *etcdlib);
/**
* @desc Retrieve a single value from Etcd.
@@ -83,7 +84,7 @@ int etcdlib_port(etcdlib_t *etcdlib);
* @param int* modifiedIndex. If not NULL the Etcd-index of the last modified value.
* @return 0 on success, non zero otherwise
*/
-int etcdlib_get(etcdlib_t *etcdlib, const char* key, char** value, int* modifiedIndex);
+ETCDLIB_EXPORT int etcdlib_get(etcdlib_t *etcdlib, const char* key, char** value, int* modifiedIndex);
/**
* @desc Retrieve the contents of a directory. For every found key/value pair the given callback function is called.
@@ -94,7 +95,7 @@ int etcdlib_get(etcdlib_t *etcdlib, const char* key, char** value, int* modified
* @param int* modifiedIndex. If not NULL the Etcd-index of the last modified value.
* @return 0 on success, non zero otherwise
*/
-int etcdlib_get_directory(etcdlib_t *etcdlib, const char* directory, etcdlib_key_value_callback callback, void *arg, long long* modifiedIndex);
+ETCDLIB_EXPORT int etcdlib_get_directory(etcdlib_t *etcdlib, const char* directory, etcdlib_key_value_callback callback, void *arg, long long* modifiedIndex);
/**
* @desc Setting an Etcd-key/value
@@ -105,7 +106,7 @@ int etcdlib_get_directory(etcdlib_t *etcdlib, const char* directory, etcdlib_key
* @param bool prevExist. If true the value is only set when the key already exists, if false it is always set
* @return 0 on success, non zero otherwise
*/
-int etcdlib_set(etcdlib_t *etcdlib, const char* key, const char* value, int ttl, bool prevExist);
+ETCDLIB_EXPORT int etcdlib_set(etcdlib_t *etcdlib, const char* key, const char* value, int ttl, bool prevExist);
/**
* @desc Refresh the ttl of an existing key.
@@ -114,7 +115,7 @@ int etcdlib_set(etcdlib_t *etcdlib, const char* key, const char* value, int ttl,
* @param ttl the ttl value to use.
* @return 0 on success, non zero otherwise.
*/
-int etcdlib_refresh(etcdlib_t *etcdlib, const char *key, int ttl);
+ETCDLIB_EXPORT int etcdlib_refresh(etcdlib_t *etcdlib, const char *key, int ttl);
/**
* @desc Setting an Etcd-key/value and checks if there is a different previous value
@@ -125,7 +126,7 @@ int etcdlib_refresh(etcdlib_t *etcdlib, const char *key, int ttl);
* @param bool always_write. If true the value is written, if false only when the given value is equal to the value in etcd.
* @return 0 on success, non zero otherwise
*/
-int etcdlib_set_with_check(etcdlib_t *etcdlib, const char* key, const char* value, int ttl, bool always_write);
+ETCDLIB_EXPORT int etcdlib_set_with_check(etcdlib_t *etcdlib, const char* key, const char* value, int ttl, bool always_write);
/**
* @desc Deleting an Etcd-key
@@ -133,7 +134,7 @@ int etcdlib_set_with_check(etcdlib_t *etcdlib, const char* key, const char* valu
* @param const char* key. The Etcd-key (Note: a leading '/' should be avoided)
* @return 0 on success, non zero otherwise
*/
-int etcdlib_del(etcdlib_t *etcdlib, const char* key);
+ETCDLIB_EXPORT int etcdlib_del(etcdlib_t *etcdlib, const char* key);
/**
* @desc Watching an etcd directory for changes
@@ -147,7 +148,7 @@ int etcdlib_del(etcdlib_t *etcdlib, const char* key);
* @param long long* modifiedIndex. If not NULL, the index of the modification is written.
* @return ETCDLIB_RC_OK (0) on success, non zero otherwise. Note that a timeout is signified by a ETCDLIB_RC_TIMEOUT return code.
*/
-int etcdlib_watch(etcdlib_t *etcdlib, const char* key, long long index, char** action, char** prevValue, char** value, char** rkey, long long* modifiedIndex);
+ETCDLIB_EXPORT int etcdlib_watch(etcdlib_t *etcdlib, const char* key, long long index, char** action, char** prevValue, char** value, char** rkey, long long* modifiedIndex);
#ifdef __cplusplus
}
diff --git a/libs/utils/CMakeLists.txt b/libs/utils/CMakeLists.txt
index d1381656..87ba290b 100644
--- a/libs/utils/CMakeLists.txt
+++ b/libs/utils/CMakeLists.txt
@@ -70,32 +70,29 @@ ELSEIF(ANDROID)
target_link_libraries(utils_obj PRIVATE m)
ENDIF()
-include(GenerateExportHeader)
generate_export_header(utils_obj
BASE_NAME "CELIX_UTILS"
- EXPORT_FILE_NAME "${CMAKE_CURRENT_BINARY_DIR}/gen_include/celix_utils_export.h")
-target_include_directories(utils_obj PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/gen_include>)
+ EXPORT_FILE_NAME "${CMAKE_BINARY_DIR}/celix/gen/includes/utils/celix_utils_export.h")
+target_include_directories(utils_obj PUBLIC $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/celix/gen/includes/utils>)
add_library(utils SHARED)
target_link_libraries(utils PUBLIC utils_obj)
set_target_properties(utils
PROPERTIES
- CXX_VISIBILITY_PRESET hidden
C_VISIBILITY_PRESET hidden
VISIBILITY_INLINES_HIDDEN true
SOVERSION ${CELIX_MAJOR}
- OUTPUT_NAME "celix_utils"
-)
+ OUTPUT_NAME "celix_utils")
# By omitting OBJECTS DESTINATION, object files will NOT be installed.
install(TARGETS utils utils_obj EXPORT celix LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT framework
- INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/celix_utils)
+ INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/$<TARGET_PROPERTY:utils,OUTPUT_NAME>)
install(DIRECTORY include/
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/celix_utils
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/celix_utils/
COMPONENT framework PATTERN memstream* EXCLUDE)
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/gen_include/celix_utils_export.h
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/celix_utils
+install(DIRECTORY ${CMAKE_BINARY_DIR}/celix/gen/includes/utils/
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/celix_utils/
COMPONENT framework)
if (CELIX_INSTALL_DEPRECATED_API)
[celix] 04/09: Remove VISIBILITY_INLINES_HIDDEN from c libs visibility config
Posted by pn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
pnoltes pushed a commit to branch feature/export_headers
in repository https://gitbox.apache.org/repos/asf/celix.git
commit 5d24e83162e6ebfabe03d7ec1e8f33fd583ee6af
Author: Pepijn Noltes <pe...@gmail.com>
AuthorDate: Sun Apr 16 10:51:35 2023 +0200
Remove VISIBILITY_INLINES_HIDDEN from c libs visibility config
---
libs/dfi/CMakeLists.txt | 1 -
libs/etcdlib/CMakeLists.txt | 1 -
libs/framework/CMakeLists.txt | 20 +++++++++++++++-----
libs/utils/CMakeLists.txt | 1 -
4 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/libs/dfi/CMakeLists.txt b/libs/dfi/CMakeLists.txt
index d74950f0..5b5289e3 100644
--- a/libs/dfi/CMakeLists.txt
+++ b/libs/dfi/CMakeLists.txt
@@ -43,7 +43,6 @@ if (CELIX_DFI)
target_link_libraries(dfi PUBLIC jansson::jansson)
set_target_properties(dfi PROPERTIES
C_VISIBILITY_PRESET hidden
- VISIBILITY_INLINES_HIDDEN ON
VERSION "1.0.0"
"SOVERSION" 1
OUTPUT_NAME "celix_dfi")
diff --git a/libs/etcdlib/CMakeLists.txt b/libs/etcdlib/CMakeLists.txt
index 23a677c9..f89bde78 100644
--- a/libs/etcdlib/CMakeLists.txt
+++ b/libs/etcdlib/CMakeLists.txt
@@ -63,7 +63,6 @@ if (CELIX_ETCDLIB OR ETCDLIB_STANDALONE)
VERSION 1.0.0
SOVERSION 1
C_VISIBILITY_PRESET hidden
- VISIBILITY_INLINES_HIDDEN ON
)
target_link_libraries(etcdlib PUBLIC CURL::libcurl jansson::jansson ${CELIX_OPTIONAL_EXTRA_LIBS})
diff --git a/libs/framework/CMakeLists.txt b/libs/framework/CMakeLists.txt
index bf3a560c..3febe6be 100644
--- a/libs/framework/CMakeLists.txt
+++ b/libs/framework/CMakeLists.txt
@@ -47,18 +47,28 @@ target_link_libraries(framework_obj PUBLIC libuuid::libuuid CURL::libcurl ZLIB::
target_link_libraries(framework_obj PRIVATE ${CMAKE_DL_LIBS})
celix_deprecated_utils_headers(framework_obj)
+generate_export_header(framework_obj
+ BASE_NAME "CELIX_FRAMWORK"
+ EXPORT_FILE_NAME "${CMAKE_BINARY_DIR}/celix/gen/includes/framework/celix_framework_export.h")
+target_include_directories(utils_obj PUBLIC $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/celix/gen/includes/framework>)
+
add_library(framework SHARED)
target_link_libraries(framework PUBLIC framework_obj)
-set_target_properties(framework PROPERTIES OUTPUT_NAME "celix_framework")
-set_target_properties(framework PROPERTIES "SOVERSION" ${CELIX_MAJOR})
+set_target_properties(framework
+ PROPERTIES
+ C_VISIBILITY_PRESET hidden
+ "VERSION" "${CELIX_MAJOR}.${CELIX_MINOR}.${CELIX_MICRO}"
+ "SOVERSION" ${CELIX_MAJOR}
+ OUTPUT_NAME "celix_framework")
celix_deprecated_utils_headers(framework)
# By omitting OBJECTS DESTINATION, object files will NOT be installed.
install(TARGETS framework framework_obj EXPORT celix LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT framework
- INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/celix)
-install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/celix COMPONENT framework)
-install(DIRECTORY include_deprecated/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/celix COMPONENT framework)
+ INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/celix_framework)
+install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/celix_framework COMPONENT framework)
+install(DIRECTORY include_deprecated/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/celix_framework COMPONENT framework)
+install(DIRECTORY ${CMAKE_BINARY_DIR}/celix/gen/includes/framework/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/celix_framework COMPONENT framework)
#Alias setup to match external usage
add_library(Celix::framework ALIAS framework)
diff --git a/libs/utils/CMakeLists.txt b/libs/utils/CMakeLists.txt
index 87ba290b..3623a29d 100644
--- a/libs/utils/CMakeLists.txt
+++ b/libs/utils/CMakeLists.txt
@@ -81,7 +81,6 @@ target_link_libraries(utils PUBLIC utils_obj)
set_target_properties(utils
PROPERTIES
C_VISIBILITY_PRESET hidden
- VISIBILITY_INLINES_HIDDEN true
SOVERSION ${CELIX_MAJOR}
OUTPUT_NAME "celix_utils")
[celix] 03/09: Fix wrong usage of EXPORT marco on structs
Posted by pn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
pnoltes pushed a commit to branch feature/export_headers
in repository https://gitbox.apache.org/repos/asf/celix.git
commit ad63f68ce77f4ca5f75522b3b41d34c1afcc668f
Author: Pepijn Noltes <pe...@gmail.com>
AuthorDate: Sun Apr 16 10:40:13 2023 +0200
Fix wrong usage of EXPORT marco on structs
---
libs/dfi/include/dfi_log_util.h | 4 +++-
libs/dfi/include/dyn_common.h | 2 +-
libs/dfi/include/dyn_function.h | 2 +-
libs/dfi/include/dyn_type.h | 6 +++---
libs/etcdlib/CMakeLists.txt | 1 +
5 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/libs/dfi/include/dfi_log_util.h b/libs/dfi/include/dfi_log_util.h
index 29101903..5764d9fa 100644
--- a/libs/dfi/include/dfi_log_util.h
+++ b/libs/dfi/include/dfi_log_util.h
@@ -20,6 +20,8 @@
#ifndef _DFI_LOG_UTIL_H_
#define _DFI_LOG_UTIL_H_
+#include "celix_df_export.h"
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -34,7 +36,7 @@ typedef void (*logf_ft)(void *handle, int level, const char *file, int line, con
static void *g_logHandle = NULL; \
static int g_currentLogLevel = 1; \
\
- void cmp ## _logSetup(logf_ft logf, void *handle, int currentLogLevel) { \
+ CELIX_DFI_EXPORT void cmp ## _logSetup(logf_ft logf, void *handle, int currentLogLevel) { \
g_currentLogLevel = currentLogLevel; \
g_logHandle = handle; \
g_logf = logf; \
diff --git a/libs/dfi/include/dyn_common.h b/libs/dfi/include/dyn_common.h
index 294048b8..ff2eae8b 100644
--- a/libs/dfi/include/dyn_common.h
+++ b/libs/dfi/include/dyn_common.h
@@ -37,7 +37,7 @@ DFI_SETUP_LOG_HEADER(dynCommon) ;
TAILQ_HEAD(namvals_head, namval_entry);
-struct CELIX_DFI_EXPORT namval_entry {
+struct namval_entry {
char *name;
char *value;
TAILQ_ENTRY(namval_entry) entries;
diff --git a/libs/dfi/include/dyn_function.h b/libs/dfi/include/dyn_function.h
index 1f59e981..269e9cbe 100644
--- a/libs/dfi/include/dyn_function.h
+++ b/libs/dfi/include/dyn_function.h
@@ -48,7 +48,7 @@ typedef struct _dyn_function_type dyn_function_type;
DFI_SETUP_LOG_HEADER(dynFunction);
DFI_SETUP_LOG_HEADER(dynAvprFunction);
-enum CELIX_DFI_EXPORT dyn_function_argument_meta {
+enum dyn_function_argument_meta {
DYN_FUNCTION_ARGUMENT_META__STD = 0,
DYN_FUNCTION_ARGUMENT_META__HANDLE = 1,
DYN_FUNCTION_ARGUMENT_META__PRE_ALLOCATED_OUTPUT = 2,
diff --git a/libs/dfi/include/dyn_type.h b/libs/dfi/include/dyn_type.h
index 676a68eb..145dbfa3 100644
--- a/libs/dfi/include/dyn_type.h
+++ b/libs/dfi/include/dyn_type.h
@@ -116,20 +116,20 @@ extern "C" {
typedef struct _dyn_type dyn_type;
TAILQ_HEAD(types_head, type_entry);
-struct CELIX_DFI_EXPORT type_entry {
+struct type_entry {
dyn_type *type;
TAILQ_ENTRY(type_entry) entries;
};
TAILQ_HEAD(complex_type_entries_head, complex_type_entry);
-struct CELIX_DFI_EXPORT complex_type_entry {
+struct complex_type_entry {
dyn_type *type;
char *name;
TAILQ_ENTRY(complex_type_entry) entries;
};
TAILQ_HEAD(meta_properties_head, meta_entry);
-struct CELIX_DFI_EXPORT meta_entry {
+struct meta_entry {
char *name;
char *value;
TAILQ_ENTRY(meta_entry) entries;
diff --git a/libs/etcdlib/CMakeLists.txt b/libs/etcdlib/CMakeLists.txt
index 760b8bad..23a677c9 100644
--- a/libs/etcdlib/CMakeLists.txt
+++ b/libs/etcdlib/CMakeLists.txt
@@ -76,6 +76,7 @@ if (CELIX_ETCDLIB OR ETCDLIB_STANDALONE)
add_library(etcdlib_static STATIC src/etcd.c)
target_include_directories(etcdlib_static PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/api>)
target_include_directories(etcdlib_static PRIVATE src)
+ target_include_directories(etcdlib_static PUBLIC $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/celix/gen/includes/etcdlib>)
set_target_properties(etcdlib_static
PROPERTIES
POSITION_INDEPENDENT_CODE 1
[celix] 02/09: Add export header for dfi
Posted by pn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
pnoltes pushed a commit to branch feature/export_headers
in repository https://gitbox.apache.org/repos/asf/celix.git
commit 860f7a87a4e9e38a5ff3dfab8ebdd166bac03fdc
Author: Pepijn Noltes <pe...@gmail.com>
AuthorDate: Sun Apr 16 10:34:25 2023 +0200
Add export header for dfi
---
libs/dfi/CMakeLists.txt | 24 ++++++++-----
libs/dfi/include/avrobin_serializer.h | 9 ++---
libs/dfi/include/dyn_common.h | 13 +++----
libs/dfi/include/dyn_function.h | 29 +++++++--------
libs/dfi/include/dyn_message.h | 22 ++++++------
libs/dfi/include/dyn_type.h | 68 +++++++++++++++++------------------
6 files changed, 88 insertions(+), 77 deletions(-)
diff --git a/libs/dfi/CMakeLists.txt b/libs/dfi/CMakeLists.txt
index f011f3f3..d74950f0 100644
--- a/libs/dfi/CMakeLists.txt
+++ b/libs/dfi/CMakeLists.txt
@@ -36,19 +36,27 @@ if (CELIX_DFI)
)
add_library(dfi SHARED ${SOURCES})
- set_target_properties(dfi PROPERTIES OUTPUT_NAME "celix_dfi")
target_include_directories(dfi PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
- $<INSTALL_INTERFACE:include/celix/dfi>
- )
- target_link_libraries(dfi PRIVATE libffi::libffi)
+ $<INSTALL_INTERFACE:include/celix/dfi>)
+ target_link_libraries(dfi PRIVATE libffi::libffi Celix::utils)
target_link_libraries(dfi PUBLIC jansson::jansson)
- target_link_libraries(dfi PRIVATE Celix::utils)
- set_target_properties(dfi PROPERTIES "SOVERSION" 1)
+ set_target_properties(dfi PROPERTIES
+ C_VISIBILITY_PRESET hidden
+ VISIBILITY_INLINES_HIDDEN ON
+ VERSION "1.0.0"
+ "SOVERSION" 1
+ OUTPUT_NAME "celix_dfi")
+
+ generate_export_header(utils_obj
+ BASE_NAME "CELIX_DFI"
+ EXPORT_FILE_NAME "${CMAKE_BINARY_DIR}/celix/gen/includes/dfi/celix_dfi_export.h")
+ target_include_directories(utils_obj PUBLIC $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/celix/gen/includes/dfi>)
install(TARGETS dfi EXPORT celix DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT dfi
- INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/celix/dfi)
- install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/celix/dfi COMPONENT dfi)
+ INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/celix_dfi)
+ install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/celix_dfi COMPONENT dfi)
+ install(DIRECTORY ${CMAKE_BINARY_DIR}/celix/gen/includes/dfi/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/celix_dfi COMPONENT dfi)
#Alias setup to match external usage
add_library(Celix::dfi ALIAS dfi)
diff --git a/libs/dfi/include/avrobin_serializer.h b/libs/dfi/include/avrobin_serializer.h
index 5a38e03a..b9a2e4c7 100644
--- a/libs/dfi/include/avrobin_serializer.h
+++ b/libs/dfi/include/avrobin_serializer.h
@@ -23,6 +23,7 @@
#include "dyn_type.h"
#include "dyn_function.h"
#include "dyn_interface.h"
+#include "celix_df_export.h"
#ifdef __cplusplus
extern "C" {
@@ -31,13 +32,13 @@ extern "C" {
//logging
DFI_SETUP_LOG_HEADER(avrobinSerializer);
-int avrobinSerializer_deserialize(dyn_type *type, const uint8_t *input, size_t inlen, void **result);
+CELIX_DFI_DEPRECATED_EXPORT int avrobinSerializer_deserialize(dyn_type *type, const uint8_t *input, size_t inlen, void **result);
-int avrobinSerializer_serialize(dyn_type *type, const void *input, uint8_t **output, size_t *outlen);
+CELIX_DFI_DEPRECATED_EXPORT int avrobinSerializer_serialize(dyn_type *type, const void *input, uint8_t **output, size_t *outlen);
-int avrobinSerializer_generateSchema(dyn_type *type, char **output);
+CELIX_DFI_DEPRECATED_EXPORT int avrobinSerializer_generateSchema(dyn_type *type, char **output);
-int avrobinSerializer_saveFile(const char *filename, const char *schema, const uint8_t *serdata, size_t serdatalen);
+CELIX_DFI_DEPRECATED_EXPORT int avrobinSerializer_saveFile(const char *filename, const char *schema, const uint8_t *serdata, size_t serdatalen);
#ifdef __cplusplus
}
diff --git a/libs/dfi/include/dyn_common.h b/libs/dfi/include/dyn_common.h
index 01adcf35..294048b8 100644
--- a/libs/dfi/include/dyn_common.h
+++ b/libs/dfi/include/dyn_common.h
@@ -26,6 +26,7 @@
#include <sys/queue.h>
#include "dfi_log_util.h"
+#include "celix_df_export.h"
#ifdef __cplusplus
extern "C" {
@@ -36,18 +37,18 @@ DFI_SETUP_LOG_HEADER(dynCommon) ;
TAILQ_HEAD(namvals_head, namval_entry);
-struct namval_entry {
+struct CELIX_DFI_EXPORT namval_entry {
char *name;
char *value;
TAILQ_ENTRY(namval_entry) entries;
};
-int dynCommon_parseName(FILE *stream, char **result);
-int dynCommon_parseNameAlsoAccept(FILE *stream, const char *acceptedChars, char **result);
-int dynCommon_parseNameValue(FILE *stream, char **name, char **value);
-int dynCommon_eatChar(FILE *stream, int c);
+CELIX_DFI_EXPORT int dynCommon_parseName(FILE *stream, char **result);
+CELIX_DFI_EXPORT int dynCommon_parseNameAlsoAccept(FILE *stream, const char *acceptedChars, char **result);
+CELIX_DFI_EXPORT int dynCommon_parseNameValue(FILE *stream, char **name, char **value);
+CELIX_DFI_EXPORT int dynCommon_eatChar(FILE *stream, int c);
-void dynCommon_clearNamValHead(struct namvals_head *head);
+CELIX_DFI_EXPORT void dynCommon_clearNamValHead(struct namvals_head *head);
#ifdef __cplusplus
}
diff --git a/libs/dfi/include/dyn_function.h b/libs/dfi/include/dyn_function.h
index d9ec07c6..1f59e981 100644
--- a/libs/dfi/include/dyn_function.h
+++ b/libs/dfi/include/dyn_function.h
@@ -22,6 +22,7 @@
#include "dyn_type.h"
#include "dfi_log_util.h"
+#include "celix_df_export.h"
#ifdef __cplusplus
extern "C" {
@@ -47,36 +48,36 @@ typedef struct _dyn_function_type dyn_function_type;
DFI_SETUP_LOG_HEADER(dynFunction);
DFI_SETUP_LOG_HEADER(dynAvprFunction);
-enum dyn_function_argument_meta {
+enum CELIX_DFI_EXPORT dyn_function_argument_meta {
DYN_FUNCTION_ARGUMENT_META__STD = 0,
DYN_FUNCTION_ARGUMENT_META__HANDLE = 1,
DYN_FUNCTION_ARGUMENT_META__PRE_ALLOCATED_OUTPUT = 2,
DYN_FUNCTION_ARGUMENT_META__OUTPUT = 3
};
-int dynFunction_parse(FILE *descriptorStream, struct types_head *refTypes, dyn_function_type **dynFunc);
-int dynFunction_parseWithStr(const char *descriptor, struct types_head *refTypes, dyn_function_type **dynFunc);
+CELIX_DFI_EXPORT int dynFunction_parse(FILE *descriptorStream, struct types_head *refTypes, dyn_function_type **dynFunc);
+CELIX_DFI_EXPORT int dynFunction_parseWithStr(const char *descriptor, struct types_head *refTypes, dyn_function_type **dynFunc);
-int dynFunction_nrOfArguments(dyn_function_type *dynFunc);
-dyn_type *dynFunction_argumentTypeForIndex(dyn_function_type *dynFunc, int argumentNr);
-enum dyn_function_argument_meta dynFunction_argumentMetaForIndex(dyn_function_type *dynFunc, int argumentNr);
-dyn_type * dynFunction_returnType(dyn_function_type *dynFunction);
+CELIX_DFI_EXPORT int dynFunction_nrOfArguments(dyn_function_type *dynFunc);
+CELIX_DFI_EXPORT dyn_type *dynFunction_argumentTypeForIndex(dyn_function_type *dynFunc, int argumentNr);
+CELIX_DFI_EXPORT enum dyn_function_argument_meta dynFunction_argumentMetaForIndex(dyn_function_type *dynFunc, int argumentNr);
+CELIX_DFI_EXPORT dyn_type * dynFunction_returnType(dyn_function_type *dynFunction);
-void dynFunction_destroy(dyn_function_type *dynFunc);
-int dynFunction_call(dyn_function_type *dynFunc, void(*fn)(void), void *returnValue, void **argValues);
+CELIX_DFI_EXPORT void dynFunction_destroy(dyn_function_type *dynFunc);
+CELIX_DFI_EXPORT int dynFunction_call(dyn_function_type *dynFunc, void(*fn)(void), void *returnValue, void **argValues);
-int dynFunction_createClosure(dyn_function_type *func, void (*bind)(void *, void **, void*), void *userData, void(**fn)(void));
-int dynFunction_getFnPointer(dyn_function_type *func, void (**fn)(void));
+CELIX_DFI_EXPORT int dynFunction_createClosure(dyn_function_type *func, void (*bind)(void *, void **, void*), void *userData, void(**fn)(void));
+CELIX_DFI_EXPORT int dynFunction_getFnPointer(dyn_function_type *func, void (**fn)(void));
/**
* Returns whether the function has a return type.
* Will return false if return is void.
*/
-bool dynFunction_hasReturn(dyn_function_type *dynFunction);
+CELIX_DFI_EXPORT bool dynFunction_hasReturn(dyn_function_type *dynFunction);
// Avpr parsing
-dyn_function_type * dynFunction_parseAvprWithStr(const char * avpr, const char * fqn);
-dyn_function_type * dynFunction_parseAvpr(FILE * avprStream, const char * fqn);
+CELIX_DFI_DEPRECATED_EXPORT dyn_function_type * dynFunction_parseAvprWithStr(const char * avpr, const char * fqn);
+CELIX_DFI_DEPRECATED_EXPORT dyn_function_type * dynFunction_parseAvpr(FILE * avprStream, const char * fqn);
#ifdef __cplusplus
}
diff --git a/libs/dfi/include/dyn_message.h b/libs/dfi/include/dyn_message.h
index 4baf24ce..6b3deeba 100644
--- a/libs/dfi/include/dyn_message.h
+++ b/libs/dfi/include/dyn_message.h
@@ -23,8 +23,8 @@
#include "dyn_common.h"
#include "dyn_type.h"
#include "dfi_log_util.h"
-
#include "celix_version.h"
+#include "celix_df_export.h"
#ifdef __cplusplus
extern "C" {
@@ -46,19 +46,19 @@ DFI_SETUP_LOG_HEADER(dynMessage);
typedef struct _dyn_message_type dyn_message_type;
-int dynMessage_parse(FILE *descriptor, dyn_message_type **out);
-void dynMessage_destroy(dyn_message_type *msg);
+CELIX_DFI_EXPORT int dynMessage_parse(FILE *descriptor, dyn_message_type **out);
+CELIX_DFI_EXPORT void dynMessage_destroy(dyn_message_type *msg);
-int dynMessage_getName(dyn_message_type *msg, char **name);
-int dynMessage_getVersion(dyn_message_type *msg, celix_version_t** version);
-int dynMessage_getVersionString(dyn_message_type *msg, char **version);
-int dynMessage_getHeaderEntry(dyn_message_type *msg, const char *name, char **value);
-int dynMessage_getAnnotationEntry(dyn_message_type *msg, const char *name, char **value);
-int dynMessage_getMessageType(dyn_message_type *msg, dyn_type **type);
+CELIX_DFI_EXPORT int dynMessage_getName(dyn_message_type *msg, char **name);
+CELIX_DFI_EXPORT int dynMessage_getVersion(dyn_message_type *msg, celix_version_t** version);
+CELIX_DFI_EXPORT int dynMessage_getVersionString(dyn_message_type *msg, char **version);
+CELIX_DFI_EXPORT int dynMessage_getHeaderEntry(dyn_message_type *msg, const char *name, char **value);
+CELIX_DFI_EXPORT int dynMessage_getAnnotationEntry(dyn_message_type *msg, const char *name, char **value);
+CELIX_DFI_EXPORT int dynMessage_getMessageType(dyn_message_type *msg, dyn_type **type);
// avpr parsing
-dyn_message_type * dynMessage_parseAvpr(FILE *avprDescriptorStream, const char *fqn);
-dyn_message_type * dynMessage_parseAvprWithStr(const char *avprDescriptor, const char *fqn);
+CELIX_DFI_DEPRECATED_EXPORT dyn_message_type * dynMessage_parseAvpr(FILE *avprDescriptorStream, const char *fqn);
+CELIX_DFI_DEPRECATED_EXPORT dyn_message_type * dynMessage_parseAvprWithStr(const char *avprDescriptor, const char *fqn);
#ifdef __cplusplus
}
diff --git a/libs/dfi/include/dyn_type.h b/libs/dfi/include/dyn_type.h
index 3e63b321..676a68eb 100644
--- a/libs/dfi/include/dyn_type.h
+++ b/libs/dfi/include/dyn_type.h
@@ -23,10 +23,10 @@
#include <stdio.h>
#include <sys/queue.h>
#include <stdbool.h>
-
#include <stdint.h>
#include "dfi_log_util.h"
+#include "celix_df_export.h"
#ifdef __cplusplus
extern "C" {
@@ -116,20 +116,20 @@ extern "C" {
typedef struct _dyn_type dyn_type;
TAILQ_HEAD(types_head, type_entry);
-struct type_entry {
+struct CELIX_DFI_EXPORT type_entry {
dyn_type *type;
TAILQ_ENTRY(type_entry) entries;
};
TAILQ_HEAD(complex_type_entries_head, complex_type_entry);
-struct complex_type_entry {
+struct CELIX_DFI_EXPORT complex_type_entry {
dyn_type *type;
char *name;
TAILQ_ENTRY(complex_type_entry) entries;
};
TAILQ_HEAD(meta_properties_head, meta_entry);
-struct meta_entry {
+struct CELIX_DFI_EXPORT meta_entry {
char *name;
char *value;
TAILQ_ENTRY(meta_entry) entries;
@@ -150,7 +150,7 @@ DFI_SETUP_LOG_HEADER(dynAvprType);
* @param type Output argument for the parsed dyn type.
* @return 0 if successful.
*/
-int dynType_parse(FILE *descriptorStream, const char *name, struct types_head *refTypes, dyn_type **type);
+CELIX_DFI_EXPORT int dynType_parse(FILE *descriptorStream, const char *name, struct types_head *refTypes, dyn_type **type);
/**
* Parses a descriptor string and creates a dyn_type (dynamic type).
@@ -163,13 +163,13 @@ int dynType_parse(FILE *descriptorStream, const char *name, struct types_head *r
* @param type Output argument for the parsed dyn type.
* @return 0 if successful.
*/
-int dynType_parseWithStr(const char *descriptor, const char *name, struct types_head *refTypes, dyn_type **type);
+CELIX_DFI_EXPORT int dynType_parseWithStr(const char *descriptor, const char *name, struct types_head *refTypes, dyn_type **type);
/**
* Destroy a dyn type and de-allocates the memory.
* @param type The dyn type to destroy.
*/
-void dynType_destroy(dyn_type *type);
+CELIX_DFI_EXPORT void dynType_destroy(dyn_type *type);
/**
* Allocates memory for a type instance described by a dyn type. The memory will be 0 allocated (calloc).
@@ -178,7 +178,7 @@ void dynType_destroy(dyn_type *type);
* @param instance The output argument for the allocated memory.
* @return 0 on success.
*/
-int dynType_alloc(dyn_type *type, void **instance);
+CELIX_DFI_EXPORT int dynType_alloc(dyn_type *type, void **instance);
/**
* free the memory for a type instance described by a dyn type.
@@ -187,14 +187,14 @@ int dynType_alloc(dyn_type *type, void **instance);
* @param type The dyn type for which structure to allocate.
* @param instance The memory location of the type instance.
*/
-void dynType_free(dyn_type *type, void *instance);
+CELIX_DFI_EXPORT void dynType_free(dyn_type *type, void *instance);
/**
* Prints the dyn type information to the provided output stream.
* @param type The dyn type to print.
* @param stream The output stream (e.g. stdout).
*/
-void dynType_print(dyn_type *type, FILE *stream);
+CELIX_DFI_EXPORT void dynType_print(dyn_type *type, FILE *stream);
/**
* Return the size of the structure descripbed by the dyn type.
@@ -203,7 +203,7 @@ void dynType_print(dyn_type *type, FILE *stream);
* @param type The dyn type.
* @return The size of the type instance described by dyn type.
*/
-size_t dynType_size(dyn_type *type);
+CELIX_DFI_EXPORT size_t dynType_size(dyn_type *type);
/**
* The type of the dyn type
@@ -211,7 +211,7 @@ size_t dynType_size(dyn_type *type);
* @param type The dyn type
* @return The type of the dyn type.
*/
-int dynType_type(dyn_type *type);
+CELIX_DFI_EXPORT int dynType_type(dyn_type *type);
/**
* Returns the char identifier of the dyn type type.
@@ -219,7 +219,7 @@ int dynType_type(dyn_type *type);
* @param type The dyn type
* @return The descriptor of the dyn type.
*/
-char dynType_descriptorType(dyn_type *type);
+CELIX_DFI_EXPORT char dynType_descriptorType(dyn_type *type);
/**
* Get the dyn type meta information for the provided name.
@@ -227,7 +227,7 @@ char dynType_descriptorType(dyn_type *type);
* @param name The name of the requested meta information.
* @return The meta information or NULL if the meta information is not present.
*/
-const char * dynType_getMetaInfo(dyn_type *type, const char *name);
+CELIX_DFI_EXPORT const char * dynType_getMetaInfo(dyn_type *type, const char *name);
/**
* Returns a list of meta entries.
@@ -236,12 +236,12 @@ const char * dynType_getMetaInfo(dyn_type *type, const char *name);
* @param entries The output arguments for the meta entries.
* @return 0 on success.
*/
-int dynType_metaEntries(dyn_type *type, struct meta_properties_head **entries);
+CELIX_DFI_EXPORT int dynType_metaEntries(dyn_type *type, struct meta_properties_head **entries);
/**
* Returns the name of the dyn type. Name can be NULL.
*/
-const char * dynType_getName(dyn_type *type);
+CELIX_DFI_EXPORT const char * dynType_getName(dyn_type *type);
/**
@@ -252,7 +252,7 @@ const char * dynType_getName(dyn_type *type);
* @param name The field name.
* @return The field index or -1 if no field with the name was found.
*/
-int dynType_complex_indexForName(dyn_type *type, const char *name);
+CELIX_DFI_EXPORT int dynType_complex_indexForName(dyn_type *type, const char *name);
/**
* Returns the field dyn type for a given complex type and a field index.
@@ -263,26 +263,26 @@ int dynType_complex_indexForName(dyn_type *type, const char *name);
* exists.
* @return 0 if successful.
*/
-int dynType_complex_dynTypeAt(dyn_type *type, int index, dyn_type **subType);
+CELIX_DFI_EXPORT int dynType_complex_dynTypeAt(dyn_type *type, int index, dyn_type **subType);
-int dynType_complex_setValueAt(dyn_type *type, int index, void *inst, void *in);
-int dynType_complex_valLocAt(dyn_type *type, int index, void *inst, void **valLoc);
-int dynType_complex_entries(dyn_type *type, struct complex_type_entries_head **entries);
-size_t dynType_complex_nrOfEntries(dyn_type *type);
+CELIX_DFI_EXPORT int dynType_complex_setValueAt(dyn_type *type, int index, void *inst, void *in);
+CELIX_DFI_EXPORT int dynType_complex_valLocAt(dyn_type *type, int index, void *inst, void **valLoc);
+CELIX_DFI_EXPORT int dynType_complex_entries(dyn_type *type, struct complex_type_entries_head **entries);
+CELIX_DFI_EXPORT size_t dynType_complex_nrOfEntries(dyn_type *type);
//sequence
/**
* Initialize a sequence struct with a cap & len of 0 and the buf to NULL.
*/
-void dynType_sequence_init(dyn_type *type, void *inst);
+CELIX_DFI_EXPORT void dynType_sequence_init(dyn_type *type, void *inst);
/**
* Allocates memory for a sequence with capacity cap.
* Will not free if the existing buf.
* Sets len to 0
*/
-int dynType_sequence_alloc(dyn_type *type, void *inst, uint32_t cap);
+CELIX_DFI_EXPORT int dynType_sequence_alloc(dyn_type *type, void *inst, uint32_t cap);
/**
* Reserve a sequence capacity of cap
@@ -290,25 +290,25 @@ int dynType_sequence_alloc(dyn_type *type, void *inst, uint32_t cap);
* Keeps the len value.
* Note will not decrease the allocated memory
*/
-int dynType_sequence_reserve(dyn_type *type, void *inst, uint32_t cap);
+CELIX_DFI_EXPORT int dynType_sequence_reserve(dyn_type *type, void *inst, uint32_t cap);
-int dynType_sequence_locForIndex(dyn_type *type, void *seqLoc, int index, void **valLoc);
-int dynType_sequence_increaseLengthAndReturnLastLoc(dyn_type *type, void *seqLoc, void **valLoc);
-dyn_type * dynType_sequence_itemType(dyn_type *type);
-uint32_t dynType_sequence_length(void *seqLoc);
+CELIX_DFI_EXPORT int dynType_sequence_locForIndex(dyn_type *type, void *seqLoc, int index, void **valLoc);
+CELIX_DFI_EXPORT int dynType_sequence_increaseLengthAndReturnLastLoc(dyn_type *type, void *seqLoc, void **valLoc);
+CELIX_DFI_EXPORT dyn_type * dynType_sequence_itemType(dyn_type *type);
+CELIX_DFI_EXPORT uint32_t dynType_sequence_length(void *seqLoc);
//typed pointer
-int dynType_typedPointer_getTypedType(dyn_type *type, dyn_type **typedType);
+CELIX_DFI_EXPORT int dynType_typedPointer_getTypedType(dyn_type *type, dyn_type **typedType);
//text
-int dynType_text_allocAndInit(dyn_type *type, void *textLoc, const char *value);
+CELIX_DFI_EXPORT int dynType_text_allocAndInit(dyn_type *type, void *textLoc, const char *value);
//simple
-void dynType_simple_setValue(dyn_type *type, void *inst, void *in);
+CELIX_DFI_EXPORT void dynType_simple_setValue(dyn_type *type, void *inst, void *in);
// avpr parsing
-dyn_type * dynType_parseAvpr(FILE *avprStream, const char *fqn);
-dyn_type * dynType_parseAvprWithStr(const char *avpr, const char *fqn);
+CELIX_DFI_DEPRECATED_EXPORT dyn_type * dynType_parseAvpr(FILE *avprStream, const char *fqn);
+CELIX_DFI_DEPRECATED_EXPORT dyn_type * dynType_parseAvprWithStr(const char *avpr, const char *fqn);
#ifdef __cplusplus
[celix] 05/09: Update framework headers to include "celix_framework_export.h"
Posted by pn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
pnoltes pushed a commit to branch feature/export_headers
in repository https://gitbox.apache.org/repos/asf/celix.git
commit 6a0baac709e60cc8936b8b7461f5c114d6e4e6b3
Author: Pepijn Noltes <pe...@gmail.com>
AuthorDate: Sun Apr 16 10:51:52 2023 +0200
Update framework headers to include "celix_framework_export.h"
---
libs/framework/include/celix_bundle.h | 7 ++++---
libs/framework/include/celix_bundle_activator.h | 7 ++++---
libs/framework/include/celix_bundle_context.h | 11 ++++++-----
libs/framework/include/celix_bundle_event.h | 2 +-
libs/framework/include/celix_bundle_state.h | 2 ++
libs/framework/include/celix_constants.h | 2 ++
libs/framework/include/celix_dependency_manager.h | 2 +-
libs/framework/include/celix_dm_component.h | 1 +
libs/framework/include/celix_dm_info.h | 4 ++--
libs/framework/include/celix_dm_service_dependency.h | 2 +-
libs/framework/include/celix_framework.h | 3 ++-
libs/framework/include/celix_framework_factory.h | 1 +
libs/framework/include/celix_framework_utils.h | 2 +-
libs/framework/include/celix_launcher.h | 1 +
libs/framework/include/celix_log.h | 3 ++-
libs/framework/include/celix_service_event.h | 4 ++--
16 files changed, 33 insertions(+), 21 deletions(-)
diff --git a/libs/framework/include/celix_bundle.h b/libs/framework/include/celix_bundle.h
index 753f77ba..565bc725 100644
--- a/libs/framework/include/celix_bundle.h
+++ b/libs/framework/include/celix_bundle.h
@@ -17,14 +17,15 @@
* under the License.
*/
+#ifndef CELIX_BUNDLE_H_
+#define CELIX_BUNDLE_H_
+
#include "celix_types.h"
#include "celix_bundle_state.h"
#include "celix_properties.h"
#include "celix_array_list.h"
#include "celix_version.h"
-
-#ifndef CELIX_BUNDLE_H_
-#define CELIX_BUNDLE_H_
+#include "celix_framework_export.h"
#ifdef __cplusplus
extern "C" {
diff --git a/libs/framework/include/celix_bundle_activator.h b/libs/framework/include/celix_bundle_activator.h
index 49f33a65..959370fa 100644
--- a/libs/framework/include/celix_bundle_activator.h
+++ b/libs/framework/include/celix_bundle_activator.h
@@ -17,6 +17,9 @@
* under the License.
*/
+#ifndef CELIX_BUNDLE_ACTIVATOR_H_
+#define CELIX_BUNDLE_ACTIVATOR_H_
+
#include <stdlib.h>
#include "celix_bundle_context.h"
@@ -24,9 +27,7 @@
#include "celix_dm_component.h"
#include "celix_dm_service_dependency.h"
#include "celix_constants.h"
-
-#ifndef CELIX_BUNDLE_ACTIVATOR_H_
-#define CELIX_BUNDLE_ACTIVATOR_H_
+#include "celix_framework_export.h"
#ifdef __cplusplus
extern "C" {
diff --git a/libs/framework/include/celix_bundle_context.h b/libs/framework/include/celix_bundle_context.h
index 00a39b15..9695b837 100644
--- a/libs/framework/include/celix_bundle_context.h
+++ b/libs/framework/include/celix_bundle_context.h
@@ -17,6 +17,11 @@
* under the License.
*/
+#ifndef CELIX_BUNDLE_CONTEXT_H_
+#define CELIX_BUNDLE_CONTEXT_H_
+
+#include <stdarg.h>
+
#include "celix_types.h"
#include "celix_service_factory.h"
#include "celix_properties.h"
@@ -24,11 +29,7 @@
#include "celix_filter.h"
#include "celix_bundle_event.h"
#include "celix_log_level.h"
-#include <stdarg.h>
-
-#ifndef CELIX_BUNDLE_CONTEXT_H_
-#define CELIX_BUNDLE_CONTEXT_H_
-
+#include "celix_framework_export.h"
#ifdef __cplusplus
extern "C" {
diff --git a/libs/framework/include/celix_bundle_event.h b/libs/framework/include/celix_bundle_event.h
index 71fc9fd3..97b0716c 100644
--- a/libs/framework/include/celix_bundle_event.h
+++ b/libs/framework/include/celix_bundle_event.h
@@ -17,11 +17,11 @@
* under the License.
*/
-
#ifndef CELIX_BUNDLE_EVENT_H_
#define CELIX_BUNDLE_EVENT_H_
#include "celix_bundle.h"
+#include "celix_framework_export.h"
#ifdef __cplusplus
extern "C" {
diff --git a/libs/framework/include/celix_bundle_state.h b/libs/framework/include/celix_bundle_state.h
index 62a65438..cf656ef4 100644
--- a/libs/framework/include/celix_bundle_state.h
+++ b/libs/framework/include/celix_bundle_state.h
@@ -20,6 +20,8 @@
#ifndef CELIX_BUNDLE_STATE_H_
#define CELIX_BUNDLE_STATE_H_
+#include "celix_framework_export.h"
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/libs/framework/include/celix_constants.h b/libs/framework/include/celix_constants.h
index 4da4f59e..67f70c7c 100644
--- a/libs/framework/include/celix_constants.h
+++ b/libs/framework/include/celix_constants.h
@@ -22,6 +22,8 @@
#include <stdbool.h>
+#include "celix_framework_export.h"
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/libs/framework/include/celix_dependency_manager.h b/libs/framework/include/celix_dependency_manager.h
index 3d6d5d6d..0c0f0550 100644
--- a/libs/framework/include/celix_dependency_manager.h
+++ b/libs/framework/include/celix_dependency_manager.h
@@ -21,10 +21,10 @@
#define CELIX_DEPENDENCY_MANAGER_H_
#include "celix_types.h"
-
#include "celix_errno.h"
#include "celix_array_list.h"
#include "celix_dm_info.h"
+#include "celix_framework_export.h"
#ifdef __cplusplus
extern "C" {
diff --git a/libs/framework/include/celix_dm_component.h b/libs/framework/include/celix_dm_component.h
index e1efe4da..ed853b62 100644
--- a/libs/framework/include/celix_dm_component.h
+++ b/libs/framework/include/celix_dm_component.h
@@ -27,6 +27,7 @@
#include "celix_properties.h"
#include "celix_array_list.h"
#include "celix_dm_info.h"
+#include "celix_framework_export.h"
#ifdef __cplusplus
extern "C" {
diff --git a/libs/framework/include/celix_dm_info.h b/libs/framework/include/celix_dm_info.h
index 2f7d2622..37be7ba2 100644
--- a/libs/framework/include/celix_dm_info.h
+++ b/libs/framework/include/celix_dm_info.h
@@ -20,11 +20,11 @@
#ifndef CELIX_DM_INFO_H_
#define CELIX_DM_INFO_H_
-
-
#include <stdbool.h>
+
#include "celix_array_list.h"
#include "celix_properties.h"
+#include "celix_framework_export.h"
#ifdef __cplusplus
extern "C" {
diff --git a/libs/framework/include/celix_dm_service_dependency.h b/libs/framework/include/celix_dm_service_dependency.h
index 2e9884d8..8faf31ec 100644
--- a/libs/framework/include/celix_dm_service_dependency.h
+++ b/libs/framework/include/celix_dm_service_dependency.h
@@ -23,8 +23,8 @@
#include "celix_types.h"
#include "celix_errno.h"
#include "celix_threads.h"
-
#include "celix_dm_info.h"
+#include "celix_framework_export.h"
#ifdef __cplusplus
extern "C" {
diff --git a/libs/framework/include/celix_framework.h b/libs/framework/include/celix_framework.h
index 5124bc44..2f5b8627 100644
--- a/libs/framework/include/celix_framework.h
+++ b/libs/framework/include/celix_framework.h
@@ -20,12 +20,13 @@
#ifndef CELIX_FRAMEWORK_H_
#define CELIX_FRAMEWORK_H_
+#include <stdarg.h>
#include "celix_types.h"
#include "celix_properties.h"
#include "celix_log_level.h"
#include "celix_array_list.h"
-#include <stdarg.h>
+#include "celix_framework_export.h"
#ifdef __cplusplus
extern "C" {
diff --git a/libs/framework/include/celix_framework_factory.h b/libs/framework/include/celix_framework_factory.h
index 36d31c68..50192229 100644
--- a/libs/framework/include/celix_framework_factory.h
+++ b/libs/framework/include/celix_framework_factory.h
@@ -21,6 +21,7 @@
#define CELIX_FRAMEWORK_FACTORY_H_
#include "celix_framework.h"
+#include "celix_framework_export.h"
#ifdef __cplusplus
extern "C" {
diff --git a/libs/framework/include/celix_framework_utils.h b/libs/framework/include/celix_framework_utils.h
index 0cd1168b..7cf449ac 100644
--- a/libs/framework/include/celix_framework_utils.h
+++ b/libs/framework/include/celix_framework_utils.h
@@ -20,9 +20,9 @@
#ifndef CELIX_FRAMEWORK_UTILS_H_
#define CELIX_FRAMEWORK_UTILS_H_
-
#include "celix_framework.h"
#include "celix_array_list.h"
+#include "celix_framework_export.h"
#ifdef __cplusplus
extern "C" {
diff --git a/libs/framework/include/celix_launcher.h b/libs/framework/include/celix_launcher.h
index 16985876..3627b40f 100644
--- a/libs/framework/include/celix_launcher.h
+++ b/libs/framework/include/celix_launcher.h
@@ -23,6 +23,7 @@
#include <stdio.h>
#include "celix_framework.h"
+#include "celix_framework_export.h"
#ifdef __cplusplus
extern "C" {
diff --git a/libs/framework/include/celix_log.h b/libs/framework/include/celix_log.h
index 994a29e1..e43d2709 100644
--- a/libs/framework/include/celix_log.h
+++ b/libs/framework/include/celix_log.h
@@ -21,10 +21,11 @@
#define CELIX_LOG_H_
#include <stdio.h>
+#include <stdarg.h>
#include "celix_log_level.h"
#include "celix_errno.h"
-#include <stdarg.h>
+#include "celix_framework_export.h"
#ifdef __cplusplus
extern "C" {
diff --git a/libs/framework/include/celix_service_event.h b/libs/framework/include/celix_service_event.h
index 213c4bca..2fc37cf0 100644
--- a/libs/framework/include/celix_service_event.h
+++ b/libs/framework/include/celix_service_event.h
@@ -17,11 +17,11 @@
* under the License.
*/
-#include "celix_types.h"
-
#ifndef CELIX_SERVICE_EVENT_H_
#define CELIX_SERVICE_EVENT_H_
+#include "celix_types.h"
+
#ifdef __cplusplus
extern "C" {
#endif