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_export.h" |
13 #include "net/base/net_util.h" | 13 #include "net/base/net_util.h" |
14 | 14 |
15 struct addrinfo; | 15 struct addrinfo; |
16 | 16 |
17 namespace net { | 17 namespace net { |
18 | 18 |
19 // An AddressList object contains a linked list of addrinfo structures. This | 19 // An AddressList object contains a linked list of addrinfo structures. This |
20 // class is designed to be copied around by value. | 20 // class is designed to be copied around by value. |
21 class NET_API AddressList { | 21 class NET_EXPORT AddressList { |
22 public: | 22 public: |
23 // Constructs an invalid address list. Should not call any methods on this | 23 // Constructs an invalid address list. Should not call any methods on this |
24 // other than assignment. | 24 // other than assignment. |
25 AddressList(); | 25 AddressList(); |
26 | 26 |
27 AddressList(const AddressList& addresslist); | 27 AddressList(const AddressList& addresslist); |
28 ~AddressList(); | 28 ~AddressList(); |
29 AddressList& operator=(const AddressList& addresslist); | 29 AddressList& operator=(const AddressList& addresslist); |
30 | 30 |
31 // Creates an address list for a list of IP literals. | 31 // Creates an address list for a list of IP literals. |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 }; | 112 }; |
113 | 113 |
114 // Helper to create an AddressList that has a particular port. It has an | 114 // Helper to create an AddressList that has a particular port. It has an |
115 // optimization to avoid allocating a new address linked list when the | 115 // optimization to avoid allocating a new address linked list when the |
116 // port is already what we want. | 116 // port is already what we want. |
117 AddressList CreateAddressListUsingPort(const AddressList& src, int port); | 117 AddressList CreateAddressListUsingPort(const AddressList& src, int port); |
118 | 118 |
119 } // namespace net | 119 } // namespace net |
120 | 120 |
121 #endif // NET_BASE_ADDRESS_LIST_H_ | 121 #endif // NET_BASE_ADDRESS_LIST_H_ |
OLD | NEW |