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 #174: Feature/pubsub inteceptors
Date Mon, 30 Mar 2020 12:04:10 GMT
pnoltes commented on a change in pull request #174: Feature/pubsub inteceptors
URL: https://github.com/apache/celix/pull/174#discussion_r400111339
 
 

 ##########
 File path: bundles/pubsub/pubsub_spi/include/pubsub_interceptor.h
 ##########
 @@ -0,0 +1,47 @@
+/*
+ * 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.
+ */
+
+#ifndef __PUBSUB_INTERCEPTOR_H
+#define __PUBSUB_INTERCEPTOR_H
+
+#include <stdlib.h>
+#include <stdint.h>
+
+#include "celix_properties.h"
+
+#define PUBSUB_INTERCEPTOR_SERVICE_NAME     "pubsub.interceptor"
+#define PUBSUB_INTERCEPTOR_SERVICE_VERSION  "1.0.0"
+
+typedef struct pubsub_interceptor_properties {
+    const char *scope;
+    const char *topic;
+} pubsub_interceptor_properties_t;
+
+struct pubsub_interceptor {
+    void *handle;
+
+    bool (*preSend)(void *handle, pubsub_interceptor_properties_t properties, const char
*messageType, const uint32_t msgTypeId, const void *message, celix_properties_t *metadata);
 
 Review comment:
   Make the properties argument  a const pubsub_interceptor_properties_t*, now the complete
struct is copied.

----------------------------------------------------------------
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


With regards,
Apache Git Services

Mime
View raw message