From dev-return-1742-apmail-celix-dev-archive=celix.apache.org@celix.apache.org Thu Mar 5 10:19:11 2020 Return-Path: X-Original-To: apmail-celix-dev-archive@www.apache.org Delivered-To: apmail-celix-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by minotaur.apache.org (Postfix) with SMTP id 6DF6B19A67 for ; Thu, 5 Mar 2020 10:19:11 +0000 (UTC) Received: (qmail 62982 invoked by uid 500); 5 Mar 2020 10:19:11 -0000 Delivered-To: apmail-celix-dev-archive@celix.apache.org Received: (qmail 62962 invoked by uid 500); 5 Mar 2020 10:19:10 -0000 Mailing-List: contact dev-help@celix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@celix.apache.org Delivered-To: mailing list dev@celix.apache.org Received: (qmail 62950 invoked by uid 99); 5 Mar 2020 10:19:10 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Mar 2020 10:19:10 +0000 From: GitBox To: dev@celix.apache.org Subject: =?utf-8?q?=5BGitHub=5D_=5Bcelix=5D_abroekhuis_commented_on_a_change_in_pu?= =?utf-8?q?ll_request_=23156=3A_Added_protocol_service_API_and_wire_protoc?= =?utf-8?q?ol_implementation_to_be_use=E2=80=A6?= Message-ID: <158340355080.6782.17595760354355767456.gitbox@gitbox.apache.org> References: In-Reply-To: Date: Thu, 05 Mar 2020 10:19:10 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit abroekhuis commented on a change in pull request #156: Added protocol service API and wire protocol implementation to be use… URL: https://github.com/apache/celix/pull/156#discussion_r388199286 ########## File path: bundles/pubsub/pubsub_spi/include/pubsub_protocol.h ########## @@ -0,0 +1,75 @@ +/* + * 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_PROTOCOL_SERVICE_H_ +#define PUBSUB_PROTOCOL_SERVICE_H_ + +#include "celix_properties.h" + +#define PUBSUB_PROTOCOL_SERVICE_NAME "pubsub_protocol" +#define PUBSUB_PROTOCOL_SERVICE_VERSION "1.0.0" +#define PUBSUB_PROTOCOL_SERVICE_RANGE "[1,2)" + +typedef struct pubsub_protocol_header pubsub_protocol_header_t; + +struct pubsub_protocol_header { + unsigned int msgId; + unsigned short msgMajorVersion; + unsigned short msgMinorVersion; + + unsigned int payloadSize; + unsigned int metadataSize; +}; + +typedef struct pubsub_protocol_payload pubsub_protocol_payload_t; + +struct pubsub_protocol_payload { + void *payload; + size_t length; +}; + +typedef struct pubsub_protocol_metadata pubsub_protocol_metadata_t; + +struct pubsub_protocol_metadata { + celix_properties_t *metadata; +}; + +typedef struct pubsub_protocol_message pubsub_protocol_message_t; + +struct pubsub_protocol_message { + pubsub_protocol_header_t header; + pubsub_protocol_payload_t payload; + pubsub_protocol_metadata_t metadata; +}; + +typedef struct pubsub_protocol_service { + void* handle; + + celix_status_t (*getSyncHeader)(void *handle, void *sync); Review comment: Added. ---------------------------------------------------------------- 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