celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pnol...@apache.org
Subject celix git commit: Adds dfi support to the proposed v3 api
Date Tue, 27 Jun 2017 19:14:17 GMT
Repository: celix
Updated Branches:
  refs/heads/develop f32232fb2 -> b47a8f486


Adds dfi support to the proposed v3 api


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/b47a8f48
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/b47a8f48
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/b47a8f48

Branch: refs/heads/develop
Commit: b47a8f4868df1601520504e9c1d84ccb12e76494
Parents: f32232f
Author: Pepijn Noltes <pepijnnoltes@gmail.com>
Authored: Tue Jun 27 21:20:11 2017 +0200
Committer: Pepijn Noltes <pepijnnoltes@gmail.com>
Committed: Tue Jun 27 21:20:11 2017 +0200

----------------------------------------------------------------------
 documents/roadmap/api_v3/celix/celix.h | 19 +++++++++++-
 documents/roadmap/api_v3/readme.md     | 47 ++++++++++++++++++++++++++---
 2 files changed, 61 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/b47a8f48/documents/roadmap/api_v3/celix/celix.h
----------------------------------------------------------------------
diff --git a/documents/roadmap/api_v3/celix/celix.h b/documents/roadmap/api_v3/celix/celix.h
index 1c30884..f22866b 100644
--- a/documents/roadmap/api_v3/celix/celix.h
+++ b/documents/roadmap/api_v3/celix/celix.h
@@ -337,7 +337,6 @@ void celix_properties_setProperty(celix_properties* props, const char*
key, cons
 typedef struct celix_framework celix_framework;
 typedef struct celix_bundle celix_bundle;
 typedef struct celix_module celix_module;
-typedef struct celix_service_tracker celix_service_tracker;
 typedef struct celix_dependency_manager celix_dependency_manager;
 typedef struct celix_component celix_component;
 typedef struct celix_service_dependency celix_service_dependency;
@@ -458,6 +457,10 @@ celix_module* celix_bundle_module(const celix_bundle* bundle);
 
 //celix/module.h
 
+
+#include "dfi/interface.h" //NOTE dyn_intefaces renamed to dfi_interface
+#include "dfi/message.h" //NOTE dyn_message renamed to dfi_message
+
 /**
  * The module can be used to register/unregister services, create service trackers,
  * add service tracker listeners, register/unregister service factories, get module resources,
@@ -919,6 +922,20 @@ void celix_module_stopTrackerListener(celix_module* mod, uint64_t trackerListene
 void* celix_module_sym(celix_module* mod, const char* symbol);
 
 /**
+ * Returns the dfi_interface for the provided interface name or
+ * NULL if there is no dfi_interface for the provided service name
+ * (i.e. no descriptor for the service name in the module resources).
+ */
+const dfi_interface* celix_module_dfiInterface(celix_module* mod, const char* serviceName);
+
+/**
+ * Returns the dfi_message for the provided message type or
+ * NULL if there is no dfi_message for the provided message type
+ * (i.e. no descriptor for the message type in the module resources).
+ */
+const dfi_message* celix_module_dfiInterface(celix_module* mod, const char* messageType);
+
+/**
  * Returns a resource entry or NULL if the resource entry cannot be found.
  *
  * Note that resource entries only present as long as the module is installed. So handling
module resource

http://git-wip-us.apache.org/repos/asf/celix/blob/b47a8f48/documents/roadmap/api_v3/readme.md
----------------------------------------------------------------------
diff --git a/documents/roadmap/api_v3/readme.md b/documents/roadmap/api_v3/readme.md
index 727a379..e804666 100644
--- a/documents/roadmap/api_v3/readme.md
+++ b/documents/roadmap/api_v3/readme.md
@@ -132,7 +132,7 @@ the module name is equal to the name target.
 
 celix_module_name(<module_target> <module_name>)
 
-celix_module_files(<module_target>
+celix_module_files(<bundle_or_module_target>
     files... DESTINATION <dir>
     [FILE_PERMISSIONS permissions...]
     [DIRECTORY_PERMISSIONS permissions...]
@@ -169,8 +169,9 @@ int celix_moduleRegistration_registerModule(
 
 ### Bundles
 Bundles are ZIP files which bundle one module.
-The CMake commands for bundle is not changed with expection of the
-added celix_ prefix.
+The CMake commands for add_bundle commands are not changed with exception of the
+added celix_ prefix. The other command are renamed to module and a celix_ is added
+(e.g bundle_name -> celix_module_name)
 
 ```CMake
 celix_add_bundle(<bundle_target_name>
@@ -210,6 +211,44 @@ celix_add_bundle(<bundle_target_name>
 
 ```
 
+### Descriptors
+Descriptors are files which describe interfaces or messages which can be
+parsed by the dynamic function interface (dfi) library.
+The dfi library can be used for runtime 'type introspection'.
+The descriptor files are a bit cryptic for human eyes, but relatively easy to parse.
+
+With these descriptors the Celix framework can runtime compare if
+services and/or messages provider consumer combinations are compatible
+and make remote services / serialization of messages possible.
+
+The `celix_module_descriptor` CMake will register header files
+for descriptor generation and inclusion in the module/bundle
+resources (under META-INF/descriptors/interfaces and
+META-INF/descriptors/messages).
+
+The Celix project will have a `dfi-gen` target which will be used to
+generate the descriptors from the header files.
+
+```CMake
+
+celix_module_descriptor(<bundle_or_module_target>
+    header_file1 header_file2 ...
+)
+```
+
 ### Deployment
 
-TODO update deployment to be able to select bundles and modules
+The `add_deploy` will be changed to `celix_add_deploy` and will accept
+library modules and bundle modules.
+
+```CMake
+celix_add_deploy(<deploy_target_name>
+    [COPY]
+    [GROUP group_name]
+    [NAME deploy_name]
+    [LAUNCHER launcher]
+    [DIR dir]
+    [MODULES <module_or_bundle1> <module_or_bundle2> ...]
+    [PROPERTIES "prop1=val1" "prop2=val2" ...]
+)
+```


Mime
View raw message