blob: 4661eca4a02ad4397276654928b385ae0633f3c0 [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
Peter Qiu0d70fa72015-11-12 10:31:40 -080034 virtual void Init() = 0;
35 virtual void Shutdown() = 0;
36
Peter Qiua522e002015-10-13 13:21:58 -070037 // Proxy creation APIs.
38 virtual std::unique_ptr<FirewallProxyInterface> CreateFirewallProxy(
39 const base::Closure& service_appeared_callback,
40 const base::Closure& service_vanished_callback) = 0;
41 virtual std::unique_ptr<ShillProxyInterface> CreateShillProxy(
42 const base::Closure& service_appeared_callback,
43 const base::Closure& service_vanished_callback) = 0;
44};
45
46} // namespace apmanager
47
48#endif // APMANAGER_CONTROL_INTERFACE_H_