Darin Petkov | 887f298 | 2011-07-14 16:10:17 -0700 | [diff] [blame] | 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 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 | |
Darin Petkov | 137884a | 2011-10-26 18:52:47 +0200 | [diff] [blame^] | 13 | struct mobile_provider_db; |
| 14 | |
Darin Petkov | 887f298 | 2011-07-14 16:10:17 -0700 | [diff] [blame] | 15 | namespace shill { |
| 16 | |
| 17 | class ControlInterface; |
| 18 | class EventDispatcher; |
| 19 | class GLib; |
| 20 | class Manager; |
| 21 | class ModemManager; |
| 22 | |
| 23 | // Manages modem managers. |
| 24 | class ModemInfo { |
| 25 | public: |
| 26 | ModemInfo(ControlInterface *control_interface, |
| 27 | EventDispatcher *dispatcher, |
| 28 | Manager *manager, |
| 29 | GLib *glib); |
| 30 | ~ModemInfo(); |
| 31 | |
| 32 | void Start(); |
| 33 | void Stop(); |
| 34 | |
| 35 | private: |
| 36 | friend class ModemInfoTest; |
| 37 | FRIEND_TEST(ModemInfoTest, RegisterModemManager); |
| 38 | FRIEND_TEST(ModemInfoTest, StartStop); |
| 39 | |
| 40 | static const char kCromoService[]; |
| 41 | static const char kCromoPath[]; |
Darin Petkov | 137884a | 2011-10-26 18:52:47 +0200 | [diff] [blame^] | 42 | static const char kMobileProviderDBPath[]; |
Darin Petkov | 887f298 | 2011-07-14 16:10:17 -0700 | [diff] [blame] | 43 | |
| 44 | // Registers a new ModemManager service handler and starts it. |
| 45 | void RegisterModemManager(const std::string &service, |
| 46 | const std::string &path); |
| 47 | |
| 48 | ScopedVector<ModemManager> modem_managers_; |
| 49 | |
| 50 | ControlInterface *control_interface_; |
| 51 | EventDispatcher *dispatcher_; |
| 52 | Manager *manager_; |
| 53 | GLib *glib_; |
| 54 | |
Darin Petkov | 137884a | 2011-10-26 18:52:47 +0200 | [diff] [blame^] | 55 | std::string provider_db_path_; // For testing. |
| 56 | mobile_provider_db *provider_db_; // Database instance owned by |this|. |
| 57 | |
Darin Petkov | 887f298 | 2011-07-14 16:10:17 -0700 | [diff] [blame] | 58 | DISALLOW_COPY_AND_ASSIGN(ModemInfo); |
| 59 | }; |
| 60 | |
| 61 | } // namespace shill |
| 62 | |
| 63 | #endif // SHILL_MODEM_INFO_ |