global: Rename unsigned char to uint8, DynamicUCharArray to DynamicUInt8Array and DynamicUCharVector to DynamicUInt8Vector.
diff --git a/ndn-cpp/transport/tcp-transport.cpp b/ndn-cpp/transport/tcp-transport.cpp
index e454e4a..553c5c7 100644
--- a/ndn-cpp/transport/tcp-transport.cpp
+++ b/ndn-cpp/transport/tcp-transport.cpp
@@ -30,17 +30,17 @@
const unsigned int initialLength = 1000;
// Automatically cast elementReader_ to (struct ndn_ElementListener *)
ndn_BinaryXmlElementReader_initialize
- (&elementReader_, &elementListener, (unsigned char *)malloc(initialLength), initialLength, ndn_realloc);
+ (&elementReader_, &elementListener, (uint8_t *)malloc(initialLength), initialLength, ndn_realloc);
isConnected_ = true;
elementListener_ = &elementListener;
}
void
-TcpTransport::send(const unsigned char *data, unsigned int dataLength)
+TcpTransport::send(const uint8_t *data, unsigned int dataLength)
{
ndn_Error error;
- if ((error = ndn_TcpTransport_send(&transport_, (unsigned char *)data, dataLength)))
+ if ((error = ndn_TcpTransport_send(&transport_, (uint8_t *)data, dataLength)))
throw std::runtime_error(ndn_getErrorString(error));
}
@@ -54,7 +54,7 @@
if (!receiveIsReady)
return;
- unsigned char buffer[8000];
+ uint8_t buffer[8000];
unsigned int nBytes;
if ((error = ndn_TcpTransport_receive(&transport_, buffer, sizeof(buffer), &nBytes)))
throw std::runtime_error(ndn_getErrorString(error));
diff --git a/ndn-cpp/transport/tcp-transport.hpp b/ndn-cpp/transport/tcp-transport.hpp
index 1f8a573..d999df8 100644
--- a/ndn-cpp/transport/tcp-transport.hpp
+++ b/ndn-cpp/transport/tcp-transport.hpp
@@ -72,7 +72,7 @@
* @param data A pointer to the buffer of data to send.
* @param dataLength The number of bytes in data.
*/
- virtual void send(const unsigned char *data, unsigned int dataLength);
+ virtual void send(const uint8_t *data, unsigned int dataLength);
/**
* Process any data to receive. For each element received, call elementListener.onReceivedElement.
diff --git a/ndn-cpp/transport/transport.cpp b/ndn-cpp/transport/transport.cpp
index ae532db..4b8aca1 100644
--- a/ndn-cpp/transport/transport.cpp
+++ b/ndn-cpp/transport/transport.cpp
@@ -22,7 +22,7 @@
}
void
-Transport::send(const unsigned char *data, unsigned int dataLength)
+Transport::send(const uint8_t *data, unsigned int dataLength)
{
throw logic_error("unimplemented");
}
diff --git a/ndn-cpp/transport/transport.hpp b/ndn-cpp/transport/transport.hpp
index 2f71096..ed3e240 100644
--- a/ndn-cpp/transport/transport.hpp
+++ b/ndn-cpp/transport/transport.hpp
@@ -37,10 +37,10 @@
* @param dataLength The number of bytes in data.
*/
virtual void
- send(const unsigned char *data, unsigned int dataLength);
+ send(const uint8_t *data, unsigned int dataLength);
void
- send(const std::vector<unsigned char>& data)
+ send(const std::vector<uint8_t>& data)
{
send(&data[0], data.size());
}
diff --git a/ndn-cpp/transport/udp-transport.cpp b/ndn-cpp/transport/udp-transport.cpp
index d5e48cb..0b2f397 100644
--- a/ndn-cpp/transport/udp-transport.cpp
+++ b/ndn-cpp/transport/udp-transport.cpp
@@ -30,17 +30,17 @@
const unsigned int initialLength = 1000;
// Automatically cast elementReader_ to (struct ndn_ElementListener *)
ndn_BinaryXmlElementReader_initialize
- (&elementReader_, &elementListener, (unsigned char *)malloc(initialLength), initialLength, ndn_realloc);
+ (&elementReader_, &elementListener, (uint8_t *)malloc(initialLength), initialLength, ndn_realloc);
isConnected_ = true;
elementListener_ = &elementListener;
}
void
-UdpTransport::send(const unsigned char *data, unsigned int dataLength)
+UdpTransport::send(const uint8_t *data, unsigned int dataLength)
{
ndn_Error error;
- if ((error = ndn_UdpTransport_send(&transport_, (unsigned char *)data, dataLength)))
+ if ((error = ndn_UdpTransport_send(&transport_, (uint8_t *)data, dataLength)))
throw std::runtime_error(ndn_getErrorString(error));
}
@@ -54,7 +54,7 @@
if (!receiveIsReady)
return;
- unsigned char buffer[8000];
+ uint8_t buffer[8000];
unsigned int nBytes;
if ((error = ndn_UdpTransport_receive(&transport_, buffer, sizeof(buffer), &nBytes)))
throw std::runtime_error(ndn_getErrorString(error));
diff --git a/ndn-cpp/transport/udp-transport.hpp b/ndn-cpp/transport/udp-transport.hpp
index 3ea1703..b2374df 100644
--- a/ndn-cpp/transport/udp-transport.hpp
+++ b/ndn-cpp/transport/udp-transport.hpp
@@ -74,7 +74,7 @@
* @param dataLength The number of bytes in data.
*/
virtual void
- send(const unsigned char *data, unsigned int dataLength);
+ send(const uint8_t *data, unsigned int dataLength);
/**
* Process any data to receive. For each element received, call elementListener.onReceivedElement.