Apache Celix  2.3.0
An implementation of the OSGi specification adapted to C and C++
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 #include "celix_types.h"
21 #include "bundle_state.h"
22 #include "celix_properties.h"
23 #include "celix_array_list.h"
24 
25 #ifndef CELIX_BUNDLE_H_
26 #define CELIX_BUNDLE_H_
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
37 long celix_bundle_getId(const celix_bundle_t *bnd);
38 
44 celix_bundle_state_e celix_bundle_getState(const celix_bundle_t *bnd);
45 
59 char* celix_bundle_getEntry(const celix_bundle_t* bnd, const char *path);
60 
68 const char* celix_bundle_getManifestValue(const celix_bundle_t* bnd, const char* attribute);
69 
74 const char* celix_bundle_getGroup(const celix_bundle_t *bnd);
75 
80 const char* celix_bundle_getSymbolicName(const celix_bundle_t *bnd);
81 
86 const char* celix_bundle_getName(const celix_bundle_t* bnd);
87 
92 const char* celix_bundle_getDescription(const celix_bundle_t* bnd);
93 
97 bool celix_bundle_isSystemBundle(const celix_bundle_t *bnd);
98 
100  long serviceId;
102  char *serviceName;
103  celix_properties_t *serviceProperties;
104  bool factory;
106 
114 celix_array_list_t* celix_bundle_listRegisteredServices(const celix_bundle_t *bnd);
115 
119 void celix_bundle_destroyRegisteredServicesList(celix_array_list_t* list);
120 
121 
126  char *filter;
127  char *serviceName;
131 
132 
140 celix_array_list_t* celix_bundle_listServiceTrackers(const celix_bundle_t *bnd);
141 
145 void celix_bundle_destroyServiceTrackerList(celix_array_list_t* list);
146 
147 
148 #ifdef __cplusplus
149 }
150 #endif
151 
152 #endif /* CELIX_BUNDLE_H_ */
celix_bundle_getDescription
const char * celix_bundle_getDescription(const celix_bundle_t *bnd)
Returns the description of the bundle. Note the return value is valid as long as the bundle is instal...
celix_bundle_service_tracker_list_entry
Definition: celix_bundle.h:125
celix_bundle_service_list_entry::serviceProperties
celix_properties_t * serviceProperties
Definition: celix_bundle.h:103
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:127
celix_bundle_service_list_entry::serviceId
long serviceId
Definition: celix_bundle.h:100
celix_bundle_listRegisteredServices
celix_array_list_t * celix_bundle_listRegisteredServices(const celix_bundle_t *bnd)
celix_bundle_destroyServiceTrackerList
void celix_bundle_destroyServiceTrackerList(celix_array_list_t *list)
celix_bundle_service_list_entry
Definition: celix_bundle.h:99
celix_bundle_service_tracker_list_entry_t
struct celix_bundle_service_tracker_list_entry celix_bundle_service_tracker_list_entry_t
celix_bundle_service_list_entry::bundleOwner
long bundleOwner
Definition: celix_bundle.h:101
celix_bundle_getEntry
char * celix_bundle_getEntry(const celix_bundle_t *bnd, const char *path)
celix_bundle_service_list_entry::serviceName
char * serviceName
Definition: celix_bundle.h:102
celix_bundle_getState
celix_bundle_state_e celix_bundle_getState(const celix_bundle_t *bnd)
Returns the bundle state.
celix_bundle_service_tracker_list_entry::filter
char * filter
Definition: celix_bundle.h:126
celix_bundle_isSystemBundle
bool celix_bundle_isSystemBundle(const celix_bundle_t *bnd)
Returns whether the bundle is the system bundle.
celix_bundle_getSymbolicName
const char * celix_bundle_getSymbolicName(const celix_bundle_t *bnd)
Returns the symbolic name of the bundle. Note the return value is valid as long as the bundle is inst...
celix_bundle_destroyRegisteredServicesList
void celix_bundle_destroyRegisteredServicesList(celix_array_list_t *list)
celix_bundle_getGroup
const char * celix_bundle_getGroup(const celix_bundle_t *bnd)
Returns the group of the bundle. Groups are used to order bundles. Note the return value is valid as ...
celix_bundle_getId
long celix_bundle_getId(const celix_bundle_t *bnd)
Returns the bundle id.
celix_bundle_getName
const char * celix_bundle_getName(const celix_bundle_t *bnd)
Returns the name of the bundle. Note the return value is valid as long as the bundle is installed.
celix_bundle_service_tracker_list_entry::nrOfTrackedServices
size_t nrOfTrackedServices
Definition: celix_bundle.h:129
celix_bundle_service_tracker_list_entry::bundleOwner
long bundleOwner
Definition: celix_bundle.h:128
celix_bundle_listServiceTrackers
celix_array_list_t * celix_bundle_listServiceTrackers(const celix_bundle_t *bnd)
celix_bundle_getManifestValue
const char * celix_bundle_getManifestValue(const celix_bundle_t *bnd, const char *attribute)
Get a manifest attribute value from the bundle manifest.
celix_bundle_service_list_entry::factory
bool factory
Definition: celix_bundle.h:104