Apache Celix  latest
Apache Celix is a framework for C, C++14 and C++17 to develop dynamic modular software applications using component and in-process service-oriented programming.
celix_bundle.h
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one
3  * or more contributor license agreements. See the NOTICE file
4  * distributed with this work for additional information
5  * regarding copyright ownership. The ASF licenses this file
6  * to you under the Apache License, Version 2.0 (the
7  * "License"); you may not use this file except in compliance
8  * with the License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing,
13  * software distributed under the License is distributed on an
14  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15  * KIND, either express or implied. See the License for the
16  * specific language governing permissions and limitations
17  * under the License.
18  */
19 
20 #ifndef CELIX_BUNDLE_H_
21 #define CELIX_BUNDLE_H_
22 
23 #include "celix_types.h"
24 #include "celix_bundle_state.h"
25 #include "celix_properties.h"
26 #include "celix_array_list.h"
27 #include "celix_version.h"
28 #include "celix_framework_export.h"
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
39 CELIX_FRAMEWORK_EXPORT long celix_bundle_getId(const celix_bundle_t *bnd);
40 
46 CELIX_FRAMEWORK_EXPORT celix_bundle_state_e celix_bundle_getState(const celix_bundle_t *bnd);
47 
67 CELIX_FRAMEWORK_EXPORT char* celix_bundle_getEntry(const celix_bundle_t* bnd, const char *path);
68 
87 CELIX_FRAMEWORK_EXPORT char* celix_bundle_getDataFile(const celix_bundle_t* bnd, const char *path);
88 
96 CELIX_FRAMEWORK_EXPORT const char* celix_bundle_getManifestValue(const celix_bundle_t* bnd, const char* attribute);
97 
102 CELIX_FRAMEWORK_EXPORT const char* celix_bundle_getGroup(const celix_bundle_t *bnd);
103 
108 CELIX_FRAMEWORK_EXPORT const char* celix_bundle_getSymbolicName(const celix_bundle_t *bnd);
109 
114 CELIX_FRAMEWORK_EXPORT const char* celix_bundle_getName(const celix_bundle_t* bnd);
115 
120 CELIX_FRAMEWORK_EXPORT const char* celix_bundle_getDescription(const celix_bundle_t* bnd);
121 
130 CELIX_FRAMEWORK_EXPORT char* celix_bundle_getLocation(const celix_bundle_t *bnd);
131 
136 CELIX_FRAMEWORK_EXPORT const celix_version_t* celix_bundle_getVersion(const celix_bundle_t *bnd);
137 
141 CELIX_FRAMEWORK_EXPORT bool celix_bundle_isSystemBundle(const celix_bundle_t *bnd);
142 
144  long serviceId;
146  char *serviceName;
147  celix_properties_t *serviceProperties;
148  bool factory;
150 
158 CELIX_FRAMEWORK_EXPORT celix_array_list_t* celix_bundle_listRegisteredServices(const celix_bundle_t *bnd);
159 
163 CELIX_FRAMEWORK_EXPORT void celix_bundle_destroyRegisteredServicesList(celix_array_list_t* list);
164 
165 
170  char *filter;
171  char *serviceName;
175 
186 CELIX_FRAMEWORK_EXPORT celix_array_list_t* celix_bundle_listServiceTrackers(const celix_bundle_t* bnd);
187 
188 #ifdef __cplusplus
189 }
190 #endif
191 
192 #endif /* CELIX_BUNDLE_H_ */
celix_bundle_service_tracker_list_entry
Definition: celix_bundle.h:169
celix_bundle_getName
const CELIX_FRAMEWORK_EXPORT char * celix_bundle_getName(const celix_bundle_t *bnd)
Return the name of the bundle. Note the return value is valid as long as the bundle is installed.
celix_bundle_service_list_entry::serviceProperties
celix_properties_t * serviceProperties
Definition: celix_bundle.h:147
celix_bundle_service_list_entry_t
struct celix_bundle_service_list_entry celix_bundle_service_list_entry_t
celix_bundle_service_tracker_list_entry::serviceName
char * serviceName
Definition: celix_bundle.h:171
celix_bundle_service_list_entry::serviceId
long serviceId
Definition: celix_bundle.h:144
celix_bundle_getEntry
CELIX_FRAMEWORK_EXPORT char * celix_bundle_getEntry(const celix_bundle_t *bnd, const char *path)
celix_bundle_service_list_entry
Definition: celix_bundle.h:143
celix_bundle_getSymbolicName
const CELIX_FRAMEWORK_EXPORT char * celix_bundle_getSymbolicName(const celix_bundle_t *bnd)
Return the symbolic name of the bundle. Note the return value is valid as long as the bundle is insta...
celix_bundle_service_tracker_list_entry_t
struct celix_bundle_service_tracker_list_entry celix_bundle_service_tracker_list_entry_t
celix_bundle_destroyRegisteredServicesList
CELIX_FRAMEWORK_EXPORT void celix_bundle_destroyRegisteredServicesList(celix_array_list_t *list)
celix_bundle_getVersion
const CELIX_FRAMEWORK_EXPORT celix_version_t * celix_bundle_getVersion(const celix_bundle_t *bnd)
Return the bundle version. Note the return value is valid as long as the bundle is installed.
celix_bundle_service_list_entry::bundleOwner
long bundleOwner
Definition: celix_bundle.h:145
celix_bundle_getDataFile
CELIX_FRAMEWORK_EXPORT char * celix_bundle_getDataFile(const celix_bundle_t *bnd, const char *path)
celix_bundle_service_list_entry::serviceName
char * serviceName
Definition: celix_bundle.h:146
celix_bundle_service_tracker_list_entry::filter
char * filter
Definition: celix_bundle.h:170
celix_bundle_isSystemBundle
CELIX_FRAMEWORK_EXPORT bool celix_bundle_isSystemBundle(const celix_bundle_t *bnd)
Return whether the bundle is the system bundle.
celix_bundle_getId
CELIX_FRAMEWORK_EXPORT long celix_bundle_getId(const celix_bundle_t *bnd)
Return the bundle id.
celix_bundle_getLocation
CELIX_FRAMEWORK_EXPORT char * celix_bundle_getLocation(const celix_bundle_t *bnd)
Return the update location of the bundle. The location the location passed to celix_bundleContext_ins...
celix_bundle_listRegisteredServices
CELIX_FRAMEWORK_EXPORT celix_array_list_t * celix_bundle_listRegisteredServices(const celix_bundle_t *bnd)
celix_bundle_listServiceTrackers
CELIX_FRAMEWORK_EXPORT celix_array_list_t * celix_bundle_listServiceTrackers(const celix_bundle_t *bnd)
celix_bundle_getManifestValue
const CELIX_FRAMEWORK_EXPORT char * celix_bundle_getManifestValue(const celix_bundle_t *bnd, const char *attribute)
Get a manifest attribute value from the bundle manifest.
celix_bundle_getDescription
const CELIX_FRAMEWORK_EXPORT char * celix_bundle_getDescription(const celix_bundle_t *bnd)
Return the description of the bundle. Note the return value is valid as long as the bundle is install...
celix_bundle_service_tracker_list_entry::nrOfTrackedServices
size_t nrOfTrackedServices
Definition: celix_bundle.h:173
celix_bundle_service_tracker_list_entry::bundleOwner
long bundleOwner
Definition: celix_bundle.h:172
celix_bundle_getGroup
const CELIX_FRAMEWORK_EXPORT char * celix_bundle_getGroup(const celix_bundle_t *bnd)
Return the group of the bundle. Groups are used to order bundles. Note the return value is valid as l...
celix_bundle_getState
CELIX_FRAMEWORK_EXPORT celix_bundle_state_e celix_bundle_getState(const celix_bundle_t *bnd)
Return the bundle state.
celix_bundle_service_list_entry::factory
bool factory
Definition: celix_bundle.h:148