From 3e5a3c3f2dee7303f45acb68c75e8438716aa24a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud@savoirfairelinux.com>
Date: Wed, 17 Jun 2015 22:34:31 -0400
Subject: [PATCH] dht: getId renamed to getNodeId

---
 include/opendht/dht.h       | 4 ++--
 include/opendht/dhtrunner.h | 9 +++++++--
 include/opendht/securedht.h | 4 ----
 tools/dhtchat.cpp           | 2 +-
 tools/dhtnode.cpp           | 2 +-
 5 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/include/opendht/dht.h b/include/opendht/dht.h
index ee2554c5..31bc5520 100644
--- a/include/opendht/dht.h
+++ b/include/opendht/dht.h
@@ -78,9 +78,9 @@ public:
     virtual ~Dht();
 
     /**
-     * Get the ID of the node, which was provided in the constructor.
+     * Get the ID of the node.
      */
-    inline const InfoHash& getId() const { return myid; }
+    inline const InfoHash& getNodeId() const { return myid; }
 
     /**
      * Get the current status of the node for the given family.
diff --git a/include/opendht/dhtrunner.h b/include/opendht/dhtrunner.h
index cc3a5583..8998e62c 100644
--- a/include/opendht/dhtrunner.h
+++ b/include/opendht/dhtrunner.h
@@ -150,10 +150,15 @@ public:
         return dht_->getId();
     }
 
-    InfoHash getRoutingId() const {
+    InfoHash getNodeId() const {
         if (!dht_)
             return {};
-        return dht_->getRoutingId();
+        return dht_->getNodeId();
+    }
+
+    //[[deprecated]]
+    InfoHash getRoutingId() const {
+        return getNodeId();
     }
 
     std::vector<Dht::NodeExport> exportNodes() const {
diff --git a/include/opendht/securedht.h b/include/opendht/securedht.h
index e128347a..d1e29a37 100644
--- a/include/opendht/securedht.h
+++ b/include/opendht/securedht.h
@@ -61,10 +61,6 @@ public:
         return key_->getPublicKey().getId();
     }
 
-    InfoHash getRoutingId() const {
-        return Dht::getId();
-    }
-
     ValueType secureType(ValueType&& type);
 
     ValueType secureType(const ValueType& type) {
diff --git a/tools/dhtchat.cpp b/tools/dhtchat.cpp
index a016be96..763e58af 100644
--- a/tools/dhtchat.cpp
+++ b/tools/dhtchat.cpp
@@ -82,7 +82,7 @@ main(int argc, char **argv)
         i += 2;
     }
 
-    std::cout << "OpenDht node " << dht.getRoutingId() << " running on port " <<  port<<  std::endl;
+    std::cout << "OpenDht node " << dht.getNodeId() << " running on port " <<  port<<  std::endl;
     std::cout << "Public key ID " << dht.getId() << std::endl;
     std::cout << "  type 'c {hash}' to join a channel" << std::endl << std::endl;
 
diff --git a/tools/dhtnode.cpp b/tools/dhtnode.cpp
index fea36c3d..8007878e 100644
--- a/tools/dhtnode.cpp
+++ b/tools/dhtnode.cpp
@@ -113,7 +113,7 @@ main(int argc, char **argv)
         i += 2;
     }
 
-    std::cout << "OpenDht node " << dht.getRoutingId() << " running on port " <<  port<<  std::endl;
+    std::cout << "OpenDht node " << dht.getNodeId() << " running on port " <<  port<<  std::endl;
     std::cout << "Public key ID " << dht.getId() << std::endl;
     std::cout << " (type 'h' or 'help' for a list of possible commands)" << std::endl << std::endl;
 
-- 
GitLab