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

Unified Diff: remoting/protocol/jingle_messages.h

Issue 2805173005: Move SignalingAddress to remoting/signaling (Closed)
Patch Set: fix compilation on windows Created 3 years, 8 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 | « no previous file | remoting/protocol/jingle_messages.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/jingle_messages.h
diff --git a/remoting/protocol/jingle_messages.h b/remoting/protocol/jingle_messages.h
index 589a31e306c38c66c8ebfde7b28ecfc9df44a109..28ff8d30e6a93ba260d41de13111a20f8bd9819c 100644
--- a/remoting/protocol/jingle_messages.h
+++ b/remoting/protocol/jingle_messages.h
@@ -10,6 +10,7 @@
#include <string>
#include "remoting/protocol/errors.h"
+#include "remoting/signaling/signaling_address.h"
#include "third_party/libjingle_xmpp/xmllite/xmlelement.h"
#include "third_party/webrtc/p2p/base/candidate.h"
@@ -18,42 +19,6 @@ namespace protocol {
class ContentDescription;
-// Represents an address of a Chromoting endpoint and its routing channel.
-// TODO(kelvinp): Move the struct to remoting/signaling. Potentially we could
-// update SignalStrategy interface to use this instead of jid for addressing.
-class SignalingAddress {
- public:
- enum class Channel { LCS, XMPP };
-
- SignalingAddress();
- SignalingAddress(const std::string& jid);
- SignalingAddress(const std::string& jid,
- const std::string& endpoint_id,
- Channel channel);
-
- const std::string& jid() const { return jid_; }
- const std::string& endpoint_id() const { return endpoint_id_; }
- Channel channel() const { return channel_; }
- const std::string& id() const {
- return (channel_ == Channel::LCS) ? endpoint_id_ : jid_;
- }
-
- bool empty() const { return jid_.empty(); }
-
- bool operator==(const SignalingAddress& other) const;
- bool operator!=(const SignalingAddress& other) const;
-
- private:
- // Represents the |to| or |from| field in an IQ stanza.
- std::string jid_;
-
- // Represents the identifier of an endpoint. In LCS, this is the LCS address
- // encoded in a JID like format. In XMPP, it is empty.
- std::string endpoint_id_;
-
- Channel channel_;
-};
-
struct JingleMessage {
enum ActionType {
UNKNOWN_ACTION,
« no previous file with comments | « no previous file | remoting/protocol/jingle_messages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698