Chromium Code Reviews| Index: remoting/host/plugin/policy_hack/nat_policy.h |
| diff --git a/remoting/host/plugin/policy_hack/nat_policy.h b/remoting/host/plugin/policy_hack/nat_policy.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..be8f33d7a861877e70f6ca39c2a2c6e4c69f3f89 |
| --- /dev/null |
| +++ b/remoting/host/plugin/policy_hack/nat_policy.h |
| @@ -0,0 +1,40 @@ |
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef REMOTING_HOST_PLUGIN_POLICY_HACK_NAT_POLICY_H_ |
| +#define REMOTING_HOST_PLUGIN_POLICY_HACK_NAT_POLICY_H_ |
| + |
| +#include "base/callback.h" |
| + |
| +namespace base { |
| +class WaitableEvent; |
| +} // namespace base |
| + |
| +namespace remoting { |
| +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.
|
| + |
| +// Watches the policy files for a change to the remote access host NAT |
| +// policies. |
| +class NatPolicy { |
| + public: |
| + // Called with the current status of whether or not NAT traversal is enabled. |
| + typedef base::Callback<void(bool)> NatEnabledCallback; |
| + |
| + NatPolicy() {} |
| + virtual ~NatPolicy() {} |
| + |
| + // This guarantees that the policy_update_cb is called at least once with the |
| + // current policy. |
| + virtual void StartWatching() = 0; |
| + |
| + virtual void StopWatching(base::WaitableEvent* done) = 0; |
| + |
| + // Implemented by each platform. |
| + static NatPolicy* Create(const NatEnabledCallback& policy_update_cb); |
| +}; |
| + |
| +} // namespace policy_hack |
| +} // namespace remoting |
| + |
| +#endif // REMOTING_HOST_PLUGIN_POLICY_HACK_NAT_POLICY_H_ |