Darin Petkov | c90fe52 | 2011-07-15 13:59:47 -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_PROXY_FACTORY_ |
| 6 | #define SHILL_PROXY_FACTORY_ |
| 7 | |
| 8 | #include <string> |
| 9 | |
| 10 | #include <base/basictypes.h> |
| 11 | |
| 12 | namespace shill { |
| 13 | |
| 14 | class ModemManager; |
| 15 | class ModemManagerProxyInterface; |
| 16 | |
| 17 | // TODO(petkov): Merge supplicant proxy factory into this one. |
| 18 | |
| 19 | // Global DBus proxy factory that can be mocked out in tests. |
| 20 | class ProxyFactory { |
| 21 | public: |
| 22 | ProxyFactory(); |
| 23 | virtual ~ProxyFactory(); |
| 24 | |
| 25 | virtual ModemManagerProxyInterface *CreateModemManagerProxy( |
| 26 | ModemManager *manager, |
| 27 | const std::string &path, |
| 28 | const std::string &service); |
| 29 | |
| 30 | static ProxyFactory *factory() { return factory_; } |
| 31 | static void set_factory(ProxyFactory *factory) { factory_ = factory; } |
| 32 | |
| 33 | private: |
| 34 | static ProxyFactory *factory_; |
| 35 | |
| 36 | DISALLOW_COPY_AND_ASSIGN(ProxyFactory); |
| 37 | }; |
| 38 | |
| 39 | } // namespace shill |
| 40 | |
| 41 | #endif // SHILL_PROXY_FACTORY_ |