blob: a801cf7319ac8476d5d7a852ac51b562e31cb43a [file] [log] [blame]
Darin Petkove6ca3202012-10-19 14:49:56 +02001// Copyright (c) 2012 The Chromium OS 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 SHILL_SHIMS_PPP_H_
6#define SHILL_SHIMS_PPP_H_
7
8#include <string>
9
10#include <base/basictypes.h>
11#include <base/memory/scoped_ptr.h>
12
13namespace base {
14class AtExitManager;
15} // namespace base
16
17namespace DBus {
18class BusDispatcher;
19class Connection;
20} // namespace DBus
21
22namespace shill {
23
24namespace shims {
25
26class TaskProxy;
27
28class PPP {
29 public:
30 PPP();
31 ~PPP();
32
33 void Start();
34 void Stop();
35
36 bool GetSecret(std::string *username, std::string *password);
37 void OnConnect(const std::string &ifname);
38 void OnDisconnect();
39
40 private:
41 bool CreateProxy();
42 void DestroyProxy();
43
44 static std::string ConvertIPToText(const void *addr);
45
46 scoped_ptr<DBus::BusDispatcher> dispatcher_;
47 scoped_ptr<DBus::Connection> connection_;
48 scoped_ptr<TaskProxy> proxy_;
49
50 static base::AtExitManager *exit_manager_;
51
52 DISALLOW_COPY_AND_ASSIGN(PPP);
53};
54
55} // namespace shims
56
57} // namespace shill
58
59#endif // SHILL_SHIMS_PPP_H_