Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
MelamudMichael committed Mar 5, 2024
1 parent 171acb7 commit 905f3ca
Show file tree
Hide file tree
Showing 52 changed files with 271 additions and 272 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2023 General Motors GTO LLC
# Copyright (c) 2024 General Motors GTO LLC
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
Expand Down
4 changes: 2 additions & 2 deletions Changelog
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
## Changelog

- June 04 2023 17:52:23 Giorgio Zoppi <[email protected]>
- June 04 2024 17:52:23 Giorgio Zoppi <[email protected]>
* Restructuring old code and deleting unused code.
* Adding coverage and ctest support
- June 10 2023 17:52:23 Giorgio Zoppi <[email protected]>
- June 10 2024 17:52:23 Giorgio Zoppi <[email protected]>
* Cleanup uuid as much it was possible
* Replaced current Meyer's singleton
* Separate include directory.
2 changes: 1 addition & 1 deletion cmake/up-core-api-protos.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2023 General Motors GTO LLC
# Copyright (c) 2024 General Motors GTO LLC
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
Expand Down
4 changes: 2 additions & 2 deletions include/up-cpp/cloudevent/datamodel/attributes.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 General Motors GTO LLC
* Copyright (c) 2024 General Motors GTO LLC
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand All @@ -19,7 +19,7 @@
* under the License.
*
* SPDX-FileType: SOURCE
* SPDX-FileCopyrightText: 2023 General Motors GTO LLC
* SPDX-FileCopyrightText: 2024 General Motors GTO LLC
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef CPP_COULDEVENT_ATTRIBUTES_H_
Expand Down
4 changes: 2 additions & 2 deletions include/up-cpp/cloudevent/datamodel/cloud_event.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 General Motors GTO LLC
* Copyright (c) 2024 General Motors GTO LLC
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand All @@ -19,7 +19,7 @@
* under the License.
*
* SPDX-FileType: SOURCE
* SPDX-FileCopyrightText: 2023 General Motors GTO LLC
* SPDX-FileCopyrightText: 2024 General Motors GTO LLC
* SPDX-License-Identifier: Apache-2.0
*/

Expand Down
4 changes: 2 additions & 2 deletions include/up-cpp/cloudevent/datamodel/format.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 General Motors GTO LLC
* Copyright (c) 2024 General Motors GTO LLC
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand All @@ -19,7 +19,7 @@
* under the License.
*
* SPDX-FileType: SOURCE
* SPDX-FileCopyrightText: 2023 General Motors GTO LLC
* SPDX-FileCopyrightText: 2024 General Motors GTO LLC
* SPDX-License-Identifier: Apache-2.0
*/

Expand Down
4 changes: 2 additions & 2 deletions include/up-cpp/cloudevent/datamodel/priority.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 General Motors GTO LLC
* Copyright (c) 2024 General Motors GTO LLC
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand All @@ -19,7 +19,7 @@
* under the License.
*
* SPDX-FileType: SOURCE
* SPDX-FileCopyrightText: 2023 General Motors GTO LLC
* SPDX-FileCopyrightText: 2024 General Motors GTO LLC
* SPDX-License-Identifier: Apache-2.0
*/

Expand Down
4 changes: 2 additions & 2 deletions include/up-cpp/cloudevent/datamodel/service_type.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 General Motors GTO LLC
* Copyright (c) 2024 General Motors GTO LLC
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand All @@ -19,7 +19,7 @@
* under the License.
*
* SPDX-FileType: SOURCE
* SPDX-FileCopyrightText: 2023 General Motors GTO LLC
* SPDX-FileCopyrightText: 2024 General Motors GTO LLC
* SPDX-License-Identifier: Apache-2.0
*/

Expand Down
4 changes: 2 additions & 2 deletions include/up-cpp/cloudevent/datamodel/spec_version.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 General Motors GTO LLC
* Copyright (c) 2024 General Motors GTO LLC
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand All @@ -19,7 +19,7 @@
* under the License.
*
* SPDX-FileType: SOURCE
* SPDX-FileCopyrightText: 2023 General Motors GTO LLC
* SPDX-FileCopyrightText: 2024 General Motors GTO LLC
* SPDX-License-Identifier: Apache-2.0
*/

Expand Down
4 changes: 2 additions & 2 deletions include/up-cpp/cloudevent/factory/cloud_event_factory.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 General Motors GTO LLC
* Copyright (c) 2024 General Motors GTO LLC
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand All @@ -19,7 +19,7 @@
* under the License.
*
* SPDX-FileType: SOURCE
* SPDX-FileCopyrightText: 2023 General Motors GTO LLC
* SPDX-FileCopyrightText: 2024 General Motors GTO LLC
* SPDX-License-Identifier: Apache-2.0
*/

Expand Down
4 changes: 2 additions & 2 deletions include/up-cpp/cloudevent/serialize/binary_serializer.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 General Motors GTO LLC
* Copyright (c) 2024 General Motors GTO LLC
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand All @@ -19,7 +19,7 @@
* under the License.
*
* SPDX-FileType: SOURCE
* SPDX-FileCopyrightText: 2023 General Motors GTO LLC
* SPDX-FileCopyrightText: 2024 General Motors GTO LLC
* SPDX-License-Identifier: Apache-2.0
*/

