/src/node/src/string_decoder-inl.h
Line | Count | Source |
1 | | #ifndef SRC_STRING_DECODER_INL_H_ |
2 | | #define SRC_STRING_DECODER_INL_H_ |
3 | | |
4 | | #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS |
5 | | |
6 | | #include "string_decoder.h" |
7 | | |
8 | | namespace node { |
9 | | |
10 | 0 | enum encoding StringDecoder::Encoding() const { |
11 | 0 | return static_cast<enum encoding>(state_[kEncodingField]); |
12 | 0 | } |
13 | | |
14 | 0 | unsigned StringDecoder::BufferedBytes() const { |
15 | 0 | return state_[kBufferedBytes]; |
16 | 0 | } |
17 | | |
18 | 0 | unsigned StringDecoder::MissingBytes() const { |
19 | 0 | return state_[kMissingBytes]; |
20 | 0 | } |
21 | | |
22 | 0 | char* StringDecoder::IncompleteCharacterBuffer() { |
23 | 0 | return reinterpret_cast<char*>(state_ + kIncompleteCharactersStart); |
24 | 0 | } |
25 | | |
26 | | |
27 | | } // namespace node |
28 | | |
29 | | #endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS |
30 | | |
31 | | #endif // SRC_STRING_DECODER_INL_H_ |