From c6b859dabc76396657a1f25d46dce6426a62cb13 Mon Sep 17 00:00:00 2001
From: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
Date: Mon, 20 Nov 2017 14:09:31 -0500
Subject: [PATCH] ringdht: make public some methods/attributes
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

To prepare the file transfer this patch add public access
on the DhtRunner attribute and forEachDevice() API.

Change-Id: I111fa7cd3af56b765781fec4ca3ced20f18269d1
Reviewed-by: Anthony Léonard <anthony.leonard@savoirfairelinux.com>
---
 src/ringdht/ringaccount.h | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/ringdht/ringaccount.h b/src/ringdht/ringaccount.h
index f850d978ba..d5eb8a0a91 100644
--- a/src/ringdht/ringaccount.h
+++ b/src/ringdht/ringaccount.h
@@ -307,6 +307,12 @@ class RingAccount : public SIPAccountBase {
         void registerName(const std::string& password, const std::string& name);
 #endif
 
+        dht::DhtRunner& dht() { return dht_; }
+
+        void forEachDevice(const dht::InfoHash& to,
+                           std::function<void(const std::shared_ptr<RingAccount>&,
+                                              const dht::InfoHash&)> op,
+                           std::function<void(bool)> end = {});
     private:
         NON_COPYABLE(RingAccount);
 
@@ -360,8 +366,6 @@ class RingAccount : public SIPAccountBase {
 
         void handleEvents();
 
-        void forEachDevice(const dht::InfoHash& to, std::function<void(const std::shared_ptr<RingAccount>&, const dht::InfoHash&)> op, std::function<void(bool)> end = {});
-
         void startOutgoingCall(const std::shared_ptr<SIPCall>& call, const std::string toUri);
 
         void onConnectedOutgoingCall(SIPCall& call, const std::string& to_id, IpAddr target);
-- 
GitLab