celix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [celix] pnoltes commented on a change in pull request #292: zmq admin serializer change
Date Mon, 09 Nov 2020 18:54:45 GMT

pnoltes commented on a change in pull request #292:
URL: https://github.com/apache/celix/pull/292#discussion_r520038937



##########
File path: bundles/pubsub/test/test/serializer_activator.cc
##########
@@ -0,0 +1,87 @@
+/*
+ * 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.
+ */
+
+#include "celix_constants.h"
+#include <unistd.h>
+
+#include "celix_api.h"
+#include "../../pubsub_spi/include/pubsub_message_serialization_service.h"

Review comment:
       includes should not use .., maybe a linking to Celix::pubsub_spi is missing

##########
File path: bundles/pubsub/test/test/serializer_activator.cc
##########
@@ -0,0 +1,87 @@
+/*
+ * 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.
+ */
+
+#include "celix_constants.h"
+#include <unistd.h>
+
+#include "celix_api.h"
+#include "../../pubsub_spi/include/pubsub_message_serialization_service.h"
+#include "../../pubsub_spi/include/pubsub_constants.h"
+#include "msg.h"
+
+struct activator {
+    long serId;
+    pubsub_message_serialization_service_t svc;
+};
+
+celix_status_t bnd_start(struct activator *act, celix_bundle_context_t *ctx) {
+
+#pragma GCC diagnostic ignored "-Wunused-parameter"

Review comment:
       is this needed or can be parameters with names (c++) be used?

##########
File path: bundles/pubsub/pubsub_admin_zmq/src/psa_activator.c
##########
@@ -62,7 +62,7 @@ int psa_zmq_start(psa_zmq_activator_t *act, celix_bundle_context_t *ctx)
{
     //track serializers
     if (status == CELIX_SUCCESS) {
         celix_service_tracking_options_t opts = CELIX_EMPTY_SERVICE_TRACKING_OPTIONS;
-        opts.filter.serviceName = PUBSUB_SERIALIZER_SERVICE_NAME;
+        opts.filter.serviceName = PUBSUB_MESSAGE_SERIALIZATION_SERVICE_NAME;

Review comment:
       The marker service can be used here so service name
   PUBSUB_MESSAGE_SERIALIZATION_MARKER_NAME
   
   note that the pubsub_serializer_handler_t can be used to actual use the services (and reuse
the tracking of services)




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message