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 virtual AudioStub* audio_stub(); | |
89 | |
86 // Send control data to the viewer/client. | 90 // Send control data to the viewer/client. |
87 virtual ClientStub* client_stub(); | 91 virtual ClientStub* client_stub(); |
88 | 92 |
89 // Stubs for receiving data from the client. | 93 // Stubs for receiving data from the client. |
90 // These three setters should be called before Init(). | 94 // These three setters should be called before Init(). |
91 virtual void set_clipboard_stub(ClipboardStub* clipboard_stub); | 95 virtual void set_clipboard_stub(ClipboardStub* clipboard_stub); |
92 virtual void set_host_stub(HostStub* host_stub); | 96 virtual void set_host_stub(HostStub* host_stub); |
93 virtual void set_input_stub(InputStub* input_stub); | 97 virtual void set_input_stub(InputStub* input_stub); |
94 | 98 |
95 private: | 99 private: |
(...skipping 20 matching lines...) Expand all Loading... | |
116 ClipboardStub* clipboard_stub_; | 120 ClipboardStub* clipboard_stub_; |
117 HostStub* host_stub_; | 121 HostStub* host_stub_; |
118 InputStub* input_stub_; | 122 InputStub* input_stub_; |
119 | 123 |
120 // The libjingle channel used to send and receive data from the remote client. | 124 // The libjingle channel used to send and receive data from the remote client. |
121 scoped_ptr<Session> session_; | 125 scoped_ptr<Session> session_; |
122 | 126 |
123 scoped_ptr<HostControlDispatcher> control_dispatcher_; | 127 scoped_ptr<HostControlDispatcher> control_dispatcher_; |
124 scoped_ptr<HostEventDispatcher> event_dispatcher_; | 128 scoped_ptr<HostEventDispatcher> event_dispatcher_; |
125 scoped_ptr<VideoWriter> video_writer_; | 129 scoped_ptr<VideoWriter> video_writer_; |
130 // whether there is audio | |
Sergey Ulanov
2012/06/21 17:24:56
Comments should start with a capital letter and en
kxing
2012/06/21 18:09:22
Done.
| |
131 bool use_audio_; | |
132 scoped_ptr<AudioWriter> audio_writer_; | |
126 | 133 |
127 DISALLOW_COPY_AND_ASSIGN(ConnectionToClient); | 134 DISALLOW_COPY_AND_ASSIGN(ConnectionToClient); |
128 }; | 135 }; |
129 | 136 |
130 } // namespace protocol | 137 } // namespace protocol |
131 } // namespace remoting | 138 } // namespace remoting |
132 | 139 |
133 #endif // REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ | 140 #endif // REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ |
OLD | NEW |