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

Side by Side Diff: remoting/protocol/session_plugin.h

Issue 2586403003: [Chromoting] Add SessionPlugin in JingleSession (Closed)
Patch Set: Resolve review comments Created 3 years, 11 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 unified diff | Download patch
« no previous file with comments | « remoting/protocol/session.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
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_PROTOCOL_SESSION_PLUGIN_H_
6 #define REMOTING_PROTOCOL_SESSION_PLUGIN_H_
7
8 #include <memory>
9
10 #include "base/callback.h"
11 #include "remoting/protocol/jingle_messages.h"
12 #include "remoting/protocol/session.h"
13 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h"
14
15 namespace remoting {
16 namespace protocol {
17
18 // Interface for Session plugins. Plugins allow to send and receive optional
19 // information that is not essential for session handshake. Messages generated
20 // by the plugins on one end of a connection are attached to the session
21 // handshake messages and passed to the plugins on the other end. Plugins are
22 // optional, i.e. Session doesn't need any plugins to connect successfully.
23 class SessionPlugin {
24 public:
25 SessionPlugin() = default;
26 virtual ~SessionPlugin() = default;
27
28 // Returns an XmlElement if the SessionPlugin requires to attach some data
29 // into the outgoing message.
30 virtual std::unique_ptr<buzz::XmlElement> GetNextMessage() = 0;
31
32 // Handles messages in |attachments|.
33 virtual void OnIncomingMessage(const buzz::XmlElement& attachments) = 0;
34 };
35
36 } // namespace protocol
37 } // namespace remoting
38
39 #endif // REMOTING_PROTOCOL_SESSION_PLUGIN_H_
OLDNEW
« no previous file with comments | « remoting/protocol/session.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698