This is an automated email from the ASF dual-hosted git repository. pnoltes pushed a commit to branch feature/87-add-additional-svc-tracker-bundle-context-funtions in repository https://gitbox.apache.org/repos/asf/celix.git
commit 9d2e7a51c66221ccf71ac77a7932ba9d5637cc60 Author: Pepijn Noltes <[email protected]> AuthorDate: Sun Feb 11 15:37:45 2024 +0100 gh-87: Add celix_bundle_context_type.h header. --- libs/framework/include/celix_bundle_context.h | 11 ++---- libs/framework/include/celix_bundle_context_type.h | 41 ++++++++++++++++++++++ libs/framework/include/celix_types.h | 4 +-- 3 files changed, 46 insertions(+), 10 deletions(-) diff --git a/libs/framework/include/celix_bundle_context.h b/libs/framework/include/celix_bundle_context.h index dea42003..e46996e9 100644 --- a/libs/framework/include/celix_bundle_context.h +++ b/libs/framework/include/celix_bundle_context.h @@ -20,17 +20,12 @@ #ifndef CELIX_BUNDLE_CONTEXT_H_ #define CELIX_BUNDLE_CONTEXT_H_ -#include <stdarg.h> - -#include "celix_cleanup.h" -#include "celix_types.h" -#include "celix_service_factory.h" -#include "celix_properties.h" -#include "celix_array_list.h" +#include "celix_bundle_context_type.h" +#include "celix_framework_export.h" #include "celix_filter.h" +#include "celix_service_factory.h" #include "celix_bundle_event.h" #include "celix_log_level.h" -#include "celix_framework_export.h" #ifdef __cplusplus extern "C" { diff --git a/libs/framework/include/celix_bundle_context_type.h b/libs/framework/include/celix_bundle_context_type.h new file mode 100644 index 00000000..1ccedef0 --- /dev/null +++ b/libs/framework/include/celix_bundle_context_type.h @@ -0,0 +1,41 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +#ifndef CELIX_BUNDLE_CONTEXT_TYPE_H +#define CELIX_BUNDLE_CONTEXT_TYPE_H + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @file celix_bundle_context_type.h + * @brief Header file for celix_bundle_context_t opaque type. Can be used for forward declaration. + */ + +/** + * @brief The opaque type representing a bundle context. + */ +typedef struct celix_bundle_context celix_bundle_context_t; + +#ifdef __cplusplus +} +#endif + +#endif //CELIX_BUNDLE_CONTEXT_TYPE_H diff --git a/libs/framework/include/celix_types.h b/libs/framework/include/celix_types.h index 201875fe..a73bac6f 100644 --- a/libs/framework/include/celix_types.h +++ b/libs/framework/include/celix_types.h @@ -20,12 +20,13 @@ #ifndef CELIX_CELIX_TYPES_H #define CELIX_CELIX_TYPES_H +#include "celix_bundle_context_type.h" + /** * Celix types contains the declaration of many of the celix types. * These types are declared in a separate header for forward declaration */ - #ifdef ADD_CELIX_DEPRECATED_WARNING #define CELIX_DEPRECATED_ATTR __attribute__ ((deprecated)) #define CELIX_DEPRECATED_ATTR_MSG(msg) __attribute__ ((deprecated(msg))) @@ -40,7 +41,6 @@ extern "C" { typedef struct celix_framework celix_framework_t; typedef struct celix_bundle celix_bundle_t; -typedef struct celix_bundle_context celix_bundle_context_t; typedef struct celix_dependency_manager celix_dependency_manager_t; typedef struct celix_dm_component_struct celix_dm_component_t; typedef struct celix_dm_service_dependency celix_dm_service_dependency_t;
