OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ | 5 #ifndef REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ |
6 #define REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ | 6 #define REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/synchronization/lock.h" | 13 #include "base/synchronization/lock.h" |
14 #include "base/threading/non_thread_safe.h" | 14 #include "base/threading/non_thread_safe.h" |
| 15 #include "remoting/protocol/audio_writer.h" |
15 #include "remoting/protocol/session.h" | 16 #include "remoting/protocol/session.h" |
16 #include "remoting/protocol/video_writer.h" | 17 #include "remoting/protocol/video_writer.h" |
17 | 18 |
18 namespace net { | 19 namespace net { |
19 class IPEndPoint; | 20 class IPEndPoint; |
20 } // namespace net | 21 } // namespace net |
21 | 22 |
22 namespace remoting { | 23 namespace remoting { |
23 namespace protocol { | 24 namespace protocol { |
24 | 25 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 // Disconnect the client connection. | 77 // Disconnect the client connection. |
77 virtual void Disconnect(); | 78 virtual void Disconnect(); |
78 | 79 |
79 // Update the sequence number when received from the client. EventHandler | 80 // Update the sequence number when received from the client. EventHandler |
80 // will be called. | 81 // will be called. |
81 virtual void UpdateSequenceNumber(int64 sequence_number); | 82 virtual void UpdateSequenceNumber(int64 sequence_number); |
82 | 83 |
83 // Send encoded update stream data to the viewer. | 84 // Send encoded update stream data to the viewer. |
84 virtual VideoStub* video_stub(); | 85 virtual VideoStub* video_stub(); |
85 | 86 |
| 87 // Send audio stream data to the viewer. |
| 88 // Returns NULL if audio is not enabled. |
| 89 virtual AudioStub* audio_stub(); |
| 90 |
86 // Send control data to the viewer/client. | 91 // Send control data to the viewer/client. |
87 virtual ClientStub* client_stub(); | 92 virtual ClientStub* client_stub(); |
88 | 93 |
89 // Stubs for receiving data from the client. | 94 // Stubs for receiving data from the client. |
90 // These three setters should be called before Init(). | 95 // These three setters should be called before Init(). |
91 virtual void set_clipboard_stub(ClipboardStub* clipboard_stub); | 96 virtual void set_clipboard_stub(ClipboardStub* clipboard_stub); |
92 virtual void set_host_stub(HostStub* host_stub); | 97 virtual void set_host_stub(HostStub* host_stub); |
93 virtual void set_input_stub(InputStub* input_stub); | 98 virtual void set_input_stub(InputStub* input_stub); |
94 | 99 |
95 private: | 100 private: |
(...skipping 20 matching lines...) Expand all Loading... |
116 ClipboardStub* clipboard_stub_; | 121 ClipboardStub* clipboard_stub_; |
117 HostStub* host_stub_; | 122 HostStub* host_stub_; |
118 InputStub* input_stub_; | 123 InputStub* input_stub_; |
119 | 124 |
120 // The libjingle channel used to send and receive data from the remote client. | 125 // The libjingle channel used to send and receive data from the remote client. |
121 scoped_ptr<Session> session_; | 126 scoped_ptr<Session> session_; |
122 | 127 |
123 scoped_ptr<HostControlDispatcher> control_dispatcher_; | 128 scoped_ptr<HostControlDispatcher> control_dispatcher_; |
124 scoped_ptr<HostEventDispatcher> event_dispatcher_; | 129 scoped_ptr<HostEventDispatcher> event_dispatcher_; |
125 scoped_ptr<VideoWriter> video_writer_; | 130 scoped_ptr<VideoWriter> video_writer_; |
| 131 scoped_ptr<AudioWriter> audio_writer_; |
126 | 132 |
127 DISALLOW_COPY_AND_ASSIGN(ConnectionToClient); | 133 DISALLOW_COPY_AND_ASSIGN(ConnectionToClient); |
128 }; | 134 }; |
129 | 135 |
130 } // namespace protocol | 136 } // namespace protocol |
131 } // namespace remoting | 137 } // namespace remoting |
132 | 138 |
133 #endif // REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ | 139 #endif // REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ |
OLD | NEW |