| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 NET_DNS_DNS_QUERY_H_ | 5 #ifndef NET_DNS_DNS_QUERY_H_ |
| 6 #define NET_DNS_DNS_QUERY_H_ | 6 #define NET_DNS_DNS_QUERY_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/strings/string_piece.h" | 10 #include "base/strings/string_piece.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 base::StringPiece qname() const; | 31 base::StringPiece qname() const; |
| 32 uint16 qtype() const; | 32 uint16 qtype() const; |
| 33 | 33 |
| 34 // Returns the Question section of the query. Used when matching the | 34 // Returns the Question section of the query. Used when matching the |
| 35 // response. | 35 // response. |
| 36 base::StringPiece question() const; | 36 base::StringPiece question() const; |
| 37 | 37 |
| 38 // IOBuffer accessor to be used for writing out the query. | 38 // IOBuffer accessor to be used for writing out the query. |
| 39 IOBufferWithSize* io_buffer() const { return io_buffer_.get(); } | 39 IOBufferWithSize* io_buffer() const { return io_buffer_.get(); } |
| 40 | 40 |
| 41 void set_flags(uint16 flags); |
| 42 |
| 41 private: | 43 private: |
| 42 DnsQuery(const DnsQuery& orig, uint16 id); | 44 DnsQuery(const DnsQuery& orig, uint16 id); |
| 43 | 45 |
| 44 // Size of the DNS name (*NOT* hostname) we are trying to resolve; used | 46 // Size of the DNS name (*NOT* hostname) we are trying to resolve; used |
| 45 // to calculate offsets. | 47 // to calculate offsets. |
| 46 size_t qname_size_; | 48 size_t qname_size_; |
| 47 | 49 |
| 48 // Contains query bytes to be consumed by higher level Write() call. | 50 // Contains query bytes to be consumed by higher level Write() call. |
| 49 scoped_refptr<IOBufferWithSize> io_buffer_; | 51 scoped_refptr<IOBufferWithSize> io_buffer_; |
| 50 | 52 |
| 51 DISALLOW_COPY_AND_ASSIGN(DnsQuery); | 53 DISALLOW_COPY_AND_ASSIGN(DnsQuery); |
| 52 }; | 54 }; |
| 53 | 55 |
| 54 } // namespace net | 56 } // namespace net |
| 55 | 57 |
| 56 #endif // NET_DNS_DNS_QUERY_H_ | 58 #endif // NET_DNS_DNS_QUERY_H_ |
| OLD | NEW |