2009-05-14 02:54:16 +08:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2008 The Android Open Source Project
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _OPEN_VPN_CONTROLLER_H
|
|
|
|
#define _OPEN_VPN_CONTROLLER_H
|
|
|
|
|
2009-05-23 06:36:13 +08:00
|
|
|
#include "PropertyManager.h"
|
2009-05-14 02:54:16 +08:00
|
|
|
#include "VpnController.h"
|
|
|
|
|
2009-05-15 06:00:06 +08:00
|
|
|
class ServiceManager;
|
2009-06-16 05:10:44 +08:00
|
|
|
class IControllerHandler;
|
2009-05-15 06:00:06 +08:00
|
|
|
|
2009-05-14 02:54:16 +08:00
|
|
|
class OpenVpnController : public VpnController {
|
2009-05-15 06:00:06 +08:00
|
|
|
private:
|
|
|
|
ServiceManager *mServiceManager;
|
2009-05-14 02:54:16 +08:00
|
|
|
|
|
|
|
public:
|
2009-06-16 05:10:44 +08:00
|
|
|
OpenVpnController(PropertyManager *propmngr, IControllerHandler *handlers);
|
2009-05-15 06:00:06 +08:00
|
|
|
virtual ~OpenVpnController();
|
2009-05-14 02:54:16 +08:00
|
|
|
|
|
|
|
int start();
|
|
|
|
int stop();
|
2009-05-21 06:28:43 +08:00
|
|
|
|
|
|
|
private:
|
2009-05-14 02:54:16 +08:00
|
|
|
int enable();
|
|
|
|
int disable();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|