blob: e5bbfd0cccab1fc6f51fb2dc876eabf03a43a596 [file] [log] [blame]
Peter Qiua522e002015-10-13 13:21:58 -07001//
2// Copyright (C) 2015 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
17#ifndef APMANAGER_CONTROL_INTERFACE_H_
18#define APMANAGER_CONTROL_INTERFACE_H_
19
20#include <base/callback.h>
21#include <base/macros.h>
22
23#include "apmanager/firewall_proxy_interface.h"
24#include "apmanager/shill_proxy_interface.h"
25
26namespace apmanager {
27
28// This is the Interface for an object factory that creates adaptor/proxy
29// objects
30class ControlInterface {
31 public:
32 virtual ~ControlInterface() {}
33
34 // Proxy creation APIs.
35 virtual std::unique_ptr<FirewallProxyInterface> CreateFirewallProxy(
36 const base::Closure& service_appeared_callback,
37 const base::Closure& service_vanished_callback) = 0;
38 virtual std::unique_ptr<ShillProxyInterface> CreateShillProxy(
39 const base::Closure& service_appeared_callback,
40 const base::Closure& service_vanished_callback) = 0;
41};
42
43} // namespace apmanager
44
45#endif // APMANAGER_CONTROL_INTERFACE_H_