Apache Celix
2.3.0
An implementation of the OSGi specification adapted to C and C++
|
Go to the documentation of this file.
45 celix_properties_t *cProperties = properties_create();
47 properties_set(cProperties, pair.first.c_str(), pair.second.c_str());
64 "BaseProvidedService::wait: Cannot wait for Celix event queue on the Celix event queue thread! "
65 "Use async DepMan API instead.");
70 template<
typename T,
typename I>
72 svcVersion = std::move(v);
76 template<
typename T,
typename I>
78 properties = std::move(p);
82 template<
typename T,
typename I>
85 properties[key] = std::to_string(value);
89 template<
typename T,
typename I>
96 template<
typename T,
typename I>
102 template<
typename T,
typename I>
104 :
BaseProvidedService(_cmp, svcName, std::static_pointer_cast<void>(std::move(_svc)), _cppService) {
108 template<
typename T,
typename I>
110 properties[key] = std::string{value};
114 template<
typename T,
typename I>
116 properties[key] = value;
Definition: ProvidedService.h:57
bool cppService
Definition: ProvidedService.h:50
ProvidedService< T, I > & setVersion(std::string v)
Definition: ProvidedService_Impl.h:71
Definition: ProvidedService.h:29
celix_status_t celix_dmComponent_addInterface(celix_dm_component_t *component, const char *serviceName, const char *serviceVersion, const void *service, celix_properties_t *properties)
std::string svcName
Definition: ProvidedService.h:48
ProvidedService(celix_dm_component_t *_cmp, std::string svcName, std::shared_ptr< I > svc, bool _cppService)
Definition: ProvidedService_Impl.h:103
bool provideAddedToCmp
Definition: ProvidedService.h:53
void wait() const
Definition: ProvidedService_Impl.h:56
void celix_bundleContext_waitForEvents(celix_bundle_context_t *ctx)
Wait until all Celix event for this bundle are completed.
celix_bundle_context_t * celix_dmComponent_getBundleContext(celix_dm_component_t *component)
std::shared_ptr< void > svc
Definition: ProvidedService.h:49
const std::string & getVersion() const
Definition: ProvidedService_Impl.h:26
std::string svcVersion
Definition: ProvidedService.h:51
ProvidedService< T, I > & buildAsync()
Definition: ProvidedService_Impl.h:97
ProvidedService< T, I > & build()
Definition: ProvidedService_Impl.h:90
celix::dm::Properties properties
Definition: ProvidedService.h:52
celix_framework_t * celix_bundleContext_getFramework(const celix_bundle_context_t *ctx)
const std::string & getName() const
Definition: ProvidedService_Impl.h:22
BaseProvidedService(celix_dm_component_t *_cmp, std::string svcName, std::shared_ptr< void > svc, bool _cppService)
Definition: ProvidedService_Impl.h:20
bool celix_framework_isCurrentThreadTheEventLoop(celix_framework_t *fw)
Returns whether the current thread is the Celix framework event loop thread.
void celix_bundleContext_log(const celix_bundle_context_t *ctx, celix_log_level_e level, const char *format,...)
Logs a message to Celix framework logger with the provided log level.
celix_dm_component_t * cCmp
Definition: ProvidedService.h:47
void runBuild()
Definition: ProvidedService_Impl.h:42
celix::Properties Properties
Definition: Properties.h:25
ProvidedService< T, I > & addProperty(const std::string &key, const U &value)
ProvidedService< T, I > & setProperties(celix::dm::Properties)
Definition: ProvidedService_Impl.h:77
const celix::dm::Properties & getProperties() const
Definition: ProvidedService_Impl.h:38
bool isCppService() const
Definition: ProvidedService_Impl.h:30
void * getService() const
Definition: ProvidedService_Impl.h:34