summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmake/NNGOptions.cmake7
-rw-r--r--docs/man/nng_id_map.3supp.adoc4
-rw-r--r--include/nng/supplemental/util/idhash.h (renamed from src/supplemental/idhash/idhash.h)6
-rw-r--r--src/supplemental/CMakeLists.txt5
-rw-r--r--src/supplemental/idhash/CMakeLists.txt11
-rw-r--r--src/supplemental/util/CMakeLists.txt10
-rw-r--r--src/supplemental/util/idhash.c (renamed from src/supplemental/idhash/idhash.c)6
-rw-r--r--src/supplemental/util/idhash_test.c (renamed from src/supplemental/idhash/idhash_test.c)4
8 files changed, 21 insertions, 32 deletions
diff --git a/cmake/NNGOptions.cmake b/cmake/NNGOptions.cmake
index d6240bc8..6335fc63 100644
--- a/cmake/NNGOptions.cmake
+++ b/cmake/NNGOptions.cmake
@@ -1,5 +1,5 @@
#
-# Copyright 2023 Staysail Systems, Inc. <info@staysail.tech>
+# Copyright 2024 Staysail Systems, Inc. <info@staysail.tech>
#
# This software is supplied under the terms of the MIT License, a
# copy of which should be located in the distribution where this
@@ -141,8 +141,3 @@ if (NNG_TRANSPORT_WS OR NNG_TRANSPORT_WSS)
set(NNG_SUPP_BASE64 ON)
set(NNG_SUPP_SHA1 ON)
endif()
-
-# ID hash API is small wrapper around core, probably should always be enabled unless memory
-# is extraordinarily constrained.
-option(NNG_SUPP_IDHASH "Enable application IDHASH API" ON)
-mark_as_advanced(NNG_SUPP_IDHASH) \ No newline at end of file
diff --git a/docs/man/nng_id_map.3supp.adoc b/docs/man/nng_id_map.3supp.adoc
index bd5dace3..343c0667 100644
--- a/docs/man/nng_id_map.3supp.adoc
+++ b/docs/man/nng_id_map.3supp.adoc
@@ -1,6 +1,6 @@
= nng_id_map(3supp)
//
-// Copyright 2023 Staysail Systems, Inc. <info@staysail.tech>
+// Copyright 2024 Staysail Systems, Inc. <info@staysail.tech>
//
// This document is supplied under the terms of the MIT License, a
// copy of which should be located in the distribution where this
@@ -17,7 +17,7 @@ nng_id_map - identifier based mapping table
[source, c]
----
#include <nng/nng.h>
-#include <nng/supplemental/idhash/idhash.h>
+#include <nng/supplemental/util/idhash.h>
typedef struct nng_id_map_s nng_id_map;
diff --git a/src/supplemental/idhash/idhash.h b/include/nng/supplemental/util/idhash.h
index 5fd8f235..7939ab1c 100644
--- a/src/supplemental/idhash/idhash.h
+++ b/include/nng/supplemental/util/idhash.h
@@ -1,5 +1,5 @@
//
-// Copyright 2023 Staysail Systems, Inc. <info@staysail.tech>
+// Copyright 2024 Staysail Systems, Inc. <info@staysail.tech>
//
// This software is supplied under the terms of the MIT License, a
// copy of which should be located in the distribution where this
@@ -7,8 +7,8 @@
// found online at https://opensource.org/licenses/MIT.
//
-#ifndef NNG_SUPPLEMENTAL_IDHASH_IDHASH_H
-#define NNG_SUPPLEMENTAL_IDHASH_IDHASH_H
+#ifndef NNG_SUPPLEMENTAL_UTIL_IDHASH_H
+#define NNG_SUPPLEMENTAL_UTIL_IDHASH_H
#include <nng/nng.h>
diff --git a/src/supplemental/CMakeLists.txt b/src/supplemental/CMakeLists.txt
index 3fa254e7..2dcf228e 100644
--- a/src/supplemental/CMakeLists.txt
+++ b/src/supplemental/CMakeLists.txt
@@ -1,5 +1,5 @@
#
-# Copyright 2021 Staysail Systems, Inc. <info@staystail.tech>
+# Copyright 2024 Staysail Systems, Inc. <info@staystail.tech>
#
# This software is supplied under the terms of the MIT License, a
# copy of which should be located in the distribution where this
@@ -11,8 +11,7 @@ nng_directory(supplemental)
add_subdirectory(base64)
add_subdirectory(http)
-add_subdirectory(idhash)
add_subdirectory(sha1)
add_subdirectory(tls)
add_subdirectory(util)
-add_subdirectory(websocket) \ No newline at end of file
+add_subdirectory(websocket)
diff --git a/src/supplemental/idhash/CMakeLists.txt b/src/supplemental/idhash/CMakeLists.txt
deleted file mode 100644
index 3a9bbb0b..00000000
--- a/src/supplemental/idhash/CMakeLists.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-#
-# Copyright 2023 Staysail Systems, Inc. <info@staysail.tech>
-#
-# This software is supplied under the terms of the MIT License, a
-# copy of which should be located in the distribution where this
-# file was obtained (LICENSE.txt). A copy of the license may also be
-# found online at https://opensource.org/licenses/MIT.
-#
-
-nng_sources_if(NNG_SUPP_IDHASH idhash.c idhash.h)
-nng_test_if(NNG_SUPP_IDHASH idhash_test)
diff --git a/src/supplemental/util/CMakeLists.txt b/src/supplemental/util/CMakeLists.txt
index 5a144da9..f62026fb 100644
--- a/src/supplemental/util/CMakeLists.txt
+++ b/src/supplemental/util/CMakeLists.txt
@@ -1,5 +1,5 @@
#
-# Copyright 2019 Staysail Systems, Inc. <info@staysail.tech>
+# Copyright 2024 Staysail Systems, Inc. <info@staysail.tech>
#
# This software is supplied under the terms of the MIT License, a
# copy of which should be located in the distribution where this
@@ -7,5 +7,9 @@
# found online at https://opensource.org/licenses/MIT.
#
-nng_sources(options.c platform.c)
-nng_headers(nng/supplemental/util/options.h nng/supplemental/util/platform.h)
+nng_sources(idhash.c options.c platform.c)
+nng_headers(
+ nng/supplemental/util/idhash.h
+ nng/supplemental/util/options.h
+ nng/supplemental/util/platform.h)
+nng_test(idhash_test)
diff --git a/src/supplemental/idhash/idhash.c b/src/supplemental/util/idhash.c
index 051b686a..cf48df3e 100644
--- a/src/supplemental/idhash/idhash.c
+++ b/src/supplemental/util/idhash.c
@@ -1,5 +1,5 @@
//
-// Copyright 2023 Staysail Systems, Inc. <info@staysail.tech>
+// Copyright 2024 Staysail Systems, Inc. <info@staysail.tech>
//
// This software is supplied under the terms of the MIT License, a
// copy of which should be located in the distribution where this
@@ -7,7 +7,9 @@
// found online at https://opensource.org/licenses/MIT.
//
-#include "supplemental/idhash/idhash.h"
+#include <nng/nng.h>
+#include <nng/supplemental/util/idhash.h>
+
#include "core/nng_impl.h"
struct nng_id_map_s {
diff --git a/src/supplemental/idhash/idhash_test.c b/src/supplemental/util/idhash_test.c
index 367f34bc..5bbdc4fb 100644
--- a/src/supplemental/idhash/idhash_test.c
+++ b/src/supplemental/util/idhash_test.c
@@ -1,5 +1,5 @@
//
-// Copyright 2023 Staysail Systems, Inc. <info@staysail.tech>
+// Copyright 2024 Staysail Systems, Inc. <info@staysail.tech>
//
// This software is supplied under the terms of the MIT License, a
// copy of which should be located in the distribution where this
@@ -9,7 +9,7 @@
#include <nuts.h>
-#include "idhash.h"
+#include <nng/supplemental/util/idhash.h>
void
test_id_basic(void)