| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_BASE_PROTOCOL_DECODER_H_ | 5 #ifndef REMOTING_BASE_PROTOCOL_DECODER_H_ |
| 6 #define REMOTING_BASE_PROTOCOL_DECODER_H_ | 6 #define REMOTING_BASE_PROTOCOL_DECODER_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/ref_counted.h" | 11 #include "base/ref_counted.h" |
| 12 #include "google/protobuf/message_lite.h" | 12 #include "google/protobuf/message_lite.h" |
| 13 #include "media/base/data_buffer.h" | 13 #include "media/base/data_buffer.h" |
| 14 #include "remoting/base/protocol/chromotocol.pb.h" | 14 #include "remoting/base/protocol/chromotocol.pb.h" |
| 15 | 15 |
| 16 namespace remoting { | 16 namespace remoting { |
| 17 | 17 |
| 18 typedef std::vector<chromotocol_pb::HostMessage*> HostMessageList; | 18 typedef std::vector<HostMessage*> HostMessageList; |
| 19 typedef std::vector<chromotocol_pb::ClientMessage*> ClientMessageList; | 19 typedef std::vector<ClientMessage*> ClientMessageList; |
| 20 | 20 |
| 21 // A protocol decoder is used to decode data transmitted in the chromoting | 21 // A protocol decoder is used to decode data transmitted in the chromoting |
| 22 // network. | 22 // network. |
| 23 // TODO(hclam): Defines the interface and implement methods. | 23 // TODO(hclam): Defines the interface and implement methods. |
| 24 class ProtocolDecoder { | 24 class ProtocolDecoder { |
| 25 public: | 25 public: |
| 26 ProtocolDecoder(); | 26 ProtocolDecoder(); |
| 27 | 27 |
| 28 virtual ~ProtocolDecoder() {} | 28 virtual ~ProtocolDecoder() {} |
| 29 | 29 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 int next_payload_; | 63 int next_payload_; |
| 64 | 64 |
| 65 // True if the size of the next payload is known. After one payload is read, | 65 // True if the size of the next payload is known. After one payload is read, |
| 66 // this is reset to false. | 66 // this is reset to false. |
| 67 bool next_payload_known_; | 67 bool next_payload_known_; |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 } // namespace remoting | 70 } // namespace remoting |
| 71 | 71 |
| 72 #endif // REMOTING_BASE_PROTOCOL_DECODER_H_ | 72 #endif // REMOTING_BASE_PROTOCOL_DECODER_H_ |
| OLD | NEW |