http://git-wip-us.apache.org/repos/asf/celix/blob/a1c30887/framework/include/framework_exports.h ---------------------------------------------------------------------- diff --git a/framework/include/framework_exports.h b/framework/include/framework_exports.h new file mode 100644 index 0000000..50d7f6e --- /dev/null +++ b/framework/include/framework_exports.h @@ -0,0 +1,65 @@ +/** + *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. + */ +/* + * exports.h + */ + +#ifndef FRAMEWORK_EXPORTS_H_ +#define FRAMEWORK_EXPORTS_H_ + +/* Cmake will define celix_framework_EXPORTS on Windows when it +configures to build a shared library. If you are going to use +another build system on windows or create the visual studio +projects by hand you need to define celix_framework_EXPORTS when +building a DLL on windows. +*/ +// We are using the Visual Studio Compiler and building Shared libraries + +#if defined _WIN32 || defined __CYGWIN__ + #ifdef celix_framework_EXPORTS + #ifdef __GNUC__ + #define FRAMEWORK_EXPORT __attribute__ ((dllexport)) + #define ACTIVATOR_EXPORT __attribute__ ((dllexport)) + #else + #define ACTIVATOR_EXPORT __declspec(dllexport) + #define FRAMEWORK_EXPORT __declspec(dllexport) // Note: actually gcc seems to also supports this syntax. + #endif + #else + #ifdef __GNUC__ + #define ACTIVATOR_EXPORT __attribute__ ((dllexport)) + #define FRAMEWORK_EXPORT __attribute__ ((dllimport)) + #else + #define ACTIVATOR_EXPORT __declspec(dllexport) + #define FRAMEWORK_EXPORT __declspec(dllimport) // Note: actually gcc seems to also supports this syntax. + #endif + #endif + #define DLL_LOCAL +#else + #if __GNUC__ >= 4 + #define ACTIVATOR_EXPORT __attribute__ ((visibility ("default"))) + #define FRAMEWORK_EXPORT __attribute__ ((visibility ("default"))) + #define FRAMEWORK_LOCAL __attribute__ ((visibility ("hidden"))) + #else + #define ACTIVATOR_EXPORT + #define FRAMEWORK_EXPORT + #define FRAMEWORK_LOCAL + #endif +#endif + +#endif /* FRAMEWORK_EXPORTS_H_ */
http://git-wip-us.apache.org/repos/asf/celix/blob/a1c30887/framework/include/framework_listener.h ---------------------------------------------------------------------- diff --git a/framework/include/framework_listener.h b/framework/include/framework_listener.h new file mode 100644 index 0000000..f390e3b --- /dev/null +++ b/framework/include/framework_listener.h @@ -0,0 +1,55 @@ +/* + *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. + */ +/** + * + * @defgroup FrameworkListener Framework Listener + * @ingroup framework + * @{ + * + * \author <a href="mailto:[email protected]">Apache Celix Project Team</a> + * \date Oct 8, 2013 + * \copyright Apache License, Version 2.0 + */ +#ifndef FRAMEWORK_LISTENER_H_ +#define FRAMEWORK_LISTENER_H_ + +typedef struct framework_listener *framework_listener_pt; + +#include "celix_errno.h" +#include "framework_event.h" +#ifdef __cplusplus +extern "C" { +#endif + +struct framework_listener { + void *handle; + + celix_status_t (*frameworkEvent)(void *listener, framework_event_pt event); +}; + +#ifdef __cplusplus +} +#endif + + +#endif /* FRAMEWORK_LISTENER_H_ */ + +/** + * @} + */ http://git-wip-us.apache.org/repos/asf/celix/blob/a1c30887/framework/include/listener_hook_service.h ---------------------------------------------------------------------- diff --git a/framework/include/listener_hook_service.h b/framework/include/listener_hook_service.h new file mode 100644 index 0000000..1f0c966 --- /dev/null +++ b/framework/include/listener_hook_service.h @@ -0,0 +1,60 @@ +/* + *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. + */ +/* + * listener_hook_service.h + * + * \date Oct 28, 2011 + * \author <a href="mailto:[email protected]">Apache Celix Project Team</a> + * \copyright Apache License, Version 2.0 + */ + +#ifndef LISTENER_HOOK_SERVICE_H_ +#define LISTENER_HOOK_SERVICE_H_ + + +typedef struct listener_hook *listener_hook_pt; +typedef struct listener_hook_info *listener_hook_info_pt; +typedef struct listener_hook_service *listener_hook_service_pt; + +#include "bundle_context.h" + +#define OSGI_FRAMEWORK_LISTENER_HOOK_SERVICE_NAME "listener_hook_service" +#ifdef __cplusplus +extern "C" { +#endif + +struct listener_hook_info { + bundle_context_pt context; + char *filter; + bool removed; +}; + +struct listener_hook_service { + void *handle; + + celix_status_t (*added)(void *hook, array_list_pt listeners); + + celix_status_t (*removed)(void *hook, array_list_pt listeners); +}; + +#ifdef __cplusplus +} +#endif + +#endif /* LISTENER_HOOK_SERVICE_H_ */ http://git-wip-us.apache.org/repos/asf/celix/blob/a1c30887/framework/include/manifest.h ---------------------------------------------------------------------- diff --git a/framework/include/manifest.h b/framework/include/manifest.h new file mode 100644 index 0000000..eeccfbc --- /dev/null +++ b/framework/include/manifest.h @@ -0,0 +1,67 @@ +/** + *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. + */ +/* + * manifest.h + * + * \date Jul 5, 2010 + * \author <a href="mailto:[email protected]">Apache Celix Project Team</a> + * \copyright Apache License, Version 2.0 + */ + +#ifndef MANIFEST_H_ +#define MANIFEST_H_ + +#include "properties.h" +#include "celix_errno.h" +#include "framework_exports.h" + +#ifdef __cplusplus +extern "C" { +#endif + +struct manifest { + properties_pt mainAttributes; + hash_map_pt attributes; +}; + +typedef struct manifest *manifest_pt; + +FRAMEWORK_EXPORT celix_status_t manifest_create(manifest_pt *manifest); + +FRAMEWORK_EXPORT celix_status_t manifest_createFromFile(const char *filename, manifest_pt *manifest); + +FRAMEWORK_EXPORT celix_status_t manifest_destroy(manifest_pt manifest); + +FRAMEWORK_EXPORT void manifest_clear(manifest_pt manifest); + +FRAMEWORK_EXPORT properties_pt manifest_getMainAttributes(manifest_pt manifest); + +FRAMEWORK_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); + +FRAMEWORK_EXPORT void manifest_write(manifest_pt manifest, const char *filename); + +FRAMEWORK_EXPORT const char *manifest_getValue(manifest_pt manifest, const char *name); + +#ifdef __cplusplus +} +#endif + +#endif /* MANIFEST_H_ */ http://git-wip-us.apache.org/repos/asf/celix/blob/a1c30887/framework/include/module.h ---------------------------------------------------------------------- diff --git a/framework/include/module.h b/framework/include/module.h new file mode 100644 index 0000000..bc85ef4 --- /dev/null +++ b/framework/include/module.h @@ -0,0 +1,94 @@ +/** + *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. + */ +/* + * module.h + * + * \date Jul 12, 2010 + * \author <a href="mailto:[email protected]">Apache Celix Project Team</a> + * \copyright Apache License, Version 2.0 + */ + +#ifndef MODULE_H_ +#define MODULE_H_ + +typedef struct module *module_pt; + +#include "celixbool.h" +#include "linked_list.h" +#include "manifest.h" +#include "version.h" +#include "array_list.h" +#include "bundle.h" +#include "framework_exports.h" + +#ifdef __cplusplus +extern "C" { +#endif + +module_pt module_create(manifest_pt headerMap, const char *moduleId, bundle_pt bundle); + +module_pt module_createFrameworkModule(bundle_pt bundle); + +void module_destroy(module_pt module); + +FRAMEWORK_EXPORT unsigned int module_hash(void *module); + +FRAMEWORK_EXPORT int module_equals(void *module, void *compare); + +FRAMEWORK_EXPORT wire_pt module_getWire(module_pt module, const char *serviceName); + +FRAMEWORK_EXPORT version_pt module_getVersion(module_pt module); + +FRAMEWORK_EXPORT celix_status_t module_getSymbolicName(module_pt module, const char **symbolicName); + +FRAMEWORK_EXPORT char *module_getId(module_pt module); + +FRAMEWORK_EXPORT linked_list_pt module_getWires(module_pt module); + +FRAMEWORK_EXPORT void module_setWires(module_pt module, linked_list_pt wires); + +FRAMEWORK_EXPORT bool module_isResolved(module_pt module); + +FRAMEWORK_EXPORT void module_setResolved(module_pt module); + +FRAMEWORK_EXPORT bundle_pt module_getBundle(module_pt module); + +FRAMEWORK_EXPORT linked_list_pt module_getRequirements(module_pt module); + +FRAMEWORK_EXPORT linked_list_pt module_getCapabilities(module_pt module); + +FRAMEWORK_EXPORT array_list_pt module_getDependentImporters(module_pt module); + +FRAMEWORK_EXPORT void module_addDependentImporter(module_pt module, module_pt importer); + +FRAMEWORK_EXPORT void module_removeDependentImporter(module_pt module, module_pt importer); + +FRAMEWORK_EXPORT array_list_pt module_getDependentRequirers(module_pt module); + +FRAMEWORK_EXPORT void module_addDependentRequirer(module_pt module, module_pt requirer); + +FRAMEWORK_EXPORT void module_removeDependentRequirer(module_pt module, module_pt requirer); + +FRAMEWORK_EXPORT array_list_pt module_getDependents(module_pt module); + +#ifdef __cplusplus +} +#endif + +#endif /* MODULE_H_ */ http://git-wip-us.apache.org/repos/asf/celix/blob/a1c30887/framework/include/requirement.h ---------------------------------------------------------------------- diff --git a/framework/include/requirement.h b/framework/include/requirement.h new file mode 100644 index 0000000..febc62a --- /dev/null +++ b/framework/include/requirement.h @@ -0,0 +1,53 @@ +/** + *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. + */ +/* + * requirement.h + * + * \date Jul 12, 2010 + * \author <a href="mailto:[email protected]">Apache Celix Project Team</a> + * \copyright Apache License, Version 2.0 + */ + +#ifndef REQUIREMENT_H_ +#define REQUIREMENT_H_ + +typedef struct requirement *requirement_pt; + +#include "capability.h" +#include "hash_map.h" +#include "version_range.h" +#ifdef __cplusplus +extern "C" { +#endif + +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_status_t requirement_getVersionRange(requirement_pt requirement, version_range_pt *range); + +celix_status_t requirement_getTargetName(requirement_pt requirement, const char **targetName); + +celix_status_t requirement_isSatisfied(requirement_pt requirement, capability_pt capability, bool *inRange); + +#ifdef __cplusplus +} +#endif + +#endif /* REQUIREMENT_H_ */ http://git-wip-us.apache.org/repos/asf/celix/blob/a1c30887/framework/include/service_event.h ---------------------------------------------------------------------- diff --git a/framework/include/service_event.h b/framework/include/service_event.h new file mode 100644 index 0000000..a018b07 --- /dev/null +++ b/framework/include/service_event.h @@ -0,0 +1,68 @@ +/* + *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. + */ +/** + * + * @defgroup ServiceListener Service Listener + * @ingroup framework + * @{ + * + * \author <a href="mailto:[email protected]">Apache Celix Project Team</a> + * \date January 11, 2012 + * \copyright Apache License, Version 2.0 + */ +#ifndef SERVICE_EVENT_H_ +#define SERVICE_EVENT_H_ +#ifdef __cplusplus +extern "C" { +#endif + +enum serviceEventType { + OSGI_FRAMEWORK_SERVICE_EVENT_REGISTERED = 0x00000001, + OSGI_FRAMEWORK_SERVICE_EVENT_MODIFIED = 0x00000002, + OSGI_FRAMEWORK_SERVICE_EVENT_UNREGISTERING = 0x00000004, + OSGI_FRAMEWORK_SERVICE_EVENT_MODIFIED_ENDMATCH = 0x00000008, +}; + +typedef enum serviceEventType service_event_type_e; + +typedef struct serviceEvent *service_event_pt; +#ifdef __cplusplus +} +#endif + +#include "service_reference.h" + +#include "service_reference.h" +#ifdef __cplusplus +extern "C" { +#endif + +struct serviceEvent { + service_reference_pt reference; + service_event_type_e type; +}; +#ifdef __cplusplus +} +#endif + +#endif /* SERVICE_EVENT_H_ */ + +/** + * @} + */ http://git-wip-us.apache.org/repos/asf/celix/blob/a1c30887/framework/include/service_factory.h ---------------------------------------------------------------------- diff --git a/framework/include/service_factory.h b/framework/include/service_factory.h new file mode 100644 index 0000000..84e383a --- /dev/null +++ b/framework/include/service_factory.h @@ -0,0 +1,60 @@ +/** + *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. + */ +/* + * service_factory.h + * + * \date Jun 26, 2011 + * \author <a href="mailto:[email protected]">Apache Celix Project Team</a> + * \copyright Apache License, Version 2.0 + */ + +#ifndef SERVICE_FACTORY_H_ +#define SERVICE_FACTORY_H_ +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct service_factory service_factory_t; +typedef service_factory_t *service_factory_pt; +#ifdef __cplusplus +} +#endif + +#include "celix_errno.h" +#include "service_registration.h" +#include "bundle.h" + +#ifdef __cplusplus +extern "C" { +#endif + +struct service_factory { + void *handle; + + celix_status_t (*getService)(void *handle, bundle_pt bundle, service_registration_pt registration, void **service); + + celix_status_t + (*ungetService)(void *handle, bundle_pt bundle, service_registration_pt registration, void **service); +}; + +#ifdef __cplusplus +} +#endif + +#endif /* SERVICE_FACTORY_H_ */ http://git-wip-us.apache.org/repos/asf/celix/blob/a1c30887/framework/include/service_listener.h ---------------------------------------------------------------------- diff --git a/framework/include/service_listener.h b/framework/include/service_listener.h new file mode 100644 index 0000000..c887ba1 --- /dev/null +++ b/framework/include/service_listener.h @@ -0,0 +1,55 @@ +/* + *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. + */ +/** + * + * @defgroup ServiceListener Service Listener + * @ingroup framework + * @{ + * + * \author <a href="mailto:[email protected]">Apache Celix Project Team</a> + * \date January 11, 2012 + * \copyright Apache License, Version 2.0 + */ +#ifndef SERVICE_LISTENER_H_ +#define SERVICE_LISTENER_H_ + +typedef struct serviceListener * service_listener_pt; + +#include "celix_errno.h" +#include "service_event.h" +#ifdef __cplusplus +extern "C" { +#endif + +struct serviceListener { + void *handle; + + celix_status_t (*serviceChanged)(void *listener, service_event_pt event); +}; + +#ifdef __cplusplus +} +#endif + + +#endif /* SERVICE_LISTENER_H_ */ + +/** + * @} + */ http://git-wip-us.apache.org/repos/asf/celix/blob/a1c30887/framework/include/service_reference.h ---------------------------------------------------------------------- diff --git a/framework/include/service_reference.h b/framework/include/service_reference.h new file mode 100644 index 0000000..bb263f5 --- /dev/null +++ b/framework/include/service_reference.h @@ -0,0 +1,72 @@ +/** + *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. + */ +/* + * service_reference.h + * + * \date Jul 20, 2010 + * \author <a href="mailto:[email protected]">Apache Celix Project Team</a> + * \copyright Apache License, Version 2.0 + */ + +#ifndef SERVICE_REFERENCE_H_ +#define SERVICE_REFERENCE_H_ + +typedef struct serviceReference * service_reference_pt; + +#include "celixbool.h" +#include "array_list.h" +#include "service_registration.h" +#include "bundle.h" +#include "framework_exports.h" + +#ifdef __cplusplus +extern "C" { +#endif + +FRAMEWORK_EXPORT celix_status_t serviceReference_getBundle(service_reference_pt reference, bundle_pt *bundle); + +FRAMEWORK_EXPORT bool +serviceReference_isAssignableTo(service_reference_pt reference, bundle_pt requester, const char *serviceName); + +FRAMEWORK_EXPORT celix_status_t +serviceReference_getProperty(service_reference_pt reference, const char *key, const char **value); + +FRAMEWORK_EXPORT celix_status_t +serviceReference_getPropertyKeys(service_reference_pt reference, char **keys[], unsigned int *size); + +FRAMEWORK_EXPORT celix_status_t +serviceReference_getServiceRegistration(service_reference_pt reference, service_registration_pt *registration); + +FRAMEWORK_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); + +FRAMEWORK_EXPORT int serviceReference_equals2(const void *reference1, const void *reference2); + +FRAMEWORK_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, array_list_pt *out); + +#ifdef __cplusplus +} +#endif + +#endif /* SERVICE_REFERENCE_H_ */ http://git-wip-us.apache.org/repos/asf/celix/blob/a1c30887/framework/include/service_registration.h ---------------------------------------------------------------------- diff --git a/framework/include/service_registration.h b/framework/include/service_registration.h new file mode 100644 index 0000000..9265a00 --- /dev/null +++ b/framework/include/service_registration.h @@ -0,0 +1,58 @@ +/** + *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. + */ +/* + * service_registration.h + * + * \date Aug 6, 2010 + * \author <a href="mailto:[email protected]">Apache Celix Project Team</a> + * \copyright Apache License, Version 2.0 + */ + +#ifndef SERVICE_REGISTRATION_H_ +#define SERVICE_REGISTRATION_H_ + +#include "celixbool.h" + +typedef struct serviceRegistration * service_registration_pt; + +#include "service_registry.h" +#include "array_list.h" +#include "bundle.h" +#include "framework_exports.h" + +#ifdef __cplusplus +extern "C" { +#endif + +FRAMEWORK_EXPORT celix_status_t serviceRegistration_unregister(service_registration_pt registration); + +FRAMEWORK_EXPORT celix_status_t +serviceRegistration_getProperties(service_registration_pt registration, properties_pt *properties); + +FRAMEWORK_EXPORT celix_status_t +serviceRegistration_setProperties(service_registration_pt registration, properties_pt properties); + +FRAMEWORK_EXPORT celix_status_t +serviceRegistration_getServiceName(service_registration_pt registration, const char **serviceName); + +#ifdef __cplusplus +} +#endif + +#endif /* SERVICE_REGISTRATION_H_ */ http://git-wip-us.apache.org/repos/asf/celix/blob/a1c30887/framework/include/service_registry.h ---------------------------------------------------------------------- diff --git a/framework/include/service_registry.h b/framework/include/service_registry.h new file mode 100644 index 0000000..9a2ec48 --- /dev/null +++ b/framework/include/service_registry.h @@ -0,0 +1,103 @@ +/** + *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. + */ +/* + * service_registry.h + * + * \date Aug 6, 2010 + * \author <a href="mailto:[email protected]">Apache Celix Project Team</a> + * \copyright Apache License, Version 2.0 + */ + +#ifndef SERVICE_REGISTRY_H_ +#define SERVICE_REGISTRY_H_ + +typedef struct serviceRegistry * service_registry_pt; + +#include "properties.h" +#include "filter.h" +#include "service_factory.h" +#include "service_event.h" +#include "array_list.h" +#include "service_registration.h" +#ifdef __cplusplus +extern "C" { +#endif + +typedef void (*serviceChanged_function_pt)(framework_pt, service_event_type_e, service_registration_pt, properties_pt); + +celix_status_t serviceRegistry_create(framework_pt framework, serviceChanged_function_pt serviceChanged, + service_registry_pt *registry); + +celix_status_t serviceRegistry_destroy(service_registry_pt registry); + +celix_status_t +serviceRegistry_getRegisteredServices(service_registry_pt registry, bundle_pt bundle, array_list_pt *services); + +celix_status_t +serviceRegistry_getServicesInUse(service_registry_pt registry, bundle_pt bundle, array_list_pt *services); + +celix_status_t serviceRegistry_registerService(service_registry_pt registry, bundle_pt bundle, const char *serviceName, + const void *serviceObject, properties_pt dictionary, + service_registration_pt *registration); + +celix_status_t +serviceRegistry_registerServiceFactory(service_registry_pt registry, bundle_pt bundle, const char *serviceName, + service_factory_pt factory, properties_pt dictionary, + service_registration_pt *registration); + +celix_status_t +serviceRegistry_unregisterService(service_registry_pt registry, bundle_pt bundle, service_registration_pt registration); + +celix_status_t serviceRegistry_clearServiceRegistrations(service_registry_pt registry, bundle_pt bundle); + +celix_status_t serviceRegistry_getServiceReference(service_registry_pt registry, bundle_pt bundle, + service_registration_pt registration, + service_reference_pt *reference); + +celix_status_t +serviceRegistry_getServiceReferences(service_registry_pt registry, bundle_pt bundle, const char *serviceName, + filter_pt filter, array_list_pt *references); + +celix_status_t +serviceRegistry_retainServiceReference(service_registry_pt registry, bundle_pt bundle, service_reference_pt reference); + +celix_status_t +serviceRegistry_ungetServiceReference(service_registry_pt registry, bundle_pt bundle, service_reference_pt reference); + +celix_status_t +serviceRegistry_getService(service_registry_pt registry, bundle_pt bundle, service_reference_pt reference, + const void **service); + +celix_status_t +serviceRegistry_ungetService(service_registry_pt registry, bundle_pt bundle, service_reference_pt reference, + bool *result); + +celix_status_t serviceRegistry_clearReferencesFor(service_registry_pt registry, bundle_pt bundle); + +celix_status_t serviceRegistry_getListenerHooks(service_registry_pt registry, bundle_pt bundle, array_list_pt *hooks); + +celix_status_t +serviceRegistry_servicePropertiesModified(service_registry_pt registry, service_registration_pt registration, + properties_pt oldprops); + +#ifdef __cplusplus +} +#endif + +#endif /* SERVICE_REGISTRY_H_ */ http://git-wip-us.apache.org/repos/asf/celix/blob/a1c30887/framework/include/service_tracker.h ---------------------------------------------------------------------- diff --git a/framework/include/service_tracker.h b/framework/include/service_tracker.h new file mode 100644 index 0000000..aa19d50 --- /dev/null +++ b/framework/include/service_tracker.h @@ -0,0 +1,72 @@ +/** + *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. + */ +/* + * service_tracker.h + * + * \date Apr 20, 2010 + * \author <a href="mailto:[email protected]">Apache Celix Project Team</a> + * \copyright Apache License, Version 2.0 + */ + +#ifndef SERVICE_TRACKER_H_ +#define SERVICE_TRACKER_H_ + +#include "service_listener.h" +#include "array_list.h" +#include "bundle_context.h" +#include "service_tracker_customizer.h" +#include "framework_exports.h" + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct serviceTracker *service_tracker_pt; + +FRAMEWORK_EXPORT celix_status_t +serviceTracker_create(bundle_context_pt context, const char *service, service_tracker_customizer_pt customizer, + service_tracker_pt *tracker); + +FRAMEWORK_EXPORT celix_status_t +serviceTracker_createWithFilter(bundle_context_pt context, const char *filter, service_tracker_customizer_pt customizer, + service_tracker_pt *tracker); + +FRAMEWORK_EXPORT celix_status_t serviceTracker_open(service_tracker_pt tracker); + +FRAMEWORK_EXPORT celix_status_t serviceTracker_close(service_tracker_pt tracker); + +FRAMEWORK_EXPORT celix_status_t serviceTracker_destroy(service_tracker_pt tracker); + +FRAMEWORK_EXPORT service_reference_pt serviceTracker_getServiceReference(service_tracker_pt tracker); + +FRAMEWORK_EXPORT array_list_pt serviceTracker_getServiceReferences(service_tracker_pt tracker); + +FRAMEWORK_EXPORT void *serviceTracker_getService(service_tracker_pt tracker); + +FRAMEWORK_EXPORT array_list_pt serviceTracker_getServices(service_tracker_pt tracker); + +FRAMEWORK_EXPORT void *serviceTracker_getServiceByReference(service_tracker_pt tracker, service_reference_pt reference); + +FRAMEWORK_EXPORT void serviceTracker_serviceChanged(service_listener_pt listener, service_event_pt event); + +#ifdef __cplusplus +} +#endif + +#endif /* SERVICE_TRACKER_H_ */ http://git-wip-us.apache.org/repos/asf/celix/blob/a1c30887/framework/include/service_tracker_customizer.h ---------------------------------------------------------------------- diff --git a/framework/include/service_tracker_customizer.h b/framework/include/service_tracker_customizer.h new file mode 100644 index 0000000..19672d8 --- /dev/null +++ b/framework/include/service_tracker_customizer.h @@ -0,0 +1,78 @@ +/** + *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. + */ +/* + * service_tracker_customizer.h + * + * \date Nov 15, 2012 + * \author <a href="mailto:[email protected]">Apache Celix Project Team</a> + * \copyright Apache License, Version 2.0 + */ + + +#ifndef service_tracker_customizer_t_H_ +#define service_tracker_customizer_t_H_ + +#include <celix_errno.h> +#include <service_reference.h> + +#ifdef __cplusplus +extern "C" { +#endif + +typedef celix_status_t (*adding_callback_pt)(void *handle, service_reference_pt reference, void **service); + +typedef celix_status_t (*added_callback_pt)(void *handle, service_reference_pt reference, void *service); + +typedef celix_status_t (*modified_callback_pt)(void *handle, service_reference_pt reference, void *service); + +typedef celix_status_t (*removed_callback_pt)(void *handle, service_reference_pt reference, void *service); + +typedef struct serviceTrackerCustomizer *service_tracker_customizer_pt; +typedef struct serviceTrackerCustomizer service_tracker_customizer_t; + + +FRAMEWORK_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); + +FRAMEWORK_EXPORT celix_status_t +serviceTrackerCustomizer_getHandle(service_tracker_customizer_pt customizer, void **handle); + +FRAMEWORK_EXPORT celix_status_t +serviceTrackerCustomizer_getAddingFunction(service_tracker_customizer_pt customizer, adding_callback_pt *function); + +FRAMEWORK_EXPORT celix_status_t +serviceTrackerCustomizer_getAddedFunction(service_tracker_customizer_pt customizer, added_callback_pt *function); + +FRAMEWORK_EXPORT celix_status_t +serviceTrackerCustomizer_getModifiedFunction(service_tracker_customizer_pt customizer, modified_callback_pt *function); + +FRAMEWORK_EXPORT celix_status_t +serviceTrackerCustomizer_getRemovedFunction(service_tracker_customizer_pt customizer, removed_callback_pt *function); + +#ifdef __cplusplus +} +#endif + +#endif /* service_tracker_customizer_t_H_ */ http://git-wip-us.apache.org/repos/asf/celix/blob/a1c30887/framework/include/wire.h ---------------------------------------------------------------------- diff --git a/framework/include/wire.h b/framework/include/wire.h new file mode 100644 index 0000000..9bb9e02 --- /dev/null +++ b/framework/include/wire.h @@ -0,0 +1,120 @@ +/** + *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. + */ +/* + * wire.h + * + * \date Jul 12, 2010 + * \author <a href="mailto:[email protected]">Apache Celix Project Team</a> + * \copyright Apache License, Version 2.0 + */ + +#ifndef WIRE_H_ +#define WIRE_H_ + +typedef struct wire *wire_pt; + +#include "requirement.h" +#include "capability.h" +#include "module.h" +#include "linked_list.h" +#include "module.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @defgroup Version Version + * @ingroup framework + * @{ + */ + +/** + * Create a wire between two modules using a requirement and capability. + * + * @param importer The importer module of the wire. + * @param requirement The requirement of the importer. + * @param exporter The exporter module of the wire. + * @param capability The capability of the wire. + * @param wire The created wire. + * @return Status code indication failure or success: + * - 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, + module_pt exporter, capability_pt capability, wire_pt *wire); + +/** + * Getter for the capability of the exporting module. + * + * @param wire The wire to get the capability from. + * @param capability The capability + * @return Status code indication failure or success: + * - CELIX_SUCCESS when no errors are encountered. + */ +celix_status_t wire_destroy(wire_pt wire); + +/** + * Getter for the capability of the exporting module. + * + * @param wire The wire to get the capability from. + * @param capability The capability + * @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); + +/** + * Getter for the requirement of the importing module. + * + * @param wire The wire to get the requirement from. + * @param requirement The requirement + * @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); + +/** + * Getter for the importer of the wire. + * + * @param wire The wire to get the importer from. + * @param importer The importing module. + * @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); + +/** + * Getter for the exporter of the wire. + * + * @param wire The wire to get the exporter from. + * @param exporter The exporting module. + * @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); + +/** + * @} + */ +#ifdef __cplusplus +} +#endif + +#endif /* WIRE_H_ */ http://git-wip-us.apache.org/repos/asf/celix/blob/a1c30887/framework/private/include/attribute.h ---------------------------------------------------------------------- diff --git a/framework/private/include/attribute.h b/framework/private/include/attribute.h deleted file mode 100644 index 6f41f0c..0000000 --- a/framework/private/include/attribute.h +++ /dev/null @@ -1,39 +0,0 @@ -/** - *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. - */ -/* - * attribute.h - * - * \date Jul 27, 2010 - * \author <a href="mailto:[email protected]">Apache Celix Project Team</a> - * \copyright Apache License, Version 2.0 - */ -#ifndef ATTRIBUTE_H_ -#define ATTRIBUTE_H_ - -#include "celix_errno.h" - -typedef struct attribute *attribute_pt; - -celix_status_t attribute_create(char * key, char * value, attribute_pt *attribute); -celix_status_t attribute_destroy(attribute_pt attribute); - -celix_status_t attribute_getKey(attribute_pt attribute, char **key); -celix_status_t attribute_getValue(attribute_pt attribute, char **value); - -#endif /* ATTRIBUTE_H_ */ http://git-wip-us.apache.org/repos/asf/celix/blob/a1c30887/framework/private/include/attribute_private.h ---------------------------------------------------------------------- diff --git a/framework/private/include/attribute_private.h b/framework/private/include/attribute_private.h deleted file mode 100644 index 339833f..0000000 --- a/framework/private/include/attribute_private.h +++ /dev/null @@ -1,39 +0,0 @@ -/** - *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. - */ -/* - * attribute_private.h - * - * \date Feb 11, 2013 - * \author <a href="mailto:[email protected]">Apache Celix Project Team</a> - * \copyright Apache License, Version 2.0 - */ - - -#ifndef ATTRIBUTE_PRIVATE_H_ -#define ATTRIBUTE_PRIVATE_H_ - -#include "attribute.h" - -struct attribute { - char * key; - char * value; -}; - - -#endif /* ATTRIBUTE_PRIVATE_H_ */ http://git-wip-us.apache.org/repos/asf/celix/blob/a1c30887/framework/private/include/bundle_cache.h ---------------------------------------------------------------------- diff --git a/framework/private/include/bundle_cache.h b/framework/private/include/bundle_cache.h deleted file mode 100644 index 350f33b..0000000 --- a/framework/private/include/bundle_cache.h +++ /dev/null @@ -1,115 +0,0 @@ -/** - *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. - */ -/* - * bundle_cache.h - * - * \date Aug 8, 2010 - * \author <a href="mailto:[email protected]">Apache Celix Project Team</a> - * \copyright Apache License, Version 2.0 - */ - -#ifndef BUNDLE_CACHE_H_ -#define BUNDLE_CACHE_H_ - -/** - * @defgroup BundleCache BundleCache - * @ingroup framework - * @{ - */ - -#include "properties.h" -#include "array_list.h" -#include "bundle_archive.h" -#include "celix_log.h" - -/** - * Type definition for the bundle_cache_pt abstract data type. - */ -typedef struct bundleCache *bundle_cache_pt; - -/** - * Creates the bundle cache using the supplied configuration map. - * - * @param configurationMap Set with properties to use for this cache - * @param mp The memory pool to use for allocation the cache - * @param bundle_cache Output parameter for the created cache - * @return Status code indication failure or success: - * - CELIX_SUCCESS when no errors are encountered. - * - CELIX_ILLEGAL_ARGUMENT If <code>bundle_cache</code> not is null. - * - CELIX_ENOMEM If allocating memory for <code>bundle_cache</code> failed. - */ -celix_status_t bundleCache_create(properties_pt configurationMap, bundle_cache_pt *bundle_cache); - -/** - * Frees the bundle_cache memory allocated in bundleCache_create - * - * @param bundle_cache Output parameter for the created cache - * @return Status code indication failure or success: - * - CELIX_SUCCESS when no errors are encountered. - */ -celix_status_t bundleCache_destroy(bundle_cache_pt *cache); - -/** - * Recreates and retrieves the list of archives for the given bundle cache. - * Archives are recreated on the bundle cache memory pool, the list for the results is created on the suplied pool, and is owned by the caller. - * - * @param cache The cache to recreate archives out - * @param pool The pool on which the list of archives is created - * @param archives List with recreated archives - * @return Status code indication failure or success: - * - CELIX_SUCCESS when no errors are encountered. - * - CELIX_ILLEGAL_ARGUMENT If <code>archives</code> not is null. - * - CELIX_ENOMEM If allocating memory for <code>archives</code> failed. - * - CELIX_FILE_IO_EXCEPTION If the cache cannot be opened or read. - */ -celix_status_t bundleCache_getArchives(bundle_cache_pt cache, array_list_pt *archives); - -/** - * Creates a new archive for the given bundle (using the id and location). The archive is created on the supplied bundlePool. - * - * @param cache The cache to create an archive in - * @param bundlePool The pool to use for the archive creation - * @param id The id of the bundle - * @param location The location identifier of the bundle - * @param inputFile Input identifier to read the bundle data from - * @param archive The archive to create - * - * @return Status code indication failure or success: - * - CELIX_SUCCESS when no errors are encountered. - * - CELIX_ILLEGAL_ARGUMENT If <code>bundle_archive</code> not is null. - * - CELIX_ENOMEM If allocating memory for <code>bundle_archive</code> failed. - */ -celix_status_t bundleCache_createArchive(bundle_cache_pt cache, long id, const char* location, const char* inputFile, bundle_archive_pt *archive); - -/** - * Deletes the entire bundle cache. - * - * @param cache the cache to delete - * @return Status code indication failure or success: - * - CELIX_SUCCESS when no errors are encountered. - * - CELIX_ILLEGAL_ARGUMENT If the cache is invalid - * - CELIX_FILE_IO_EXCEPTION If the cache cannot be opened or read. - */ -celix_status_t bundleCache_delete(bundle_cache_pt cache); - -/** - * @} - */ - -#endif /* BUNDLE_CACHE_H_ */ http://git-wip-us.apache.org/repos/asf/celix/blob/a1c30887/framework/private/include/bundle_cache_private.h ---------------------------------------------------------------------- diff --git a/framework/private/include/bundle_cache_private.h b/framework/private/include/bundle_cache_private.h deleted file mode 100644 index 69e26ee..0000000 --- a/framework/private/include/bundle_cache_private.h +++ /dev/null @@ -1,39 +0,0 @@ -/** - *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. - */ -/* - * bundle_cache_private.h - * - * \date Feb 12, 2013 - * \author <a href="mailto:[email protected]">Apache Celix Project Team</a> - * \copyright Apache License, Version 2.0 - */ - - -#ifndef BUNDLE_CACHE_PRIVATE_H_ -#define BUNDLE_CACHE_PRIVATE_H_ - -#include "bundle_cache.h" - -struct bundleCache { - properties_pt configurationMap; - char * cacheDir; -}; - - -#endif /* BUNDLE_CACHE_PRIVATE_H_ */ http://git-wip-us.apache.org/repos/asf/celix/blob/a1c30887/framework/private/include/bundle_context_private.h ---------------------------------------------------------------------- diff --git a/framework/private/include/bundle_context_private.h b/framework/private/include/bundle_context_private.h deleted file mode 100644 index 3810cd0..0000000 --- a/framework/private/include/bundle_context_private.h +++ /dev/null @@ -1,43 +0,0 @@ -/** - *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. - */ -/* - * bundle_context_private.h - * - * \date Feb 12, 2013 - * \author <a href="mailto:[email protected]">Apache Celix Project Team</a> - * \copyright Apache License, Version 2.0 - */ - - -#ifndef BUNDLE_CONTEXT_PRIVATE_H_ -#define BUNDLE_CONTEXT_PRIVATE_H_ - -#include "bundle_context.h" -#include "celix_log.h" - -struct bundleContext { -#ifdef WITH_APR - apr_pool_t *pool; -#endif - struct framework * framework; - struct bundle * bundle; -}; - - -#endif /* BUNDLE_CONTEXT_PRIVATE_H_ */ http://git-wip-us.apache.org/repos/asf/celix/blob/a1c30887/framework/private/include/bundle_private.h ---------------------------------------------------------------------- diff --git a/framework/private/include/bundle_private.h b/framework/private/include/bundle_private.h deleted file mode 100644 index 8085609..0000000 --- a/framework/private/include/bundle_private.h +++ /dev/null @@ -1,48 +0,0 @@ -/** - *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. - */ -/* - * bundle_private.h - * - * \date Feb 18, 2011 - * \author <a href="mailto:[email protected]">Apache Celix Project Team</a> - * \copyright Apache License, Version 2.0 - */ - -#ifndef BUNDLE_PRIVATE_H_ -#define BUNDLE_PRIVATE_H_ - -#include "bundle.h" - -struct bundle { - bundle_context_pt context; - activator_pt activator; - bundle_state_e state; - void * handle; - bundle_archive_pt archive; - array_list_pt modules; - manifest_pt manifest; - - celix_thread_mutex_t lock; - int lockCount; - celix_thread_t lockThread; - - struct framework * framework; -}; - -#endif /* BUNDLE_PRIVATE_H_ */ http://git-wip-us.apache.org/repos/asf/celix/blob/a1c30887/framework/private/include/bundle_revision_private.h ---------------------------------------------------------------------- diff --git a/framework/private/include/bundle_revision_private.h b/framework/private/include/bundle_revision_private.h deleted file mode 100644 index cb1dcd8..0000000 --- a/framework/private/include/bundle_revision_private.h +++ /dev/null @@ -1,42 +0,0 @@ -/** - *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. - */ -/* - * bundle_revision_private.h - * - * \date Feb 12, 2013 - * \author <a href="mailto:[email protected]">Apache Celix Project Team</a> - * \copyright Apache License, Version 2.0 - */ - - -#ifndef BUNDLE_REVISION_PRIVATE_H_ -#define BUNDLE_REVISION_PRIVATE_H_ - -#include "bundle_revision.h" - -struct bundleRevision { - long revisionNr; - char *root; - char *location; - manifest_pt manifest; - - array_list_pt libraryHandles; -}; - -#endif /* BUNDLE_REVISION_PRIVATE_H_ */ http://git-wip-us.apache.org/repos/asf/celix/blob/a1c30887/framework/private/include/capability_private.h ---------------------------------------------------------------------- diff --git a/framework/private/include/capability_private.h b/framework/private/include/capability_private.h deleted file mode 100644 index 5e302a5..0000000 --- a/framework/private/include/capability_private.h +++ /dev/null @@ -1,41 +0,0 @@ -/** - *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. - */ -/* - * capability_private.h - * - * \date Feb 11, 2013 - * \author <a href="mailto:[email protected]">Apache Celix Project Team</a> - * \copyright Apache License, Version 2.0 - */ - - -#ifndef CAPABILITY_PRIVATE_H_ -#define CAPABILITY_PRIVATE_H_ - -#include "capability.h" - -struct capability { - char * serviceName; - module_pt module; - version_pt version; - hash_map_pt attributes; - hash_map_pt directives; -}; - -#endif /* CAPABILITY_PRIVATE_H_ */ http://git-wip-us.apache.org/repos/asf/celix/blob/a1c30887/framework/private/include/filter_private.h ---------------------------------------------------------------------- diff --git a/framework/private/include/filter_private.h b/framework/private/include/filter_private.h deleted file mode 100644 index d19de2d..0000000 --- a/framework/private/include/filter_private.h +++ /dev/null @@ -1,57 +0,0 @@ -/** - *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. - */ -/* - * filter_private.h - * - * \date Feb 13, 2013 - * \author <a href="mailto:[email protected]">Apache Celix Project Team</a> - * \copyright Apache License, Version 2.0 - */ - - -#ifndef FILTER_PRIVATE_H_ -#define FILTER_PRIVATE_H_ - -#include "filter.h" -#include "array_list.h" - -typedef enum operand -{ - EQUAL, - APPROX, - GREATER, - GREATEREQUAL, - LESS, - LESSEQUAL, - PRESENT, - SUBSTRING, - AND, - OR, - NOT, -} OPERAND; - -struct filter { - OPERAND operand; - char * attribute; - void * value; - char *filterStr; -}; - - -#endif /* FILTER_PRIVATE_H_ */ http://git-wip-us.apache.org/repos/asf/celix/blob/a1c30887/framework/private/include/framework_private.h ---------------------------------------------------------------------- diff --git a/framework/private/include/framework_private.h b/framework/private/include/framework_private.h deleted file mode 100644 index 124a4b6..0000000 --- a/framework/private/include/framework_private.h +++ /dev/null @@ -1,145 +0,0 @@ -/** - *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. - */ -/* - * framework_private.h - * - * \date May 22, 2013 - * \author <a href="mailto:[email protected]">Apache Celix Project Team</a> - * \copyright Apache License, Version 2.0 - */ - - -#ifndef FRAMEWORK_PRIVATE_H_ -#define FRAMEWORK_PRIVATE_H_ - -#include "framework.h" - -#include "manifest.h" -#include "wire.h" -#include "hash_map.h" -#include "array_list.h" -#include "celix_errno.h" -#include "service_factory.h" -#include "bundle_archive.h" -#include "service_listener.h" -#include "bundle_listener.h" -#include "framework_listener.h" -#include "service_registration.h" -#include "bundle_context.h" -#include "bundle_cache.h" -#include "celix_log.h" - -#include "celix_threads.h" - -struct framework { -#ifdef WITH_APR - apr_pool_t *pool; -#endif - struct bundle * bundle; - hash_map_pt installedBundleMap; - hash_map_pt installRequestMap; - array_list_pt serviceListeners; - array_list_pt frameworkListeners; - - array_list_pt bundleListeners; - celix_thread_mutex_t bundleListenerLock; - - long nextBundleId; - struct serviceRegistry * registry; - bundle_cache_pt cache; - - celix_thread_cond_t shutdownGate; - celix_thread_cond_t condition; - - celix_thread_mutex_t installedBundleMapLock; - celix_thread_mutex_t installRequestLock; - celix_thread_mutex_t mutex; - celix_thread_mutex_t bundleLock; - - celix_thread_t globalLockThread; - array_list_pt globalLockWaitersList; - int globalLockCount; - - bool interrupted; - bool shutdown; - - properties_pt configurationMap; - - array_list_pt requests; - celix_thread_cond_t dispatcher; - celix_thread_mutex_t dispatcherLock; - celix_thread_t dispatcherThread; - celix_thread_t shutdownThread; - - framework_logger_pt logger; -}; - -celix_status_t framework_start(framework_pt framework); -void framework_stop(framework_pt framework); - -FRAMEWORK_EXPORT celix_status_t fw_getProperty(framework_pt framework, const char* name, const char* defaultValue, const char** value); - -FRAMEWORK_EXPORT celix_status_t fw_installBundle(framework_pt framework, bundle_pt * bundle, const char * location, const char *inputFile); -FRAMEWORK_EXPORT celix_status_t fw_uninstallBundle(framework_pt framework, bundle_pt bundle); - -FRAMEWORK_EXPORT celix_status_t framework_getBundleEntry(framework_pt framework, bundle_pt bundle, const char* name, char** entry); - -FRAMEWORK_EXPORT celix_status_t fw_startBundle(framework_pt framework, bundle_pt bundle, int options); -FRAMEWORK_EXPORT celix_status_t framework_updateBundle(framework_pt framework, bundle_pt bundle, const char* inputFile); -FRAMEWORK_EXPORT celix_status_t fw_stopBundle(framework_pt framework, bundle_pt bundle, bool record); - -FRAMEWORK_EXPORT celix_status_t fw_registerService(framework_pt framework, service_registration_pt * registration, bundle_pt bundle, const char* serviceName, const void* svcObj, properties_pt properties); -FRAMEWORK_EXPORT celix_status_t fw_registerServiceFactory(framework_pt framework, service_registration_pt * registration, bundle_pt bundle, const char* serviceName, service_factory_pt factory, properties_pt properties); -FRAMEWORK_EXPORT void fw_unregisterService(service_registration_pt registration); - -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 framework_ungetServiceReference(framework_pt framework, bundle_pt bundle, service_reference_pt reference); -FRAMEWORK_EXPORT celix_status_t fw_getService(framework_pt framework, bundle_pt bundle, service_reference_pt reference, const void** service); -FRAMEWORK_EXPORT celix_status_t framework_ungetService(framework_pt framework, bundle_pt bundle, service_reference_pt reference, bool *result); -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); - -FRAMEWORK_EXPORT void fw_addServiceListener(framework_pt framework, bundle_pt bundle, service_listener_pt listener, const char* filter); -FRAMEWORK_EXPORT void fw_removeServiceListener(framework_pt framework, bundle_pt bundle, service_listener_pt 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); - -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); - -FRAMEWORK_EXPORT void fw_serviceChanged(framework_pt framework, service_event_type_e eventType, service_registration_pt registration, properties_pt oldprops); - -FRAMEWORK_EXPORT celix_status_t fw_isServiceAssignable(framework_pt fw, bundle_pt requester, service_reference_pt reference, bool* assignable); - -//bundle_archive_t fw_createArchive(long id, char * location); -//void revise(bundle_archive_t archive, char * location); -FRAMEWORK_EXPORT celix_status_t getManifest(bundle_archive_pt archive, manifest_pt *manifest); - -FRAMEWORK_EXPORT bundle_pt findBundle(bundle_context_pt context); -FRAMEWORK_EXPORT service_registration_pt findRegistration(service_reference_pt reference); - -FRAMEWORK_EXPORT service_reference_pt listToArray(array_list_pt list); -FRAMEWORK_EXPORT celix_status_t framework_markResolvedModules(framework_pt framework, linked_list_pt wires); - -FRAMEWORK_EXPORT array_list_pt framework_getBundles(framework_pt framework); -FRAMEWORK_EXPORT bundle_pt framework_getBundle(framework_pt framework, const char* location); -FRAMEWORK_EXPORT bundle_pt framework_getBundleById(framework_pt framework, long id); - -#endif /* FRAMEWORK_PRIVATE_H_ */ http://git-wip-us.apache.org/repos/asf/celix/blob/a1c30887/framework/private/include/ioapi.h ---------------------------------------------------------------------- diff --git a/framework/private/include/ioapi.h b/framework/private/include/ioapi.h deleted file mode 100644 index 8309c4c..0000000 --- a/framework/private/include/ioapi.h +++ /dev/null @@ -1,200 +0,0 @@ -/* ioapi.h -- IO base function header for compress/uncompress .zip - part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) - - Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) - - Modifications for Zip64 support - Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) - - For more info read MiniZip_info.txt - - Changes - - Oct-2009 - Defined ZPOS64_T to fpos_t on windows and u_int64_t on linux. (might need to find a better why for this) - Oct-2009 - Change to fseeko64, ftello64 and fopen64 so large files would work on linux. - More if/def section may be needed to support other platforms - Oct-2009 - Defined fxxxx64 calls to normal fopen/ftell/fseek so they would compile on windows. - (but you should use iowin32.c for windows instead) - -*/ - -#ifndef _ZLIBIOAPI64_H -#define _ZLIBIOAPI64_H - -#if (!defined(_WIN32)) && (!defined(WIN32)) - - // Linux needs this to support file operation on files larger then 4+GB - // But might need better if/def to select just the platforms that needs them. - - #ifndef __USE_FILE_OFFSET64 - #define __USE_FILE_OFFSET64 - #endif - #ifndef __USE_LARGEFILE64 - #define __USE_LARGEFILE64 - #endif - #ifndef _LARGEFILE64_SOURCE - #define _LARGEFILE64_SOURCE - #endif - #ifndef _FILE_OFFSET_BIT - #define _FILE_OFFSET_BIT 64 - #endif -#endif - -#include <stdio.h> -#include <stdlib.h> -#include "zlib.h" - -#if defined(USE_FILE32API) -#define fopen64 fopen -#define ftello64 ftell -#define fseeko64 fseek -#else -#ifdef _MSC_VER - #define fopen64 fopen - #if (_MSC_VER >= 1400) && (!(defined(NO_MSCVER_FILE64_FUNC))) - #define ftello64 _ftelli64 - #define fseeko64 _fseeki64 - #else // old MSC - #define ftello64 ftell - #define fseeko64 fseek - #endif -#endif -#endif - -/* -#ifndef ZPOS64_T - #ifdef _WIN32 - #define ZPOS64_T fpos_t - #else - #include <stdint.h> - #define ZPOS64_T uint64_t - #endif -#endif -*/ - -#ifdef HAVE_MINIZIP64_CONF_H -#include "mz64conf.h" -#endif - -/* a type choosen by DEFINE */ -#ifdef HAVE_64BIT_INT_CUSTOM -typedef 64BIT_INT_CUSTOM_TYPE ZPOS64_T; -#else -#ifdef HAS_STDINT_H -#include "stdint.h" -typedef uint64_t ZPOS64_T; -#else - - -#if defined(_MSC_VER) || defined(__BORLANDC__) -typedef unsigned __int64 ZPOS64_T; -#else -typedef unsigned long long int ZPOS64_T; -#endif -#endif -#endif - - - -#ifdef __cplusplus -extern "C" { -#endif - - -#define ZLIB_FILEFUNC_SEEK_CUR (1) -#define ZLIB_FILEFUNC_SEEK_END (2) -#define ZLIB_FILEFUNC_SEEK_SET (0) - -#define ZLIB_FILEFUNC_MODE_READ (1) -#define ZLIB_FILEFUNC_MODE_WRITE (2) -#define ZLIB_FILEFUNC_MODE_READWRITEFILTER (3) - -#define ZLIB_FILEFUNC_MODE_EXISTING (4) -#define ZLIB_FILEFUNC_MODE_CREATE (8) - - -#ifndef ZCALLBACK - #if (defined(WIN32) || defined(_WIN32) || defined (WINDOWS) || defined (_WINDOWS)) && defined(CALLBACK) && defined (USEWINDOWS_CALLBACK) - #define ZCALLBACK CALLBACK - #else - #define ZCALLBACK - #endif -#endif - - - - -typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode)); -typedef uLong (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size)); -typedef uLong (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream, const void* buf, uLong size)); -typedef int (ZCALLBACK *close_file_func) OF((voidpf opaque, voidpf stream)); -typedef int (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stream)); - -typedef long (ZCALLBACK *tell_file_func) OF((voidpf opaque, voidpf stream)); -typedef long (ZCALLBACK *seek_file_func) OF((voidpf opaque, voidpf stream, uLong offset, int origin)); - - -/* here is the "old" 32 bits structure structure */ -typedef struct zlib_filefunc_def_s -{ - open_file_func zopen_file; - read_file_func zread_file; - write_file_func zwrite_file; - tell_file_func ztell_file; - seek_file_func zseek_file; - close_file_func zclose_file; - testerror_file_func zerror_file; - voidpf opaque; -} zlib_filefunc_def; - -typedef ZPOS64_T (ZCALLBACK *tell64_file_func) OF((voidpf opaque, voidpf stream)); -typedef long (ZCALLBACK *seek64_file_func) OF((voidpf opaque, voidpf stream, ZPOS64_T offset, int origin)); -typedef voidpf (ZCALLBACK *open64_file_func) OF((voidpf opaque, const void* filename, int mode)); - -typedef struct zlib_filefunc64_def_s -{ - open64_file_func zopen64_file; - read_file_func zread_file; - write_file_func zwrite_file; - tell64_file_func ztell64_file; - seek64_file_func zseek64_file; - close_file_func zclose_file; - testerror_file_func zerror_file; - voidpf opaque; -} zlib_filefunc64_def; - -void fill_fopen64_filefunc OF((zlib_filefunc64_def* pzlib_filefunc_def)); -void fill_fopen_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def)); - -/* now internal definition, only for zip.c and unzip.h */ -typedef struct zlib_filefunc64_32_def_s -{ - zlib_filefunc64_def zfile_func64; - open_file_func zopen32_file; - tell_file_func ztell32_file; - seek_file_func zseek32_file; -} zlib_filefunc64_32_def; - - -#define ZREAD64(filefunc,filestream,buf,size) ((*((filefunc).zfile_func64.zread_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size)) -#define ZWRITE64(filefunc,filestream,buf,size) ((*((filefunc).zfile_func64.zwrite_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size)) -//#define ZTELL64(filefunc,filestream) ((*((filefunc).ztell64_file)) ((filefunc).opaque,filestream)) -//#define ZSEEK64(filefunc,filestream,pos,mode) ((*((filefunc).zseek64_file)) ((filefunc).opaque,filestream,pos,mode)) -#define ZCLOSE64(filefunc,filestream) ((*((filefunc).zfile_func64.zclose_file)) ((filefunc).zfile_func64.opaque,filestream)) -#define ZERROR64(filefunc,filestream) ((*((filefunc).zfile_func64.zerror_file)) ((filefunc).zfile_func64.opaque,filestream)) - -voidpf call_zopen64 OF((const zlib_filefunc64_32_def* pfilefunc,const void*filename,int mode)); -long call_zseek64 OF((const zlib_filefunc64_32_def* pfilefunc,voidpf filestream, ZPOS64_T offset, int origin)); -ZPOS64_T call_ztell64 OF((const zlib_filefunc64_32_def* pfilefunc,voidpf filestream)); - -void fill_zlib_filefunc64_32_def_from_filefunc32(zlib_filefunc64_32_def* p_filefunc64_32,const zlib_filefunc_def* p_filefunc32); - -#define ZOPEN64(filefunc,filename,mode) (call_zopen64((&(filefunc)),(filename),(mode))) -#define ZTELL64(filefunc,filestream) (call_ztell64((&(filefunc)),(filestream))) -#define ZSEEK64(filefunc,filestream,pos,mode) (call_zseek64((&(filefunc)),(filestream),(pos),(mode))) - -#ifdef __cplusplus -} -#endif - -#endif http://git-wip-us.apache.org/repos/asf/celix/blob/a1c30887/framework/private/include/iowin32.h ---------------------------------------------------------------------- diff --git a/framework/private/include/iowin32.h b/framework/private/include/iowin32.h deleted file mode 100644 index 0ca0969..0000000 --- a/framework/private/include/iowin32.h +++ /dev/null @@ -1,28 +0,0 @@ -/* iowin32.h -- IO base function header for compress/uncompress .zip - Version 1.1, February 14h, 2010 - part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) - - Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) - - Modifications for Zip64 support - Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) - - For more info read MiniZip_info.txt - -*/ - -#include <windows.h> - - -#ifdef __cplusplus -extern "C" { -#endif - -void fill_win32_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def)); -void fill_win32_filefunc64 OF((zlib_filefunc64_def* pzlib_filefunc_def)); -void fill_win32_filefunc64A OF((zlib_filefunc64_def* pzlib_filefunc_def)); -void fill_win32_filefunc64W OF((zlib_filefunc64_def* pzlib_filefunc_def)); - -#ifdef __cplusplus -} -#endif http://git-wip-us.apache.org/repos/asf/celix/blob/a1c30887/framework/private/include/listener_hook_info_impl.h ---------------------------------------------------------------------- diff --git a/framework/private/include/listener_hook_info_impl.h b/framework/private/include/listener_hook_info_impl.h deleted file mode 100644 index 4b45710..0000000 --- a/framework/private/include/listener_hook_info_impl.h +++ /dev/null @@ -1,34 +0,0 @@ -/** - *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. - */ -/* - * listener_hook_info_impl.h - * - * \date Oct 28, 2011 - * \author <a href="mailto:[email protected]">Apache Celix Project Team</a> - * \copyright Apache License, Version 2.0 - */ - -#ifndef LISTENER_HOOK_INFO_IMPL_H_ -#define LISTENER_HOOK_INFO_IMPL_H_ - -#include "celix_errno.h" - -celix_status_t listenerHookInfo_create(); - -#endif /* LISTENER_HOOK_INFO_IMPL_H_ */ http://git-wip-us.apache.org/repos/asf/celix/blob/a1c30887/framework/private/include/manifest_parser.h ---------------------------------------------------------------------- diff --git a/framework/private/include/manifest_parser.h b/framework/private/include/manifest_parser.h deleted file mode 100644 index d6b062b..0000000 --- a/framework/private/include/manifest_parser.h +++ /dev/null @@ -1,45 +0,0 @@ -/** - *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. - */ -/* - * manifest_parser.h - * - * \date Jul 13, 2010 - * \author <a href="mailto:[email protected]">Apache Celix Project Team</a> - * \copyright Apache License, Version 2.0 - */ - -#ifndef MANIFEST_PARSER_H_ -#define MANIFEST_PARSER_H_ - -#include "module.h" -#include "version.h" -#include "manifest.h" -#include "linked_list.h" - -typedef struct manifestParser * manifest_parser_pt; - -celix_status_t manifestParser_create(module_pt owner, manifest_pt manifest, manifest_parser_pt *manifest_parser); -celix_status_t manifestParser_destroy(manifest_parser_pt mp); - -celix_status_t manifestParser_getAndDuplicateSymbolicName(manifest_parser_pt parser, char **symbolicName); -celix_status_t manifestParser_getBundleVersion(manifest_parser_pt parser, version_pt *version); -celix_status_t manifestParser_getCapabilities(manifest_parser_pt parser, linked_list_pt *capabilities); -celix_status_t manifestParser_getRequirements(manifest_parser_pt parser, linked_list_pt *requirements); - -#endif /* MANIFEST_PARSER_H_ */ http://git-wip-us.apache.org/repos/asf/celix/blob/a1c30887/framework/private/include/registry_callback_private.h ---------------------------------------------------------------------- diff --git a/framework/private/include/registry_callback_private.h b/framework/private/include/registry_callback_private.h deleted file mode 100644 index 146a1d1..0000000 --- a/framework/private/include/registry_callback_private.h +++ /dev/null @@ -1,42 +0,0 @@ -/** - *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. - */ -/* - * service_reference_private.h - * - * \date Nov 16, 2015 - * \author <a href="mailto:[email protected]">Apache Celix Project Team</a> - * \copyright Apache License, Version 2.0 - */ - - -#ifndef REGISTRY_CALLBACK_H_ -#define REGISTRY_CALLBACK_H_ - -#include "celix_errno.h" -#include "service_reference.h" -#include "service_registration.h" - -typedef struct registry_callback_struct { - void *handle; - celix_status_t (*getUsingBundles)(void *handle, service_registration_pt reg, array_list_pt *bundles); - celix_status_t (*unregister)(void *handle, bundle_pt bundle, service_registration_pt reg); - celix_status_t (*modified)(void *handle, service_registration_pt registration, properties_pt oldProperties); -} registry_callback_t; - -#endif /* REGISTRY_CALLBACK_H_ */ http://git-wip-us.apache.org/repos/asf/celix/blob/a1c30887/framework/private/include/requirement_private.h ---------------------------------------------------------------------- diff --git a/framework/private/include/requirement_private.h b/framework/private/include/requirement_private.h deleted file mode 100644 index 7510110..0000000 --- a/framework/private/include/requirement_private.h +++ /dev/null @@ -1,40 +0,0 @@ -/** - *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. - */ -/* - * requirement_private.h - * - * \date Feb 11, 2013 - * \author <a href="mailto:[email protected]">Apache Celix Project Team</a> - * \copyright Apache License, Version 2.0 - */ - - -#ifndef REQUIREMENT_PRIVATE_H_ -#define REQUIREMENT_PRIVATE_H_ - -#include "requirement.h" - -struct requirement { - char * targetName; - version_range_pt versionRange; - hash_map_pt attributes; - hash_map_pt directives; -}; - -#endif /* REQUIREMENT_PRIVATE_H_ */ http://git-wip-us.apache.org/repos/asf/celix/blob/a1c30887/framework/private/include/resolver.h ---------------------------------------------------------------------- diff --git a/framework/private/include/resolver.h b/framework/private/include/resolver.h deleted file mode 100644 index 87440e9..0000000 --- a/framework/private/include/resolver.h +++ /dev/null @@ -1,45 +0,0 @@ -/** - *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. - */ -/* - * resolver.h - * - * \date Jul 13, 2010 - * \author <a href="mailto:[email protected]">Apache Celix Project Team</a> - * \copyright Apache License, Version 2.0 - */ - -#ifndef RESOLVER_H_ -#define RESOLVER_H_ - -#include "module.h" -#include "wire.h" -#include "hash_map.h" - -struct importer_wires { - module_pt importer; - linked_list_pt wires; -}; -typedef struct importer_wires *importer_wires_pt; - -linked_list_pt resolver_resolve(module_pt root); -void resolver_moduleResolved(module_pt module); -void resolver_addModule(module_pt module); -void resolver_removeModule(module_pt module); - -#endif /* RESOLVER_H_ */ http://git-wip-us.apache.org/repos/asf/celix/blob/a1c30887/framework/private/include/service_reference_private.h ---------------------------------------------------------------------- diff --git a/framework/private/include/service_reference_private.h b/framework/private/include/service_reference_private.h deleted file mode 100644 index d7fcac1..0000000 --- a/framework/private/include/service_reference_private.h +++ /dev/null @@ -1,69 +0,0 @@ -/** - *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. - */ -/* - * service_reference_private.h - * - * \date Feb 6, 2013 - * \author <a href="mailto:[email protected]">Apache Celix Project Team</a> - * \copyright Apache License, Version 2.0 - */ - - -#ifndef SERVICE_REFERENCE_PRIVATE_H_ -#define SERVICE_REFERENCE_PRIVATE_H_ - -#include "registry_callback_private.h" -#include "service_reference.h" - - -struct serviceReference { - registry_callback_t callback; - bundle_pt referenceOwner; - struct serviceRegistration * registration; - bundle_pt registrationBundle; - const void* service; - - size_t refCount; - size_t usageCount; - - celix_thread_rwlock_t lock; -}; - -celix_status_t serviceReference_create(registry_callback_t callback, bundle_pt referenceOwner, service_registration_pt registration, service_reference_pt *reference); - -celix_status_t serviceReference_retain(service_reference_pt ref); -celix_status_t serviceReference_release(service_reference_pt ref, bool *destroyed); - -celix_status_t serviceReference_increaseUsage(service_reference_pt ref, size_t *updatedCount); -celix_status_t serviceReference_decreaseUsage(service_reference_pt ref, size_t *updatedCount); - -celix_status_t serviceReference_invalidate(service_reference_pt reference); -celix_status_t serviceReference_isValid(service_reference_pt reference, bool *result); - -celix_status_t serviceReference_getUsageCount(service_reference_pt reference, size_t *count); -celix_status_t serviceReference_getReferenceCount(service_reference_pt reference, size_t *count); - -celix_status_t serviceReference_setService(service_reference_pt ref, const void *service); -celix_status_t serviceReference_getService(service_reference_pt reference, void **service); - -celix_status_t serviceReference_getOwner(service_reference_pt reference, bundle_pt *owner); - - - -#endif /* SERVICE_REFERENCE_PRIVATE_H_ */
