Added toUri and deprecated to_uri
diff --git a/ndn-cpp/name.cpp b/ndn-cpp/name.cpp
index 4996c92..226626f 100644
--- a/ndn-cpp/name.cpp
+++ b/ndn-cpp/name.cpp
@@ -243,7 +243,7 @@
addComponent(nameStruct.components[i].value, nameStruct.components[i].valueLength);
}
-std::string Name::to_uri() const
+std::string Name::toUri() const
{
if (components_.size() == 0)
return "/";
diff --git a/ndn-cpp/name.hpp b/ndn-cpp/name.hpp
index b4a8dbe..f287f47 100644
--- a/ndn-cpp/name.hpp
+++ b/ndn-cpp/name.hpp
@@ -132,8 +132,16 @@
* Encode this name as a URI.
* @return The encoded URI.
*/
- std::string to_uri() const;
+ std::string toUri() const;
+ /**
+ * @deprecated Use toUri().
+ */
+ std::string to_uri() const
+ {
+ return toUri();
+ }
+
private:
std::vector<Component> components_;
};