Expand Down
4 changes: 2 additions & 2 deletions include/up-cpp/cloudevent/serialize/json_serializer.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 General Motors GTO LLC
* Copyright (c) 2024 General Motors GTO LLC
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand All @@ -19,7 +19,7 @@
* under the License.
*
* SPDX-FileType: SOURCE
* SPDX-FileCopyrightText: 2023 General Motors GTO LLC
* SPDX-FileCopyrightText: 2024 General Motors GTO LLC
* SPDX-License-Identifier: Apache-2.0
*/

Expand Down
8 changes: 4 additions & 4 deletions include/up-cpp/rpc/RpcClient.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 General Motors GTO LLC
* Copyright (c) 2024 General Motors GTO LLC
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand All @@ -19,7 +19,7 @@
* under the License.
*
* SPDX-FileType: SOURCE
* SPDX-FileCopyrightText: 2023 General Motors GTO LLC
* SPDX-FileCopyrightText: 2024 General Motors GTO LLC
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef _RPC_CLIENT_H_
Expand Down Expand Up @@ -49,8 +49,8 @@ class RpcClient
* @param attributes Metadata for the method invocation (i.e. priority, timeout, etc.)
* @return Returns the CompletableFuture with the result or exception.
*/
virtual std::future<upayload> invokeMethod(const UUri &topic,
const upayload &payload,
virtual std::future<UPayload> invokeMethod(const UUri &topic,
const UPayload &payload,
const UAttributes &attributes) = 0;

virtual ~RpcClient() {}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 General Motors GTO LLC
* Copyright (c) 2024 General Motors GTO LLC
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand All @@ -19,7 +19,7 @@
* under the License.
*
* SPDX-FileType: SOURCE
* SPDX-FileCopyrightText: 2023 General Motors GTO LLC
* SPDX-FileCopyrightText: 2024 General Motors GTO LLC
* SPDX-License-Identifier: Apache-2.0
*/

Expand All @@ -28,8 +28,8 @@

#include <up-core-api/ustatus.pb.h>
#include <up-core-api/uri.pb.h>
#include "up-core-api/uattributes.pb.h"
#include "UPayload.h"
#include <up-core-api/uattributes.pb.h>
#include <up-cpp/transport/datamodel/UPayload.h>

using namespace uprotocol::v1;

Expand All @@ -46,7 +46,7 @@ namespace uprotocol::utransport {
* @return Returns an Ack every time a message is received and processed.
*/
virtual UStatus onReceive(const UUri &uri,
const upayload &payload,
const UPayload &payload,
const UAttributes &attributes) const = 0;

virtual ~UListener() {}
Expand Down
17 changes: 6 additions & 11 deletions include/up-cpp/transport/UTransport.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 General Motors GTO LLC
* Copyright (c) 2024 General Motors GTO LLC
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand All @@ -19,7 +19,7 @@
* under the License.
*
* SPDX-FileType: SOURCE
* SPDX-FileCopyrightText: 2023 General Motors GTO LLC
* SPDX-FileCopyrightText: 2024 General Motors GTO LLC
* SPDX-License-Identifier: Apache-2.0
*/

Expand All @@ -28,12 +28,11 @@

#include <stdint.h>
#include <cstddef>
#include <up-cpp/transport/datamodel/UListener.h>
#include <up-cpp/transport/UListener.h>
#include <up-cpp/transport/datamodel/UPayload.h>
#include <up-core-api/uri.pb.h>
#include <up-core-api/ustatus.pb.h>
#include <up-core-api/uattributes.pb.h>
#include <up-core-api/upayload.pb.h>

using namespace uprotocol::utransport;
using namespace uprotocol::v1;
Expand All @@ -45,19 +44,19 @@ namespace uprotocol::utransport {
public:

/**
* Transmit upayload to the topic using the attributes defined in UTransportAttributes.
* Transmit UPayload to the topic using the attributes defined in UTransportAttributes.
* @param topic Resolved UUri topic to send the payload to.
* @param payload Actual payload.
* @param attributes Additional transport attributes.
* @return Returns OKSTATUS if the payload has been successfully sent (ACK'ed), otherwise it
* returns FAILSTATUS with the appropriate failure.
*/
virtual UStatus send(const UUri &uri,
const upayload &payload,
const UPayload &payload,
const UAttributes &attributes) = 0;

/**
* Register listener to be called when upayload is received for the specific topic.
* Register listener to be called when UPayload is received for the specific topic.
* @param topic Resolved UUri for where the message arrived via the underlying transport technology.
* @param listener The method to execute to process the date for the topic.
* @return Returns OKSTATUS if the listener is unregistered correctly, otherwise it returns FAILSTATUS
Expand All @@ -77,10 +76,6 @@ namespace uprotocol::utransport {
*/
virtual UStatus unregisterListener(const UUri &uri,
const UListener &listner) = 0;

virtual UStatus receive(const UUri &uri,
const upayload &payload,
const UAttributes &attributes) = 0;

virtual ~UTransport() {}
};
Expand Down
Loading

0 comments on commit 905f3ca

Please sign in to comment.