Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2011 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 _VPN_MANAGER_L2TP_MANAGER_H_ | |
| 6 #define _VPN_MANAGER_L2TP_MANAGER_H_ | |
| 7 | |
| 8 #include "base/file_util.h" | |
| 9 #include "base/scoped_ptr.h" | |
| 10 #include "base/time.h" | |
| 11 #include "gtest/gtest_prod.h" // for FRIEND_TEST | |
| 12 #include "vpn-manager/service_manager.h" | |
|
petkov
2011/03/04 18:42:56
add blank line
kmixter1
2011/03/05 02:48:59
Done.
| |
| 13 | |
| 14 namespace chromeos { | |
| 15 class Process; | |
| 16 } | |
| 17 | |
| 18 // Manages the L2TP daemon | |
| 19 class L2tpManager : public ServiceManager { | |
| 20 public: | |
| 21 L2tpManager(); | |
| 22 | |
| 23 bool Initialize(const std::string& remote); | |
|
petkov
2011/03/04 18:42:56
overloading (of static)
kmixter1
2011/03/05 02:48:59
Done.
| |
| 24 | |
| 25 bool Start(); | |
|
petkov
2011/03/04 18:42:56
virtual for inherited methods
kmixter1
2011/03/05 02:48:59
Done.
| |
| 26 | |
| 27 void Stop(); | |
| 28 | |
| 29 int Poll(); | |
| 30 void HandleChild(pid_t pid, int signal); | |
| 31 | |
| 32 int output_fd() const { return output_fd_; } | |
| 33 | |
| 34 protected: | |
| 35 friend class L2tpManagerTest; | |
| 36 FRIEND_TEST(L2tpManagerTest, FormatL2tpdConfiguration); | |
| 37 FRIEND_TEST(L2tpManagerTest, FormatPppdConfiguration); | |
| 38 FRIEND_TEST(L2tpManagerTest, Initiate); | |
| 39 FRIEND_TEST(L2tpManagerTest, Terminate); | |
| 40 | |
| 41 std::string FormatL2tpdConfiguration(const std::string& ppp_config_path); | |
| 42 std::string FormatPppdConfiguration(); | |
| 43 bool Initiate(); | |
| 44 bool Terminate(); | |
| 45 | |
| 46 int output_fd_; | |
| 47 base::TimeTicks start_ticks_; | |
| 48 std::string remote_; | |
| 49 FilePath l2tpd_control_path_; | |
| 50 scoped_ptr<chromeos::Process> l2tpd_; | |
| 51 }; | |
| 52 | |
| 53 #endif // _VPN_MANAGER_L2TP_MANAGER_H_ | |
| OLD | NEW |