Roll src/third_party/WebKit d9c6159:8139f33 (svn 201974:201975)
[chromium-blink-merge.git] / remoting / protocol / audio_writer.h
blob49dfb7fbb7895769a02ac434f2b33768311d77c7
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
3 // found in the LICENSE file.
5 #ifndef REMOTING_PROTOCOL_AUDIO_WRITER_H_
6 #define REMOTING_PROTOCOL_AUDIO_WRITER_H_
8 #include <string>
10 #include "base/basictypes.h"
11 #include "base/callback.h"
12 #include "base/compiler_specific.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "remoting/protocol/audio_stub.h"
15 #include "remoting/protocol/channel_dispatcher_base.h"
17 namespace net {
18 class StreamSocket;
19 } // namespace net
21 namespace remoting {
22 namespace protocol {
24 class Session;
25 class SessionConfig;
27 class AudioWriter : public ChannelDispatcherBase,
28 public AudioStub {
29 public:
30 // Once AudioWriter is created, the Init() method of ChannelDispatcherBase
31 // should be used to initialize it for the session.
32 static scoped_ptr<AudioWriter> Create(const SessionConfig& config);
34 ~AudioWriter() override;
36 // AudioStub interface.
37 void ProcessAudioPacket(scoped_ptr<AudioPacket> packet,
38 const base::Closure& done) override;
40 private:
41 AudioWriter();
43 DISALLOW_COPY_AND_ASSIGN(AudioWriter);
46 } // namespace protocol
47 } // namespace remoting
49 #endif // REMOTING_PROTOCOL_AUDIO_WRITER_H_