blob: e94c6780ee74b9a558ebb6f834456bdc0fa17f05 [file] [log] [blame]
Darin Petkov887f2982011-07-14 16:10:17 -07001// 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 SHILL_MODEM_INFO_
6#define SHILL_MODEM_INFO_
7
8#include <string>
9
10#include <base/memory/scoped_vector.h>
11#include <gtest/gtest_prod.h> // for FRIEND_TEST
12
13namespace shill {
14
15class ControlInterface;
16class EventDispatcher;
17class GLib;
18class Manager;
19class ModemManager;
20
21// Manages modem managers.
22class ModemInfo {
23 public:
24 ModemInfo(ControlInterface *control_interface,
25 EventDispatcher *dispatcher,
26 Manager *manager,
27 GLib *glib);
28 ~ModemInfo();
29
30 void Start();
31 void Stop();
32
33 private:
34 friend class ModemInfoTest;
35 FRIEND_TEST(ModemInfoTest, RegisterModemManager);
36 FRIEND_TEST(ModemInfoTest, StartStop);
37
38 static const char kCromoService[];
39 static const char kCromoPath[];
40
41 // Registers a new ModemManager service handler and starts it.
42 void RegisterModemManager(const std::string &service,
43 const std::string &path);
44
45 ScopedVector<ModemManager> modem_managers_;
46
47 ControlInterface *control_interface_;
48 EventDispatcher *dispatcher_;
49 Manager *manager_;
50 GLib *glib_;
51
52 DISALLOW_COPY_AND_ASSIGN(ModemInfo);
53};
54
55} // namespace shill
56
57#endif // SHILL_MODEM_INFO_