blob: ca8aedcb47becdf119f971fd8e3ec67676c122fb [file] [log] [blame]
Jason Glasgowee1081c2012-03-06 15:14:53 -05001// 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_MM1_MODEM_MODEM3GPP_PROXY_
6#define SHILL_MM1_MODEM_MODEM3GPP_PROXY_
7
8#include <string>
9
Liam McLoughlinef342b42013-09-13 21:05:36 +010010#include "dbus_proxies/org.freedesktop.ModemManager1.Modem.Modem3gpp.h"
Jason Glasgowee1081c2012-03-06 15:14:53 -050011#include "shill/dbus_properties.h"
12#include "shill/mm1_modem_modem3gpp_proxy_interface.h"
13
14namespace shill {
15namespace mm1 {
16
mukesh agrawalf407d592013-07-31 11:37:57 -070017// A proxy to org.freedesktop.ModemManager1.Modem.Modem3gpp.
Jason Glasgowee1081c2012-03-06 15:14:53 -050018class ModemModem3gppProxy : public ModemModem3gppProxyInterface {
19 public:
mukesh agrawalf407d592013-07-31 11:37:57 -070020 // Constructs an org.freedesktop.ModemManager1.Modem.Modem3gpp DBus
Eric Shienbrood9a245532012-03-07 14:20:39 -050021 // object proxy at |path| owned by |service|.
22 ModemModem3gppProxy(DBus::Connection *connection,
Jason Glasgowee1081c2012-03-06 15:14:53 -050023 const std::string &path,
24 const std::string &service);
25 virtual ~ModemModem3gppProxy();
26 // Inherited methods from ModemModem3gppProxyInterface.
27 virtual void Register(const std::string &operator_id,
Eric Shienbrood9a245532012-03-07 14:20:39 -050028 Error *error,
29 const ResultCallback &callback,
Jason Glasgowee1081c2012-03-06 15:14:53 -050030 int timeout);
Eric Shienbrood9a245532012-03-07 14:20:39 -050031 virtual void Scan(Error *error,
32 const DBusPropertyMapsCallback &callback,
33 int timeout);
Jason Glasgowee1081c2012-03-06 15:14:53 -050034
Jason Glasgowee1081c2012-03-06 15:14:53 -050035 private:
36 class Proxy : public org::freedesktop::ModemManager1::Modem::Modem3gpp_proxy,
37 public DBus::ObjectProxy {
38 public:
Eric Shienbrood9a245532012-03-07 14:20:39 -050039 Proxy(DBus::Connection *connection,
Jason Glasgowee1081c2012-03-06 15:14:53 -050040 const std::string &path,
41 const std::string &service);
42 virtual ~Proxy();
43
44 private:
45 // Method callbacks inherited from
46 // org::freedesktop::ModemManager1::Modem::Modem3gppProxy
47 virtual void RegisterCallback(const ::DBus::Error& dberror, void *data);
48 virtual void ScanCallback(
49 const std::vector<DBusPropertiesMap> &results,
50 const ::DBus::Error& dberror, void *data);
Jason Glasgowee1081c2012-03-06 15:14:53 -050051
52 DISALLOW_COPY_AND_ASSIGN(Proxy);
53 };
54
55 Proxy proxy_;
56
57 DISALLOW_COPY_AND_ASSIGN(ModemModem3gppProxy);
58};
59
60} // namespace mm1
61} // namespace shill
62
63#endif // MM1_SHILL_MODEM_MODEM3GPP_PROXY_