Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(503)

Unified Diff: remoting/jingle_glue/jingle_info_request.h

Issue 7598004: Resolve addresses of STUN/Relay servers in JingleInfoRequest. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/jingle_glue/host_resolver.cc ('k') | remoting/jingle_glue/jingle_info_request.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/jingle_glue/jingle_info_request.h
diff --git a/remoting/jingle_glue/jingle_info_request.h b/remoting/jingle_glue/jingle_info_request.h
index 9a63f82a4125a5b7e7f1ed6806882841f73607d2..df7552ff0a1ac1f7edee5a83a8b445194065facc 100644
--- a/remoting/jingle_glue/jingle_info_request.h
+++ b/remoting/jingle_glue/jingle_info_request.h
@@ -5,12 +5,14 @@
#ifndef REMOTING_JINGLE_GLUE_JINGLE_INFO_REQUEST_H_
#define REMOTING_JINGLE_GLUE_JINGLE_INFO_REQUEST_H_
+#include <set>
#include <string>
#include <vector>
#include "base/basictypes.h"
#include "base/callback.h"
#include "base/memory/scoped_ptr.h"
+#include "third_party/libjingle/source/talk/base/sigslot.h"
class Task;
@@ -25,6 +27,8 @@ class SocketAddress;
namespace remoting {
class IqRequest;
+class HostResolver;
+class HostResolverFactory;
// JingleInfoRequest handles requesting STUN/Relay infromation from
// the Google Talk network. The query is made when Send() is
@@ -35,7 +39,7 @@ class IqRequest;
// created on.
//
// TODO(ajwong): Add support for a timeout.
-class JingleInfoRequest {
+class JingleInfoRequest : public sigslot::has_slots<> {
public:
// Callback to receive the Jingle configuration settings. The argumetns are
// passed by pointer so the receive may call swap on them. The receiver does
@@ -45,17 +49,29 @@ class JingleInfoRequest {
const std::string&, const std::vector<std::string>&,
const std::vector<talk_base::SocketAddress>&)> OnJingleInfoCallback;
- explicit JingleInfoRequest(IqRequest* request);
- ~JingleInfoRequest();
+ explicit JingleInfoRequest(IqRequest* request,
+ HostResolverFactory* host_resolver_factory);
+ virtual ~JingleInfoRequest();
void Send(const OnJingleInfoCallback& callback);
private:
+ struct PendingDnsRequest;
+
void OnResponse(const buzz::XmlElement* stanza);
+ void OnStunAddressResponse(HostResolver* resolver,
+ const talk_base::SocketAddress& address);
+ HostResolverFactory* host_resolver_factory_;
scoped_ptr<IqRequest> request_;
OnJingleInfoCallback on_jingle_info_cb_;
+ std::vector<std::string> relay_hosts_;
+ std::vector<talk_base::SocketAddress> stun_hosts_;
+ std::string relay_token_;
+
+ std::set<HostResolver*> stun_dns_requests_;
+
DISALLOW_COPY_AND_ASSIGN(JingleInfoRequest);
};
« no previous file with comments | « remoting/jingle_glue/host_resolver.cc ('k') | remoting/jingle_glue/jingle_info_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698