| 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_AUDIO_WRITER_H_ | 5 #ifndef REMOTING_PROTOCOL_AUDIO_WRITER_H_ |
| 6 #define REMOTING_PROTOCOL_AUDIO_WRITER_H_ | 6 #define REMOTING_PROTOCOL_AUDIO_WRITER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 class SessionConfig; | 25 class SessionConfig; |
| 26 | 26 |
| 27 class AudioWriter : public AudioStub { | 27 class AudioWriter : public AudioStub { |
| 28 public: | 28 public: |
| 29 virtual ~AudioWriter(); | 29 virtual ~AudioWriter(); |
| 30 | 30 |
| 31 // The callback is called when initialization is finished. The | 31 // The callback is called when initialization is finished. The |
| 32 // parameter is set to true on success. | 32 // parameter is set to true on success. |
| 33 typedef base::Callback<void(bool)> InitializedCallback; | 33 typedef base::Callback<void(bool)> InitializedCallback; |
| 34 | 34 |
| 35 static AudioWriter* Create(const SessionConfig& config); | 35 static scoped_ptr<AudioWriter> Create(const SessionConfig& config); |
| 36 | 36 |
| 37 // Initializes the writer. | 37 // Initializes the writer. |
| 38 void Init(Session* session, const InitializedCallback& callback); | 38 void Init(Session* session, const InitializedCallback& callback); |
| 39 | 39 |
| 40 // Stops writing. Must be called on the network thread before this | 40 // Stops writing. Must be called on the network thread before this |
| 41 // object is destroyed. | 41 // object is destroyed. |
| 42 void Close(); | 42 void Close(); |
| 43 | 43 |
| 44 // Returns true if the channel is connected. | 44 // Returns true if the channel is connected. |
| 45 bool is_connected(); | 45 bool is_connected(); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 62 | 62 |
| 63 BufferedSocketWriter buffered_writer_; | 63 BufferedSocketWriter buffered_writer_; |
| 64 | 64 |
| 65 DISALLOW_COPY_AND_ASSIGN(AudioWriter); | 65 DISALLOW_COPY_AND_ASSIGN(AudioWriter); |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 } // namespace protocol | 68 } // namespace protocol |
| 69 } // namespace remoting | 69 } // namespace remoting |
| 70 | 70 |
| 71 #endif // REMOTING_PROTOCOL_AUDIO_WRITER_H_ | 71 #endif // REMOTING_PROTOCOL_AUDIO_WRITER_H_ |
| OLD | NEW |