| Index: remoting/jingle_glue/iq_sender.h
|
| ===================================================================
|
| --- remoting/jingle_glue/iq_sender.h (revision 123637)
|
| +++ remoting/jingle_glue/iq_sender.h (working copy)
|
| @@ -12,7 +12,6 @@
|
| #include "base/compiler_specific.h"
|
| #include "base/gtest_prod_util.h"
|
| #include "base/memory/scoped_ptr.h"
|
| -#include "base/memory/weak_ptr.h"
|
| #include "remoting/jingle_glue/signal_strategy.h"
|
|
|
| namespace buzz {
|
| @@ -28,10 +27,7 @@
|
| // those requests.
|
| class IqSender : public SignalStrategy::Listener {
|
| public:
|
| - // Callback that is called when an Iq response is received. Called
|
| - // with the |response| set to NULL in case of a timeout.
|
| - typedef base::Callback<void(IqRequest* request,
|
| - const buzz::XmlElement* response)> ReplyCallback;
|
| + typedef base::Callback<void(const buzz::XmlElement*)> ReplyCallback;
|
|
|
| explicit IqSender(SignalStrategy* signal_strategy);
|
| virtual ~IqSender();
|
| @@ -76,28 +72,19 @@
|
| };
|
|
|
| // This call must only be used on the thread it was created on.
|
| -class IqRequest : public base::SupportsWeakPtr<IqRequest> {
|
| +class IqRequest {
|
| public:
|
| - IqRequest(IqSender* sender, const IqSender::ReplyCallback& callback,
|
| - const std::string& addressee);
|
| + IqRequest(IqSender* sender, const IqSender::ReplyCallback& callback);
|
| ~IqRequest();
|
|
|
| - // Sets timeout for the request. When the timeout expires the
|
| - // callback is called with the |response| set to NULL.
|
| - void SetTimeout(base::TimeDelta timeout);
|
| -
|
| private:
|
| friend class IqSender;
|
|
|
| - void CallCallback(const buzz::XmlElement* stanza);
|
| - void OnTimeout();
|
| -
|
| // Called by IqSender when a response is received.
|
| void OnResponse(const buzz::XmlElement* stanza);
|
|
|
| IqSender* sender_;
|
| IqSender::ReplyCallback callback_;
|
| - std::string addressee_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(IqRequest);
|
| };
|
|
|