summaryrefslogtreecommitdiff
path: root/src/protocol
diff options
context:
space:
mode:
authorGregor Burger <gregor.burger@bhs-technologies.com>2018-11-20 11:48:03 +0100
committerGarrett D'Amore <garrett@damore.org>2018-11-22 12:28:27 -0800
commitd6bb25e1e0a25cb5aa781ac4f90b513fd5624f50 (patch)
treef081a6868a6c3d88b4df64ef20a38fb3e83925d1 /src/protocol
parent8a9fd805d96201c780610b765f9e6dd9f2eda642 (diff)
downloadnng-d6bb25e1e0a25cb5aa781ac4f90b513fd5624f50.tar.gz
nng-d6bb25e1e0a25cb5aa781ac4f90b513fd5624f50.tar.bz2
nng-d6bb25e1e0a25cb5aa781ac4f90b513fd5624f50.zip
move all public headers to include/nng/ folder
This change makes embedding nng + nggpp (or other projects depending on nng) in cmake easier. The header files are moved to a separate include directory. This also makes installation of the headers easier, and allows clearer identification of private vs public heade files. Some additional cleanups were performed by @gedamore, but the main credit for this change belongs with @gregorburger.
Diffstat (limited to 'src/protocol')
-rw-r--r--src/protocol/bus0/CMakeLists.txt4
-rw-r--r--src/protocol/bus0/bus.c2
-rw-r--r--src/protocol/bus0/bus.h34
-rw-r--r--src/protocol/pair0/CMakeLists.txt4
-rw-r--r--src/protocol/pair0/pair.c2
-rw-r--r--src/protocol/pair0/pair.h34
-rw-r--r--src/protocol/pair1/CMakeLists.txt4
-rw-r--r--src/protocol/pair1/pair.c2
-rw-r--r--src/protocol/pair1/pair.h35
-rw-r--r--src/protocol/pipeline0/CMakeLists.txt10
-rw-r--r--src/protocol/pipeline0/pull.c2
-rw-r--r--src/protocol/pipeline0/pull.h33
-rw-r--r--src/protocol/pipeline0/push.c2
-rw-r--r--src/protocol/pipeline0/push.h33
-rw-r--r--src/protocol/pubsub0/CMakeLists.txt10
-rw-r--r--src/protocol/pubsub0/pub.c2
-rw-r--r--src/protocol/pubsub0/pub.h33
-rw-r--r--src/protocol/pubsub0/sub.c2
-rw-r--r--src/protocol/pubsub0/sub.h37
-rw-r--r--src/protocol/reqrep0/CMakeLists.txt10
-rw-r--r--src/protocol/reqrep0/rep.c2
-rw-r--r--src/protocol/reqrep0/rep.h33
-rw-r--r--src/protocol/reqrep0/req.c2
-rw-r--r--src/protocol/reqrep0/req.h34
-rw-r--r--src/protocol/reqrep0/xrep.c2
-rw-r--r--src/protocol/reqrep0/xreq.c2
-rw-r--r--src/protocol/survey0/CMakeLists.txt10
-rw-r--r--src/protocol/survey0/respond.c2
-rw-r--r--src/protocol/survey0/respond.h33
-rw-r--r--src/protocol/survey0/survey.c2
-rw-r--r--src/protocol/survey0/survey.h35
-rw-r--r--src/protocol/survey0/xrespond.c2
-rw-r--r--src/protocol/survey0/xsurvey.c2
33 files changed, 34 insertions, 422 deletions
diff --git a/src/protocol/bus0/CMakeLists.txt b/src/protocol/bus0/CMakeLists.txt
index 73acdf11..1f144438 100644
--- a/src/protocol/bus0/CMakeLists.txt
+++ b/src/protocol/bus0/CMakeLists.txt
@@ -14,10 +14,8 @@ mark_as_advanced(NNG_PROTO_BUS0)
if (NNG_PROTO_BUS0)
set(_DEFS -DNNG_HAVE_BUS0)
- set(_SRCS protocol/bus0/bus.c protocol/bus0/bus.h)
- set(_HDRS protocol/bus0/bus.h)
+ set(_SRCS protocol/bus0/bus.c ${PROJECT_SOURCE_DIR}/include/nng/protocol/bus0/bus.h)
set(NNG_DEFS ${NNG_DEFS} ${_DEFS} PARENT_SCOPE)
set(NNG_SRCS ${NNG_SRCS} ${_SRCS} PARENT_SCOPE)
- set(NNG_HDRS ${NNG_HDRS} ${_HDRS} PARENT_SCOPE)
endif()
diff --git a/src/protocol/bus0/bus.c b/src/protocol/bus0/bus.c
index 2426abba..ed2a244f 100644
--- a/src/protocol/bus0/bus.c
+++ b/src/protocol/bus0/bus.c
@@ -13,7 +13,7 @@
#include <string.h>
#include "core/nng_impl.h"
-#include "protocol/bus0/bus.h"
+#include "nng/protocol/bus0/bus.h"
// Bus protocol. The BUS protocol, each peer sends a message to its peers.
// However, bus protocols do not "forward" (absent a device). So in order
diff --git a/src/protocol/bus0/bus.h b/src/protocol/bus0/bus.h
deleted file mode 100644
index c8c23d84..00000000
--- a/src/protocol/bus0/bus.h
+++ /dev/null
@@ -1,34 +0,0 @@
-//
-// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech>
-// Copyright 2018 Capitar IT Group BV <info@capitar.com>
-//
-// 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.
-//
-
-#ifndef NNG_PROTOCOL_BUS0_BUS_H
-#define NNG_PROTOCOL_BUS0_BUS_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-NNG_DECL int nng_bus0_open(nng_socket *);
-
-NNG_DECL int nng_bus0_open_raw(nng_socket *);
-
-#ifndef nng_bus_open
-#define nng_bus_open nng_bus0_open
-#endif
-
-#ifndef nng_bus_open_raw
-#define nng_bus_open_raw nng_bus0_open_raw
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // NNG_PROTOCOL_BUS0_BUS_H
diff --git a/src/protocol/pair0/CMakeLists.txt b/src/protocol/pair0/CMakeLists.txt
index c453b07f..72d04888 100644
--- a/src/protocol/pair0/CMakeLists.txt
+++ b/src/protocol/pair0/CMakeLists.txt
@@ -14,10 +14,8 @@ mark_as_advanced(NNG_PROTO_PAIR0)
if (NNG_PROTO_PAIR0)
set(_DEFS -DNNG_HAVE_PAIR0)
- set(_SRCS protocol/pair0/pair.c protocol/pair0/pair.h)
- set(_HDRS protocol/pair0/pair.h)
+ set(_SRCS protocol/pair0/pair.c ${PROJECT_SOURCE_DIR}/include/nng/protocol/pair0/pair.h)
set(NNG_DEFS ${NNG_DEFS} ${_DEFS} PARENT_SCOPE)
set(NNG_SRCS ${NNG_SRCS} ${_SRCS} PARENT_SCOPE)
- set(NNG_HDRS ${NNG_HDRS} ${_HDRS} PARENT_SCOPE)
endif()
diff --git a/src/protocol/pair0/pair.c b/src/protocol/pair0/pair.c
index d663c5e2..fef2acaf 100644
--- a/src/protocol/pair0/pair.c
+++ b/src/protocol/pair0/pair.c
@@ -12,7 +12,7 @@
#include <string.h>
#include "core/nng_impl.h"
-#include "protocol/pair0/pair.h"
+#include "nng/protocol/pair0/pair.h"
// Pair protocol. The PAIR protocol is a simple 1:1 messaging pattern.
// While a peer is connected to the server, all other peer connection
diff --git a/src/protocol/pair0/pair.h b/src/protocol/pair0/pair.h
deleted file mode 100644
index 1356f1cd..00000000
--- a/src/protocol/pair0/pair.h
+++ /dev/null
@@ -1,34 +0,0 @@
-//
-// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech>
-// Copyright 2018 Capitar IT Group BV <info@capitar.com>
-//
-// 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.
-//
-
-#ifndef NNG_PROTOCOL_PAIR0_PAIR_H
-#define NNG_PROTOCOL_PAIR0_PAIR_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-NNG_DECL int nng_pair0_open(nng_socket *);
-
-NNG_DECL int nng_pair0_open_raw(nng_socket *);
-
-#ifndef nng_pair_open
-#define nng_pair_open nng_pair0_open
-#endif
-
-#ifndef nng_pair_open_raw
-#define nng_pair_open_raw nng_pair0_open_raw
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // NNG_PROTOCOL_PAIR0_PAIR_H
diff --git a/src/protocol/pair1/CMakeLists.txt b/src/protocol/pair1/CMakeLists.txt
index 5c8813bf..cbcb2bc2 100644
--- a/src/protocol/pair1/CMakeLists.txt
+++ b/src/protocol/pair1/CMakeLists.txt
@@ -14,10 +14,8 @@ mark_as_advanced(NNG_PROTO_PAIR1)
if (NNG_PROTO_PAIR1)
set(_DEFS -DNNG_HAVE_PAIR1)
- set(_SRCS protocol/pair1/pair.c protocol/pair1/pair.h)
- set(_HDRS protocol/pair1/pair.h)
+ set(_SRCS protocol/pair1/pair.c ${PROJECT_SOURCE_DIR}/include/nng/protocol/pair1/pair.h)
set(NNG_DEFS ${NNG_DEFS} ${_DEFS} PARENT_SCOPE)
set(NNG_SRCS ${NNG_SRCS} ${_SRCS} PARENT_SCOPE)
- set(NNG_HDRS ${NNG_HDRS} ${_HDRS} PARENT_SCOPE)
endif()
diff --git a/src/protocol/pair1/pair.c b/src/protocol/pair1/pair.c
index 3033b196..a474f0d9 100644
--- a/src/protocol/pair1/pair.c
+++ b/src/protocol/pair1/pair.c
@@ -13,7 +13,7 @@
#include "core/nng_impl.h"
-#include "protocol/pair1/pair.h"
+#include "nng/protocol/pair1/pair.h"
// Pair protocol. The PAIRv1 protocol is a simple 1:1 messaging pattern,
// usually, but it can support a polyamorous mode where a single server can
diff --git a/src/protocol/pair1/pair.h b/src/protocol/pair1/pair.h
deleted file mode 100644
index 85da9d45..00000000
--- a/src/protocol/pair1/pair.h
+++ /dev/null
@@ -1,35 +0,0 @@
-//
-// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech>
-// Copyright 2018 Capitar IT Group BV <info@capitar.com>
-//
-// 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.
-//
-
-#ifndef NNG_PROTOCOL_PAIR1_PAIR_H
-#define NNG_PROTOCOL_PAIR1_PAIR_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-NNG_DECL int nng_pair1_open(nng_socket *);
-NNG_DECL int nng_pair1_open_raw(nng_socket *);
-
-#ifndef nng_pair_open
-#define nng_pair_open nng_pair1_open
-#endif
-
-#ifndef nng_pair_open_raw
-#define nng_pair_open_raw nng_pair1_open_raw
-#endif
-
-#define NNG_OPT_PAIR1_POLY "pair1:polyamorous"
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // NNG_PROTOCOL_PAIR1_PAIR_H
diff --git a/src/protocol/pipeline0/CMakeLists.txt b/src/protocol/pipeline0/CMakeLists.txt
index 675cb961..f4de4475 100644
--- a/src/protocol/pipeline0/CMakeLists.txt
+++ b/src/protocol/pipeline0/CMakeLists.txt
@@ -16,21 +16,19 @@ option (NNG_PROTO_PULL0 "Enable PULLv0 protocol." ON)
mark_as_advanced(NNG_PROTO_PULL0)
set(_DEFS)
-set(_HDRS)
set(_SRCS)
if (NNG_PROTO_PUSH0)
- list(APPEND _SRCS protocol/pipeline0/push.c protocol/pipeline0/push.h)
- list(APPEND _HDRS protocol/pipeline0/push.h)
+ list(APPEND _SRCS protocol/pipeline0/push.c ${PROJECT_SOURCE_DIR}/include/nng/protocol/pipeline0/push.h)
+
list(APPEND _DEFS -DNNG_HAVE_PUSH0)
endif()
if (NNG_PROTO_PULL0)
- list(APPEND _SRCS protocol/pipeline0/pull.c protocol/pipeline0/pull.h)
- list(APPEND _HDRS protocol/pipeline0/pull.h)
+ list(APPEND _SRCS protocol/pipeline0/pull.c ${PROJECT_SOURCE_DIR}/include/nng/protocol/pipeline0/pull.h)
+
list(APPEND _DEFS -DNNG_HAVE_PULL0)
endif()
set(NNG_DEFS ${NNG_DEFS} ${_DEFS} PARENT_SCOPE)
set(NNG_SRCS ${NNG_SRCS} ${_SRCS} PARENT_SCOPE)
-set(NNG_HDRS ${NNG_HDRS} ${_HDRS} PARENT_SCOPE)
diff --git a/src/protocol/pipeline0/pull.c b/src/protocol/pipeline0/pull.c
index a713bc80..b0f089b1 100644
--- a/src/protocol/pipeline0/pull.c
+++ b/src/protocol/pipeline0/pull.c
@@ -12,7 +12,7 @@
#include <string.h>
#include "core/nng_impl.h"
-#include "protocol/pipeline0/pull.h"
+#include "nng/protocol/pipeline0/pull.h"
// Pull protocol. The PULL protocol is the "read" side of a pipeline.
diff --git a/src/protocol/pipeline0/pull.h b/src/protocol/pipeline0/pull.h
deleted file mode 100644
index 1c5d63e3..00000000
--- a/src/protocol/pipeline0/pull.h
+++ /dev/null
@@ -1,33 +0,0 @@
-//
-// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech>
-// Copyright 2018 Capitar IT Group BV <info@capitar.com>
-//
-// 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.
-//
-
-#ifndef NNG_PROTOCOL_PIPELINE0_PULL_H
-#define NNG_PROTOCOL_PIPELINE0_PULL_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-NNG_DECL int nng_pull0_open(nng_socket *);
-NNG_DECL int nng_pull0_open_raw(nng_socket *);
-
-#ifndef nng_pull_open
-#define nng_pull_open nng_pull0_open
-#endif
-
-#ifndef nng_pull_open_raw
-#define nng_pull_open_raw nng_pull0_open_raw
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // NNG_PROTOCOL_PIPELINE0_PULL_H
diff --git a/src/protocol/pipeline0/push.c b/src/protocol/pipeline0/push.c
index 00e9212c..c31bec4e 100644
--- a/src/protocol/pipeline0/push.c
+++ b/src/protocol/pipeline0/push.c
@@ -12,7 +12,7 @@
#include <string.h>
#include "core/nng_impl.h"
-#include "protocol/pipeline0/push.h"
+#include "nng/protocol/pipeline0/push.h"
// Push protocol. The PUSH protocol is the "write" side of a pipeline.
// Push distributes fairly, or tries to, by giving messages in round-robin
diff --git a/src/protocol/pipeline0/push.h b/src/protocol/pipeline0/push.h
deleted file mode 100644
index a1384e0a..00000000
--- a/src/protocol/pipeline0/push.h
+++ /dev/null
@@ -1,33 +0,0 @@
-//
-// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech>
-// Copyright 2018 Capitar IT Group BV <info@capitar.com>
-//
-// 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.
-//
-
-#ifndef NNG_PROTOCOL_PIPELINE0_PUSH_H
-#define NNG_PROTOCOL_PIPELINE0_PUSH_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-NNG_DECL int nng_push0_open(nng_socket *);
-NNG_DECL int nng_push0_open_raw(nng_socket *);
-
-#ifndef nng_push_open
-#define nng_push_open nng_push0_open
-#endif
-
-#ifndef nng_push_open_raw
-#define nng_push_open_raw nng_push0_open_raw
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // NNG_PROTOCOL_PIPELINE0_PUSH_H
diff --git a/src/protocol/pubsub0/CMakeLists.txt b/src/protocol/pubsub0/CMakeLists.txt
index 29f64049..1ea0cacf 100644
--- a/src/protocol/pubsub0/CMakeLists.txt
+++ b/src/protocol/pubsub0/CMakeLists.txt
@@ -17,20 +17,18 @@ mark_as_advanced(NNG_PROTO_SUB0)
set(_DEFS)
set(_SRCS)
-set(_HDRS)
if (NNG_PROTO_PUB0)
list(APPEND _DEFS -DNNG_HAVE_PUB0)
- list(APPEND _SRCS protocol/pubsub0/pub.c protocol/pubsub0/pub.h)
- list(APPEND _HDRS protocol/pubsub0/pub.h)
+ list(APPEND _SRCS protocol/pubsub0/pub.c ${PROJECT_SOURCE_DIR}/include/nng/protocol/pubsub0/pub.h)
+
endif()
if (NNG_PROTO_SUB0)
list(APPEND _DEFS -DNNG_HAVE_SUB0)
- list(APPEND _SRCS protocol/pubsub0/sub.c protocol/pubsub0/sub.h)
- list(APPEND _HDRS protocol/pubsub0/sub.h)
+ list(APPEND _SRCS protocol/pubsub0/sub.c ${PROJECT_SOURCE_DIR}/include/nng/protocol/pubsub0/sub.h)
+
endif()
set(NNG_DEFS ${NNG_DEFS} ${_DEFS} PARENT_SCOPE)
set(NNG_SRCS ${NNG_SRCS} ${_SRCS} PARENT_SCOPE)
-set(NNG_HDRS ${NNG_HDRS} ${_HDRS} PARENT_SCOPE)
diff --git a/src/protocol/pubsub0/pub.c b/src/protocol/pubsub0/pub.c
index cbc8acea..e1c182e8 100644
--- a/src/protocol/pubsub0/pub.c
+++ b/src/protocol/pubsub0/pub.c
@@ -12,7 +12,7 @@
#include <string.h>
#include "core/nng_impl.h"
-#include "protocol/pubsub0/pub.h"
+#include "nng/protocol/pubsub0/pub.h"
// Publish protocol. The PUB protocol simply sends messages out, as
// a broadcast. It has nothing more sophisticated because it does not
diff --git a/src/protocol/pubsub0/pub.h b/src/protocol/pubsub0/pub.h
deleted file mode 100644
index 877f2f1c..00000000
--- a/src/protocol/pubsub0/pub.h
+++ /dev/null
@@ -1,33 +0,0 @@
-//
-// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech>
-// Copyright 2018 Capitar IT Group BV <info@capitar.com>
-//
-// 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.
-//
-
-#ifndef NNG_PROTOCOL_PUBSUB0_PUB_H
-#define NNG_PROTOCOL_PUBSUB0_PUB_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-NNG_DECL int nng_pub0_open(nng_socket *);
-NNG_DECL int nng_pub0_open_raw(nng_socket *);
-
-#ifndef nng_pub_open
-#define nng_pub_open nng_pub0_open
-#endif
-
-#ifndef nng_pub_open_raw
-#define nng_pub_open_raw nng_pub0_open_raw
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // NNG_PROTOCOL_PUBSUB0_PUB_H
diff --git a/src/protocol/pubsub0/sub.c b/src/protocol/pubsub0/sub.c
index aeccfd25..7bb4485a 100644
--- a/src/protocol/pubsub0/sub.c
+++ b/src/protocol/pubsub0/sub.c
@@ -12,7 +12,7 @@
#include <string.h>
#include "core/nng_impl.h"
-#include "protocol/pubsub0/sub.h"
+#include "nng/protocol/pubsub0/sub.h"
// Subscriber protocol. The SUB protocol receives messages sent to
// it from publishers, and filters out those it is not interested in,
diff --git a/src/protocol/pubsub0/sub.h b/src/protocol/pubsub0/sub.h
deleted file mode 100644
index acb5cda3..00000000
--- a/src/protocol/pubsub0/sub.h
+++ /dev/null
@@ -1,37 +0,0 @@
-//
-// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech>
-// Copyright 2018 Capitar IT Group BV <info@capitar.com>
-//
-// 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.
-//
-
-#ifndef NNG_PROTOCOL_PUBSUB0_SUB_H
-#define NNG_PROTOCOL_PUBSUB0_SUB_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-NNG_DECL int nng_sub0_open(nng_socket *);
-
-NNG_DECL int nng_sub0_open_raw(nng_socket *);
-
-#ifndef nng_sub_open
-#define nng_sub_open nng_sub0_open
-#endif
-
-#ifndef nng_sub_open_raw
-#define nng_sub_open_raw nng_sub0_open_raw
-#endif
-
-#define NNG_OPT_SUB_SUBSCRIBE "sub:subscribe"
-#define NNG_OPT_SUB_UNSUBSCRIBE "sub:unsubscribe"
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // NNG_PROTOCOL_PUBSUB0_SUB_H
diff --git a/src/protocol/reqrep0/CMakeLists.txt b/src/protocol/reqrep0/CMakeLists.txt
index 70c075c1..bae31433 100644
--- a/src/protocol/reqrep0/CMakeLists.txt
+++ b/src/protocol/reqrep0/CMakeLists.txt
@@ -17,24 +17,22 @@ mark_as_advanced(NNG_PROTO_REP0)
set(_DEFS)
set(_SRCS)
-set(_HDRS)
if (NNG_PROTO_REQ0)
list(APPEND _DEFS -DNNG_HAVE_REQ0)
list(APPEND _SRCS
protocol/reqrep0/req.c protocol/reqrep0/xreq.c
- protocol/reqrep0/req.h)
- list(APPEND _HDRS protocol/reqrep0/req.h)
+ ${PROJECT_SOURCE_DIR}/include/nng/protocol/reqrep0/req.h)
+
endif()
if (NNG_PROTO_REP0)
list(APPEND _DEFS -DNNG_HAVE_REP0)
list(APPEND _SRCS
protocol/reqrep0/rep.c protocol/reqrep0/xrep.c
- protocol/reqrep0/rep.h)
- list(APPEND _HDRS protocol/reqrep0/rep.h)
+ ${PROJECT_SOURCE_DIR}/include/nng/protocol/reqrep0/rep.h)
+
endif()
set(NNG_DEFS ${NNG_DEFS} ${_DEFS} PARENT_SCOPE)
set(NNG_SRCS ${NNG_SRCS} ${_SRCS} PARENT_SCOPE)
-set(NNG_HDRS ${NNG_HDRS} ${_HDRS} PARENT_SCOPE)
diff --git a/src/protocol/reqrep0/rep.c b/src/protocol/reqrep0/rep.c
index 586f7143..875918f5 100644
--- a/src/protocol/reqrep0/rep.c
+++ b/src/protocol/reqrep0/rep.c
@@ -12,7 +12,7 @@
#include <string.h>
#include "core/nng_impl.h"
-#include "protocol/reqrep0/rep.h"
+#include "nng/protocol/reqrep0/rep.h"
// Response protocol. The REP protocol is the "reply" side of a
// request-reply pair. This is useful for building RPC servers, for
diff --git a/src/protocol/reqrep0/rep.h b/src/protocol/reqrep0/rep.h
deleted file mode 100644
index 612127a2..00000000
--- a/src/protocol/reqrep0/rep.h
+++ /dev/null
@@ -1,33 +0,0 @@
-//
-// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech>
-// Copyright 2018 Capitar IT Group BV <info@capitar.com>
-//
-// 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.
-//
-
-#ifndef NNG_PROTOCOL_REQREP0_REP_H
-#define NNG_PROTOCOL_REQREP0_REP_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-NNG_DECL int nng_rep0_open(nng_socket *);
-NNG_DECL int nng_rep0_open_raw(nng_socket *);
-
-#ifndef nng_rep_open
-#define nng_rep_open nng_rep0_open
-#endif
-
-#ifndef nng_rep_open
-#define nng_rep_open_raw nng_rep0_open_raw
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // NNG_PROTOCOL_REQREP0_REP_H
diff --git a/src/protocol/reqrep0/req.c b/src/protocol/reqrep0/req.c
index 49d0ea66..139427a2 100644
--- a/src/protocol/reqrep0/req.c
+++ b/src/protocol/reqrep0/req.c
@@ -13,7 +13,7 @@
#include <string.h>
#include "core/nng_impl.h"
-#include "protocol/reqrep0/req.h"
+#include "nng/protocol/reqrep0/req.h"
// Request protocol. The REQ protocol is the "request" side of a
// request-reply pair. This is useful for building RPC clients, for example.
diff --git a/src/protocol/reqrep0/req.h b/src/protocol/reqrep0/req.h
deleted file mode 100644
index 392c7932..00000000
--- a/src/protocol/reqrep0/req.h
+++ /dev/null
@@ -1,34 +0,0 @@
-//
-// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech>
-// Copyright 2018 Capitar IT Group BV <info@capitar.com>
-//
-// 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.
-//
-
-#ifndef NNG_PROTOCOL_REQREP0_REQ_H
-#define NNG_PROTOCOL_REQREP0_REQ_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-NNG_DECL int nng_req0_open(nng_socket *);
-NNG_DECL int nng_req0_open_raw(nng_socket *);
-
-#ifndef nng_req_open
-#define nng_req_open nng_req0_open
-#endif
-#ifndef nng_req_open_raw
-#define nng_req_open_raw nng_req0_open_raw
-#endif
-
-#define NNG_OPT_REQ_RESENDTIME "req:resend-time"
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // NNG_PROTOCOL_REQREP0_REQ_H
diff --git a/src/protocol/reqrep0/xrep.c b/src/protocol/reqrep0/xrep.c
index 1fe81ac5..d89722d6 100644
--- a/src/protocol/reqrep0/xrep.c
+++ b/src/protocol/reqrep0/xrep.c
@@ -12,7 +12,7 @@
#include <string.h>
#include "core/nng_impl.h"
-#include "protocol/reqrep0/rep.h"
+#include "nng/protocol/reqrep0/rep.h"
// Response protocol in raw mode. The REP protocol is the "reply" side of a
// request-reply pair. This is useful for building RPC servers, for
diff --git a/src/protocol/reqrep0/xreq.c b/src/protocol/reqrep0/xreq.c
index a98c713e..271c59a6 100644
--- a/src/protocol/reqrep0/xreq.c
+++ b/src/protocol/reqrep0/xreq.c
@@ -13,7 +13,7 @@
#include <string.h>
#include "core/nng_impl.h"
-#include "protocol/reqrep0/req.h"
+#include "nng/protocol/reqrep0/req.h"
// Request protocol. The REQ protocol is the "request" side of a
// request-reply pair. This is useful for building RPC clients, for example.
diff --git a/src/protocol/survey0/CMakeLists.txt b/src/protocol/survey0/CMakeLists.txt
index b6104a54..260c3e58 100644
--- a/src/protocol/survey0/CMakeLists.txt
+++ b/src/protocol/survey0/CMakeLists.txt
@@ -16,25 +16,23 @@ option (NNG_PROTO_SURVEYOR0 "Enable SURVEYORv0 protocol." ON)
mark_as_advanced(NNG_PROTO_SURVEYOR0)
set(_DEFS)
-set(_HDRS)
set(_SRCS)
if (NNG_PROTO_SURVEYOR0)
list(APPEND _DEFS -DNNG_HAVE_SURVEYOR0)
list(APPEND _SRCS
protocol/survey0/survey.c protocol/survey0/xsurvey.c
- protocol/survey0/survey.h)
- list(APPEND _HDRS protocol/survey0/survey.h)
+ ${PROJECT_SOURCE_DIR}/include/nng/protocol/survey0/survey.h)
+
endif()
if (NNG_PROTO_RESPONDENT0)
list(APPEND _DEFS -DNNG_HAVE_RESPONDENT0)
list(APPEND _SRCS
protocol/survey0/respond.c protocol/survey0/xrespond.c
- protocol/survey0/respond.h)
- list(APPEND _HDRS protocol/survey0/respond.h)
+ ${PROJECT_SOURCE_DIR}/include/nng/protocol/survey0/respond.h)
+
endif()
set(NNG_DEFS ${NNG_DEFS} ${_DEFS} PARENT_SCOPE)
set(NNG_SRCS ${NNG_SRCS} ${_SRCS} PARENT_SCOPE)
-set(NNG_HDRS ${NNG_HDRS} ${_HDRS} PARENT_SCOPE)
diff --git a/src/protocol/survey0/respond.c b/src/protocol/survey0/respond.c
index 80e3f2f8..593b9bae 100644
--- a/src/protocol/survey0/respond.c
+++ b/src/protocol/survey0/respond.c
@@ -12,7 +12,7 @@
#include <string.h>
#include "core/nng_impl.h"
-#include "protocol/survey0/respond.h"
+#include "nng/protocol/survey0/respond.h"
// Respondent protocol. The RESPONDENT protocol is the "replier" side of
// the surveyor pattern. This is useful for building service discovery, or
diff --git a/src/protocol/survey0/respond.h b/src/protocol/survey0/respond.h
deleted file mode 100644
index b865b2ac..00000000
--- a/src/protocol/survey0/respond.h
+++ /dev/null
@@ -1,33 +0,0 @@
-//
-// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech>
-// Copyright 2018 Capitar IT Group BV <info@capitar.com>
-//
-// 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.
-//
-
-#ifndef NNG_PROTOCOL_SURVEY0_RESPOND_H
-#define NNG_PROTOCOL_SURVEY0_RESPOND_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-NNG_DECL int nng_respondent0_open(nng_socket *);
-NNG_DECL int nng_respondent0_open_raw(nng_socket *);
-
-#ifndef nng_respondent_open
-#define nng_respondent_open nng_respondent0_open
-#endif
-
-#ifndef nng_respondent_open_raw
-#define nng_respondent_open_raw nng_respondent0_open_raw
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // NNG_PROTOCOL_SURVEY0_RESPOND_H
diff --git a/src/protocol/survey0/survey.c b/src/protocol/survey0/survey.c
index 58fa4aa6..a2eb7379 100644
--- a/src/protocol/survey0/survey.c
+++ b/src/protocol/survey0/survey.c
@@ -12,7 +12,7 @@
#include <string.h>
#include "core/nng_impl.h"
-#include "protocol/survey0/survey.h"
+#include "nng/protocol/survey0/survey.h"
// Surveyor protocol. The SURVEYOR protocol is the "survey" side of the
// survey pattern. This is useful for building service discovery, voting, etc.
diff --git a/src/protocol/survey0/survey.h b/src/protocol/survey0/survey.h
deleted file mode 100644
index 37f76fbf..00000000
--- a/src/protocol/survey0/survey.h
+++ /dev/null
@@ -1,35 +0,0 @@
-//
-// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech>
-// Copyright 2018 Capitar IT Group BV <info@capitar.com>
-//
-// 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.
-//
-
-#ifndef NNG_PROTOCOL_SURVEY0_SURVEY_H
-#define NNG_PROTOCOL_SURVEY0_SURVEY_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-NNG_DECL int nng_surveyor0_open(nng_socket *);
-NNG_DECL int nng_surveyor0_open_raw(nng_socket *);
-
-#ifndef nng_surveyor_open
-#define nng_surveyor_open nng_surveyor0_open
-#endif
-
-#ifndef nng_surveyor_open_raw
-#define nng_surveyor_open_raw nng_surveyor0_open_raw
-#endif
-
-#define NNG_OPT_SURVEYOR_SURVEYTIME "surveyor:survey-time"
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // NNG_PROTOCOL_SURVEY0_SURVEY_H
diff --git a/src/protocol/survey0/xrespond.c b/src/protocol/survey0/xrespond.c
index 334c5ca6..9c9a1a16 100644
--- a/src/protocol/survey0/xrespond.c
+++ b/src/protocol/survey0/xrespond.c
@@ -12,7 +12,7 @@
#include <string.h>
#include "core/nng_impl.h"
-#include "protocol/survey0/respond.h"
+#include "nng/protocol/survey0/respond.h"
// Respondent protocol. The RESPONDENT protocol is the "replier" side of
// the surveyor pattern. This is useful for building service discovery, or
diff --git a/src/protocol/survey0/xsurvey.c b/src/protocol/survey0/xsurvey.c
index fabcc766..83a7c589 100644
--- a/src/protocol/survey0/xsurvey.c
+++ b/src/protocol/survey0/xsurvey.c
@@ -12,7 +12,7 @@
#include <string.h>
#include "core/nng_impl.h"
-#include "protocol/survey0/survey.h"
+#include "nng/protocol/survey0/survey.h"
// Surveyor protocol. The SURVEYOR protocol is the "survey" side of the
// survey pattern. This is useful for building service discovery, voting, etc.