Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | |
|
Sergey Ulanov
2015/05/07 18:22:39
remove (c)
John Williams
2015/05/15 00:51:12
Done.
| |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef REMOTING_HOST_GCD_NOTIFICATION_SUBSCRIBER_H_ | |
| 6 #define REMOTING_HOST_GCD_NOTIFICATION_SUBSCRIBER_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/basictypes.h" | |
| 11 #include "base/memory/scoped_ptr.h" | |
| 12 #include "remoting/signaling/signal_strategy.h" | |
| 13 | |
| 14 namespace remoting { | |
| 15 | |
| 16 class IqSender; | |
| 17 class IqRequest; | |
| 18 | |
| 19 // An object that subscribes to notifications from GCD using an XMPP | |
| 20 // channel. No actual notifications are used as of this writing, but | |
|
Sergey Ulanov
2015/05/07 18:22:39
s/as of this writing/currently/ or just remove thi
John Williams
2015/05/15 00:51:12
Done.
| |
| 21 // the subscription is necessary in order for GCD to consider a device | |
| 22 // online. | |
| 23 class GcdNotificationSubscriber : public SignalStrategy::Listener { | |
|
Sergey Ulanov
2015/05/07 18:22:38
Is the intent to make have a separate class receiv
John Williams
2015/05/15 00:51:12
The reason I called it "subscriber" is that it lit
Sergey Ulanov
2015/05/15 18:22:36
I still think it's worth making this class more ge
John Williams
2015/05/15 21:59:42
Done.
| |
| 24 public: | |
| 25 GcdNotificationSubscriber(SignalStrategy* signal_strategy); | |
| 26 ~GcdNotificationSubscriber() override; | |
| 27 | |
| 28 // SignalStrategy::Listener interface. | |
| 29 void OnSignalStrategyStateChange(SignalStrategy::State state) override; | |
| 30 bool OnSignalStrategyIncomingStanza(const buzz::XmlElement* stanza) override; | |
| 31 | |
| 32 private: | |
| 33 void OnSubscriptionResult(IqRequest* request, | |
| 34 const buzz::XmlElement* response); | |
| 35 | |
| 36 SignalStrategy* signal_strategy_; | |
| 37 scoped_ptr<IqSender> iq_sender_; | |
| 38 scoped_ptr<IqRequest> iq_request_; | |
| 39 | |
| 40 DISALLOW_COPY_AND_ASSIGN(GcdNotificationSubscriber); | |
| 41 }; | |
| 42 | |
| 43 } // namespace remoting | |
| 44 | |
| 45 #endif // REMOTING_HOST_GCD_NOTIFICATION_SUBSCRIBER_H_ | |
| OLD | NEW |