blob: f1ad31ce29a54d35e56063384a2c8e63daea3d48 [file] [log] [blame]
Darin Petkovc37a9c42012-09-06 15:28:22 +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_MODEM_GOBI_PROXY_H_
6#define SHILL_MODEM_GOBI_PROXY_H_
7
Alex Vakulenko8a532292014-06-16 17:18:44 -07008#include <string>
9
Darin Petkovc37a9c42012-09-06 15:28:22 +020010#include <base/basictypes.h>
11
Liam McLoughlinef342b42013-09-13 21:05:36 +010012#include "shill/dbus_proxies/modem-gobi.h"
Darin Petkovc37a9c42012-09-06 15:28:22 +020013#include "shill/modem_gobi_proxy_interface.h"
14
15namespace shill {
16
mukesh agrawalf407d592013-07-31 11:37:57 -070017// A proxy to (old) ModemManager.Modem.Gobi.
Darin Petkovc37a9c42012-09-06 15:28:22 +020018class ModemGobiProxy : public ModemGobiProxyInterface {
19 public:
20 // Constructs a ModemManager.Modem.Gobi DBus object proxy at |path| owned by
21 // |service|.
22 ModemGobiProxy(DBus::Connection *connection,
23 const std::string &path,
24 const std::string &service);
Ben Chan5ea763b2014-08-13 11:07:54 -070025 ~ModemGobiProxy() override;
Darin Petkovc37a9c42012-09-06 15:28:22 +020026
27 // Inherited from ModemGobiProxyInterface.
28 virtual void SetCarrier(const std::string &carrier,
29 Error *error, const ResultCallback &callback,
30 int timeout);
31
32 private:
33 class Proxy
34 : public org::chromium::ModemManager::Modem::Gobi_proxy,
35 public DBus::ObjectProxy {
36 public:
37 Proxy(DBus::Connection *connection,
38 const std::string &path,
39 const std::string &service);
Ben Chan5ea763b2014-08-13 11:07:54 -070040 ~Proxy() override;
Darin Petkovc37a9c42012-09-06 15:28:22 +020041
42 private:
43 // Signal callbacks inherited from ModemManager::Modem::Gobi_proxy.
44 // [None]
45
46 // Method callbacks inherited from ModemManager::Modem::Gobi_proxy.
47 virtual void SetCarrierCallback(const DBus::Error &dberror, void *data);
48
49 DISALLOW_COPY_AND_ASSIGN(Proxy);
50 };
51
52 Proxy proxy_;
53
54 DISALLOW_COPY_AND_ASSIGN(ModemGobiProxy);
55};
56
57} // namespace shill
58
59#endif // SHILL_MODEM_GOBI_PROXY_H_