Skip to content

Commit

Permalink
refactor(pubsub): Rename ua_pubsub.h into ua_pubsub_internal.h
Browse files Browse the repository at this point in the history
This way all subsystems (client/server/pubsub) follow the same
nomenclature.
  • Loading branch information
jpfr committed Oct 11, 2024
1 parent 207e695 commit afb1395
Show file tree
Hide file tree
Showing 47 changed files with 49 additions and 56 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ set(lib_headers ${PROJECT_SOURCE_DIR}/deps/open62541_queue.h
${PROJECT_SOURCE_DIR}/src/server/ua_server_internal.h
${PROJECT_SOURCE_DIR}/src/client/ua_client_internal.h
${PROJECT_SOURCE_DIR}/src/pubsub/ua_pubsub_networkmessage.h
${PROJECT_SOURCE_DIR}/src/pubsub/ua_pubsub.h
${PROJECT_SOURCE_DIR}/src/pubsub/ua_pubsub_internal.h
${PROJECT_SOURCE_DIR}/src/pubsub/ua_pubsub_keystorage.h)

set(lib_sources ${PROJECT_SOURCE_DIR}/src/ua_types.c
Expand Down
2 changes: 1 addition & 1 deletion examples/pubsub/server_pubsub_file_configuration.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <open62541/server_pubsub.h>
#include <open62541/server_config_default.h>

#include "ua_pubsub.h"
#include "ua_pubsub_internal.h"

#include "common.h"

Expand Down
3 changes: 2 additions & 1 deletion src/pubsub/ua_pubsub_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
#include <open62541/server_pubsub.h>

#if defined(UA_ENABLE_PUBSUB) && defined(UA_ENABLE_PUBSUB_FILE_CONFIG)
#include "../pubsub/ua_pubsub.h"

#include "ua_pubsub_internal.h"

static UA_StatusCode
createPubSubConnection(UA_PubSubManager *psm,
Expand Down
3 changes: 1 addition & 2 deletions src/pubsub/ua_pubsub_connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
* Copyright (c) 2022 Fraunhofer IOSB (Author: Noel Graf)
*/

#include "ua_pubsub.h"
#include "../server/ua_server_internal.h"
#include "ua_pubsub_internal.h"

#ifdef UA_ENABLE_PUBSUB /* conditional compilation */

Expand Down
3 changes: 1 addition & 2 deletions src/pubsub/ua_pubsub_dataset.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
*/

#include <open62541/server_pubsub.h>
#include "ua_pubsub.h"
#include "../server/ua_server_internal.h"
#include "ua_pubsub_internal.h"

#ifdef UA_ENABLE_PUBSUB /* conditional compilation */

Expand Down
6 changes: 3 additions & 3 deletions src/pubsub/ua_pubsub.h → src/pubsub/ua_pubsub_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
* Copyright (c) 2022 Linutronix GmbH (Author: Muddasir Shakil)
*/

#ifndef UA_PUBSUB_H_
#define UA_PUBSUB_H_
#ifndef UA_PUBSUB_INTERNAL_H_
#define UA_PUBSUB_INTERNAL_H_

#define UA_INTERNAL
#include <open62541/server.h>
Expand Down Expand Up @@ -772,4 +772,4 @@ addSecurityGroupRepresentation(UA_Server *server, UA_SecurityGroup *securityGrou

_UA_END_DECLS

#endif /* UA_PUBSUB_H_ */
#endif /* UA_PUBSUB_INTERNAL_H_ */
1 change: 0 additions & 1 deletion src/pubsub/ua_pubsub_keystorage.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*/

#include "ua_pubsub_keystorage.h"
#include "ua_pubsub.h"

#ifdef UA_ENABLE_PUBSUB_SKS /* conditional compilation */

Expand Down
2 changes: 1 addition & 1 deletion src/pubsub/ua_pubsub_keystorage.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ _UA_BEGIN_DECLS
#ifdef UA_ENABLE_PUBSUB_SKS

#include "open62541_queue.h"
#include "ua_pubsub.h"
#include "ua_pubsub_internal.h"

/**
* PubSubKeyStorage
Expand Down
3 changes: 1 addition & 2 deletions src/pubsub/ua_pubsub_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
* Copyright (c) 2022 Linutronix GmbH (Author: Muddasir Shakil)
*/

#include <open62541/types.h>
#include "ua_pubsub.h"
#include "ua_pubsub_internal.h"

#ifdef UA_ENABLE_PUBSUB /* conditional compilation */

Expand Down
2 changes: 1 addition & 1 deletion src/pubsub/ua_pubsub_ns0.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Copyright (c) 2022 Linutronix GmbH (Author: Muddasir Shakil)
*/

#include "ua_pubsub.h"
#include "ua_pubsub_internal.h"

#ifdef UA_ENABLE_PUBSUB_SKS
#include "ua_pubsub_keystorage.h"
Expand Down
2 changes: 1 addition & 1 deletion src/pubsub/ua_pubsub_reader.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Copyright (c) 2022 Fraunhofer IOSB (Author: Noel Graf)
*/

#include "ua_pubsub.h"
#include "ua_pubsub_internal.h"

#ifdef UA_ENABLE_PUBSUB /* conditional compilation */

Expand Down
3 changes: 1 addition & 2 deletions src/pubsub/ua_pubsub_readergroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
*/

#include <open62541/server_pubsub.h>
#include "ua_pubsub.h"
#include "../server/ua_server_internal.h"
#include "ua_pubsub_internal.h"

#ifdef UA_ENABLE_PUBSUB /* conditional compilation */

Expand Down
3 changes: 1 addition & 2 deletions src/pubsub/ua_pubsub_securitygroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@

#ifdef UA_ENABLE_PUBSUB_SKS /* conditional compilation */

#include "ua_pubsub.h"
#include "ua_pubsub_internal.h"
#include "ua_pubsub_keystorage.h"
#include "../server/ua_server_internal.h"

#define UA_PUBSUB_KEYMATERIAL_NONCELENGTH 32

Expand Down
2 changes: 1 addition & 1 deletion src/pubsub/ua_pubsub_writer.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Copyright (c) 2021 Fraunhofer IOSB (Author: Jan Hermes)
*/

#include "ua_pubsub.h"
#include "ua_pubsub_internal.h"

#ifdef UA_ENABLE_PUBSUB /* conditional compilation */

Expand Down
3 changes: 1 addition & 2 deletions src/pubsub/ua_pubsub_writergroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
* Copyright (c) 2022 Linutronix GmbH (Author: Muddasir Shakil)
*/

#include "ua_pubsub.h"
#include "../server/ua_server_internal.h"
#include "ua_pubsub_internal.h"

#ifdef UA_ENABLE_PUBSUB /* conditional compilation */

Expand Down
2 changes: 1 addition & 1 deletion tests/pubsub/check_pubsub_config_freeze.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <open62541/server_pubsub.h>

#include "ua_server_internal.h"
#include "ua_pubsub.h"
#include "ua_pubsub_internal.h"
#include "test_helpers.h"

#include <check.h>
Expand Down
2 changes: 1 addition & 1 deletion tests/pubsub/check_pubsub_configuration.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "../common.h"

#include "test_helpers.h"
#include "ua_pubsub.h"
#include "ua_pubsub_internal.h"
#include "ua_server_internal.h"

#include <check.h>
Expand Down
3 changes: 1 addition & 2 deletions tests/pubsub/check_pubsub_connection_ethernet.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
#include <open62541/types_generated.h>

#include "test_helpers.h"
#include "ua_pubsub.h"
#include "ua_pubsub.h"
#include "ua_pubsub_internal.h"
#include "ua_server_internal.h"

#include <check.h>
Expand Down
2 changes: 1 addition & 1 deletion tests/pubsub/check_pubsub_connection_mqtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <open62541/server_config_default.h>

#include "test_helpers.h"
#include "ua_pubsub.h"
#include "ua_pubsub_internal.h"
#include "ua_server_internal.h"

#include <check.h>
Expand Down
2 changes: 1 addition & 1 deletion tests/pubsub/check_pubsub_connection_udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <open62541/server_pubsub.h>

#include "ua_server_internal.h"
#include "ua_pubsub.h"
#include "ua_pubsub_internal.h"
#include "test_helpers.h"

#include <check.h>
Expand Down
2 changes: 1 addition & 1 deletion tests/pubsub/check_pubsub_decryption.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <open62541/server_config_default.h>
#include <open62541/server_pubsub.h>

#include "ua_pubsub.h"
#include "ua_pubsub_internal.h"
#include "ua_server_internal.h"
#include "test_helpers.h"

Expand Down
2 changes: 1 addition & 1 deletion tests/pubsub/check_pubsub_encoding_custom.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include <open62541/types.h>

#include "ua_pubsub.h"
#include "ua_pubsub_internal.h"
#include "ua_pubsub_networkmessage.h"

#include "math.h"
Expand Down
2 changes: 1 addition & 1 deletion tests/pubsub/check_pubsub_encrypted_rt_levels.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "open62541/server_pubsub.h"
#include <open62541/plugin/securitypolicy_default.h>

#include "ua_pubsub.h"
#include "ua_pubsub_internal.h"
#include "ua_pubsub_networkmessage.h"
#include "testing_clock.h"
#include "test_helpers.h"
Expand Down
2 changes: 1 addition & 1 deletion tests/pubsub/check_pubsub_encryption.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <open62541/plugin/securitypolicy_default.h>

#include "test_helpers.h"
#include "ua_pubsub.h"
#include "ua_pubsub_internal.h"
#include "ua_server_internal.h"

#include <check.h>
Expand Down
2 changes: 1 addition & 1 deletion tests/pubsub/check_pubsub_encryption_aes256.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <open62541/plugin/securitypolicy_default.h>

#include "test_helpers.h"
#include "ua_pubsub.h"
#include "ua_pubsub_internal.h"
#include "ua_server_internal.h"

#include <check.h>
Expand Down
2 changes: 1 addition & 1 deletion tests/pubsub/check_pubsub_get_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <open62541/server_pubsub.h>
#include <open62541/plugin/log_stdout.h>

#include "ua_pubsub.h"
#include "ua_pubsub_internal.h"
#include "ua_server_internal.h"

#include "../arch/eventloop_posix/eventloop_posix.h"
Expand Down
2 changes: 1 addition & 1 deletion tests/pubsub/check_pubsub_informationmodel.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <open62541/types_generated.h>

#include "ua_server_internal.h"
#include "ua_pubsub.h"
#include "ua_pubsub_internal.h"
#include "test_helpers.h"

#include <math.h>
Expand Down
2 changes: 1 addition & 1 deletion tests/pubsub/check_pubsub_mqtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <open62541/server_pubsub.h>

#include "test_helpers.h"
#include "ua_pubsub.h"
#include "ua_pubsub_internal.h"
#include "ua_server_internal.h"

#include <check.h>
Expand Down
2 changes: 1 addition & 1 deletion tests/pubsub/check_pubsub_multiple_subscribe_rt_levels.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <open62541/server_pubsub.h>
#include <open62541/server_config_default.h>

#include "ua_pubsub.h"
#include "ua_pubsub_internal.h"
#include "ua_pubsub_networkmessage.h"
#include "testing_clock.h"
#include "test_helpers.h"
Expand Down
2 changes: 1 addition & 1 deletion tests/pubsub/check_pubsub_pds.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <open62541/server_pubsub.h>

#include "ua_server_internal.h"
#include "ua_pubsub.h"
#include "ua_pubsub_internal.h"
#include "test_helpers.h"

#include <check.h>
Expand Down
2 changes: 1 addition & 1 deletion tests/pubsub/check_pubsub_publish.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <open62541/server_pubsub.h>

#include "test_helpers.h"
#include "ua_pubsub.h"
#include "ua_pubsub_internal.h"
#include "ua_server_internal.h"

#include <check.h>
Expand Down
2 changes: 1 addition & 1 deletion tests/pubsub/check_pubsub_publish_ethernet.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <stdlib.h>

#include "test_helpers.h"
#include "ua_pubsub.h"
#include "ua_pubsub_internal.h"
#include "ua_server_internal.h"
#include "ua_pubsub_networkmessage.h"

Expand Down
2 changes: 1 addition & 1 deletion tests/pubsub/check_pubsub_publish_json.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <open62541/server_pubsub.h>
#include <open62541/types.h>

#include "ua_pubsub.h"
#include "ua_pubsub_internal.h"
#include "test_helpers.h"

#include <check.h>
Expand Down
2 changes: 1 addition & 1 deletion tests/pubsub/check_pubsub_publish_rt_levels.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <open62541/server_config_default.h>

#include "test_helpers.h"
#include "ua_pubsub.h"
#include "ua_pubsub_internal.h"
#include "ua_pubsub_networkmessage.h"
#include <server/ua_server_internal.h>

Expand Down
2 changes: 1 addition & 1 deletion tests/pubsub/check_pubsub_publisherid.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "test_helpers.h"
#include "testing_clock.h"
#include "ua_server_internal.h"
#include "ua_pubsub.h"
#include "ua_pubsub_internal.h"

#ifdef UA_ENABLE_PUBSUB_FILE_CONFIG
#include "util/ua_util_internal.h"
Expand Down
2 changes: 1 addition & 1 deletion tests/pubsub/check_pubsub_publishspeed.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <open62541/server_pubsub.h>

#include "test_helpers.h"
#include "ua_pubsub.h"
#include "ua_pubsub_internal.h"
#include "ua_server_internal.h"

#include <check.h>
Expand Down
2 changes: 1 addition & 1 deletion tests/pubsub/check_pubsub_sks_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <open62541/plugin/certificategroup_default.h>

#include "test_helpers.h"
#include "ua_pubsub.h"
#include "ua_pubsub_internal.h"
#include "ua_pubsub_keystorage.h"
#include "ua_server_internal.h"

Expand Down
2 changes: 1 addition & 1 deletion tests/pubsub/check_pubsub_sks_keystorage.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <open62541/server_config_default.h>
#include <open62541/server_pubsub.h>

#include "ua_pubsub.h"
#include "ua_pubsub_internal.h"
#include "ua_pubsub_keystorage.h"
#include "ua_server_internal.h"

Expand Down
2 changes: 1 addition & 1 deletion tests/pubsub/check_pubsub_sks_pull.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
#include <open62541/plugin/certificategroup_default.h>

#include "test_helpers.h"
#include "ua_pubsub.h"
#include "ua_pubsub_keystorage.h"
#include "ua_pubsub_internal.h"
#include "ua_server_internal.h"

#include <check.h>
Expand Down
2 changes: 1 addition & 1 deletion tests/pubsub/check_pubsub_sks_push.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#include "test_helpers.h"
#include "../encryption/certificates.h"
#include "ua_pubsub.h"
#include "ua_pubsub_internal.h"
#include "ua_pubsub_keystorage.h"
#include "ua_server_internal.h"

Expand Down
2 changes: 1 addition & 1 deletion tests/pubsub/check_pubsub_sks_securitygroups.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
#include <open62541/server_pubsub.h>

#include "test_helpers.h"
#include "ua_pubsub.h"
#include "ua_pubsub_keystorage.h"
#include "ua_pubsub_internal.h"
#include "ua_server_internal.h"

#include <check.h>
Expand Down
2 changes: 1 addition & 1 deletion tests/pubsub/check_pubsub_subscribe.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#include "test_helpers.h"
#include "testing_clock.h"
#include "ua_pubsub.h"
#include "ua_pubsub_internal.h"
#include "ua_server_internal.h"

#define MULTICAST_URL "opc.udp://224.0.0.22:4801/"
Expand Down
Loading

0 comments on commit afb1395

Please sign in to comment.