OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CLOUD_PRINT_GCP20_PROTOTYPE_DNS_SD_SERVER_H_ | 5 #ifndef CLOUD_PRINT_GCP20_PROTOTYPE_DNS_SD_SERVER_H_ |
6 #define CLOUD_PRINT_GCP20_PROTOTYPE_DNS_SD_SERVER_H_ | 6 #define CLOUD_PRINT_GCP20_PROTOTYPE_DNS_SD_SERVER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
14 #include "cloud_print/gcp20/prototype/service_parameters.h" | 14 #include "cloud_print/gcp20/prototype/service_parameters.h" |
15 #include "net/base/ip_endpoint.h" | 15 #include "net/base/ip_endpoint.h" |
16 #include "net/udp/udp_socket.h" | 16 #include "net/udp/udp_server_socket.h" |
rvargas (doing something else)
2014/12/02 23:28:09
same question (etc)
hidehiko
2014/12/03 17:33:27
Acknowledged.
| |
17 | 17 |
18 namespace net { | 18 namespace net { |
19 | 19 |
20 class IOBufferWithSize; | 20 class IOBufferWithSize; |
21 | 21 |
22 } // namespace net | 22 } // namespace net |
23 | 23 |
24 struct DnsQueryRecord; | 24 struct DnsQueryRecord; |
25 class DnsResponseBuilder; | 25 class DnsResponseBuilder; |
26 | 26 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
72 void OnDatagramReceived(); | 72 void OnDatagramReceived(); |
73 | 73 |
74 // Sends announcement. | 74 // Sends announcement. |
75 void SendAnnouncement(uint32 ttl); | 75 void SendAnnouncement(uint32 ttl); |
76 | 76 |
77 // Calculates and returns current TTL (with accordance to last send | 77 // Calculates and returns current TTL (with accordance to last send |
78 // announcement time. | 78 // announcement time. |
79 uint32 GetCurrentTLL() const; | 79 uint32 GetCurrentTLL() const; |
80 | 80 |
81 // Stores socket to multicast address. | 81 // Stores socket to multicast address. |
82 scoped_ptr<net::UDPSocket> socket_; | 82 scoped_ptr<net::UDPServerSocket> socket_; |
83 | 83 |
84 // Stores multicast address end point. | 84 // Stores multicast address end point. |
85 net::IPEndPoint multicast_address_; | 85 net::IPEndPoint multicast_address_; |
86 | 86 |
87 // Stores time until last announcement is live. | 87 // Stores time until last announcement is live. |
88 base::Time time_until_live_; | 88 base::Time time_until_live_; |
89 | 89 |
90 // Stores service parameters (like service-name and service-type etc.) | 90 // Stores service parameters (like service-name and service-type etc.) |
91 ServiceParameters serv_params_; | 91 ServiceParameters serv_params_; |
92 | 92 |
93 // Stores the buffer for receiving messages. | 93 // Stores the buffer for receiving messages. |
94 scoped_refptr<net::IOBufferWithSize> recv_buf_; | 94 scoped_refptr<net::IOBufferWithSize> recv_buf_; |
95 | 95 |
96 // Stores address from where last message was sent. | 96 // Stores address from where last message was sent. |
97 net::IPEndPoint recv_address_; | 97 net::IPEndPoint recv_address_; |
98 | 98 |
99 // Stores information for TXT respond. | 99 // Stores information for TXT respond. |
100 std::vector<std::string> metadata_; | 100 std::vector<std::string> metadata_; |
101 | 101 |
102 // TTL for announcements | 102 // TTL for announcements |
103 uint32 full_ttl_; | 103 uint32 full_ttl_; |
104 | 104 |
105 DISALLOW_COPY_AND_ASSIGN(DnsSdServer); | 105 DISALLOW_COPY_AND_ASSIGN(DnsSdServer); |
106 }; | 106 }; |
107 | 107 |
108 #endif // CLOUD_PRINT_GCP20_PROTOTYPE_DNS_SD_SERVER_H_ | 108 #endif // CLOUD_PRINT_GCP20_PROTOTYPE_DNS_SD_SERVER_H_ |
109 | |
OLD | NEW |