OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef REMOTING_HOST_PLUGIN_POLICY_HACK_NAT_POLICY_H_ | |
6 #define REMOTING_HOST_PLUGIN_POLICY_HACK_NAT_POLICY_H_ | |
7 | |
8 #include "base/callback.h" | |
9 | |
10 namespace base { | |
11 class WaitableEvent; | |
12 } // namespace base | |
13 | |
14 namespace remoting { | |
15 namespace policy_hack { | |
dmac
2011/08/10 21:39:00
is a policy_hack namespace really necessary within
awong
2011/08/11 01:23:29
yes.
| |
16 | |
17 // Watches the policy files for a change to the remote access host NAT | |
18 // policies. | |
19 class NatPolicy { | |
20 public: | |
21 // Called with the current status of whether or not NAT traversal is enabled. | |
22 typedef base::Callback<void(bool)> NatEnabledCallback; | |
23 | |
24 NatPolicy() {} | |
25 virtual ~NatPolicy() {} | |
26 | |
27 // This guarantees that the policy_update_cb is called at least once with the | |
28 // current policy. | |
29 virtual void StartWatching() = 0; | |
30 | |
31 virtual void StopWatching(base::WaitableEvent* done) = 0; | |
32 | |
33 // Implemented by each platform. | |
34 static NatPolicy* Create(const NatEnabledCallback& policy_update_cb); | |
35 }; | |
36 | |
37 } // namespace policy_hack | |
38 } // namespace remoting | |
39 | |
40 #endif // REMOTING_HOST_PLUGIN_POLICY_HACK_NAT_POLICY_H_ | |
OLD | NEW |