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_BASE_ADDRESS_LIST_H_ | 5 #ifndef NET_BASE_ADDRESS_LIST_H_ |
6 #define NET_BASE_ADDRESS_LIST_H_ | 6 #define NET_BASE_ADDRESS_LIST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "net/base/net_api.h" |
12 #include "net/base/net_util.h" | 13 #include "net/base/net_util.h" |
13 | 14 |
14 // TODO(eroman): Fix the declaration + definition ordering to match style guide. | 15 // TODO(eroman): Fix the declaration + definition ordering to match style guide. |
15 | 16 |
16 struct addrinfo; | 17 struct addrinfo; |
17 | 18 |
18 namespace net { | 19 namespace net { |
19 | 20 |
20 // An AddressList object contains a linked list of addrinfo structures. This | 21 // An AddressList object contains a linked list of addrinfo structures. This |
21 // class is designed to be copied around by value. | 22 // class is designed to be copied around by value. |
22 class AddressList { | 23 class NET_API AddressList { |
23 public: | 24 public: |
24 // Constructs an invalid address list. Should not call any methods on this | 25 // Constructs an invalid address list. Should not call any methods on this |
25 // other than assignment. | 26 // other than assignment. |
26 AddressList(); | 27 AddressList(); |
27 | 28 |
28 // Creates an address list for a single IP literal. | 29 // Creates an address list for a single IP literal. |
29 static AddressList CreateFromIPAddress( | 30 static AddressList CreateFromIPAddress( |
30 const IPAddressNumber& address, | 31 const IPAddressNumber& address, |
31 uint16 port); | 32 uint16 port); |
32 | 33 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 struct Data; | 104 struct Data; |
104 | 105 |
105 explicit AddressList(Data* data); | 106 explicit AddressList(Data* data); |
106 | 107 |
107 scoped_refptr<Data> data_; | 108 scoped_refptr<Data> data_; |
108 }; | 109 }; |
109 | 110 |
110 } // namespace net | 111 } // namespace net |
111 | 112 |
112 #endif // NET_BASE_ADDRESS_LIST_H_ | 113 #endif // NET_BASE_ADDRESS_LIST_H_ |
OLD | NEW |