OLD | NEW |
1 // Copyright (c) 2011 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_MESSAGES_DECODER_H_ | 5 #ifndef REMOTING_PROTOCOL_MESSAGE_DECODER_H_ |
6 #define REMOTING_PROTOCOL_MESSAGES_DECODER_H_ | 6 #define REMOTING_PROTOCOL_MESSAGE_DECODER_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <list> | 9 #include <list> |
10 | 10 |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/memory/scoped_ptr.h" | |
13 #include "net/base/io_buffer.h" | 12 #include "net/base/io_buffer.h" |
14 #include "remoting/base/compound_buffer.h" | 13 #include "remoting/base/compound_buffer.h" |
15 #include "third_party/protobuf/src/google/protobuf/message_lite.h" | 14 #include "third_party/protobuf/src/google/protobuf/message_lite.h" |
16 | 15 |
17 namespace remoting { | 16 namespace remoting { |
18 namespace protocol { | 17 namespace protocol { |
19 | 18 |
20 // MessageDecoder uses CompoundBuffer to split the data received from | 19 // MessageDecoder uses CompoundBuffer to split the data received from |
21 // the network into separate messages. Each message is expected to be | 20 // the network into separate messages. Each message is expected to be |
22 // decoded in the stream as follows: | 21 // decoded in the stream as follows: |
(...skipping 29 matching lines...) Expand all Loading... |
52 // |next_payload_| stores the size of the next payload if known. | 51 // |next_payload_| stores the size of the next payload if known. |
53 // |next_payload_known_| is true if the size of the next payload is known. | 52 // |next_payload_known_| is true if the size of the next payload is known. |
54 // After one payload is read this is reset to false. | 53 // After one payload is read this is reset to false. |
55 int next_payload_; | 54 int next_payload_; |
56 bool next_payload_known_; | 55 bool next_payload_known_; |
57 }; | 56 }; |
58 | 57 |
59 } // namespace protocol | 58 } // namespace protocol |
60 } // namespace remoting | 59 } // namespace remoting |
61 | 60 |
62 #endif // REMOTING_PROTOCOL_MESSAGES_DECODER_H_ | 61 #endif // REMOTING_PROTOCOL_MESSAGE_DECODER_H_ |
OLD | NEW |