blob: 86e554db0208833629fd22b403e1c0d89fe9d5a9 [file] [log] [blame]
Darin Petkov975b5e72011-08-30 11:48:08 -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_GSM_CARD_PROXY_
6#define SHILL_MODEM_GSM_CARD_PROXY_
7
8#include <base/basictypes.h>
9
10#include "shill/dbus_bindings/modem-gsm-card.h"
11#include "shill/modem_gsm_card_proxy_interface.h"
12
13namespace shill {
14
15class ModemGSMCardProxy : public ModemGSMCardProxyInterface {
16 public:
17 // Constructs a ModemManager.Modem.Gsm.Card DBus object proxy at |path| owned
18 // by |service|. Callbacks will be dispatched to |listener|.
19 ModemGSMCardProxy(ModemGSMCardProxyListener *listener,
20 DBus::Connection *connection,
21 const std::string &path,
22 const std::string &service);
23 virtual ~ModemGSMCardProxy();
24
25 // Inherited from ModemGSMCardProxyInterface.
26 virtual std::string GetIMEI();
27 virtual std::string GetIMSI();
28 virtual std::string GetSPN();
29 virtual std::string GetMSISDN();
30
31 private:
32 class Proxy
33 : public org::freedesktop::ModemManager::Modem::Gsm::Card_proxy,
34 public DBus::ObjectProxy {
35 public:
36 Proxy(ModemGSMCardProxyListener *listener,
37 DBus::Connection *connection,
38 const std::string &path,
39 const std::string &service);
40 virtual ~Proxy();
41
42 private:
43 // Signal callbacks inherited from ModemManager::Modem::Gsm::Card_proxy.
44 // None.
45
46 ModemGSMCardProxyListener *listener_;
47
48 DISALLOW_COPY_AND_ASSIGN(Proxy);
49 };
50
51 Proxy proxy_;
52
53 DISALLOW_COPY_AND_ASSIGN(ModemGSMCardProxy);
54};
55
56} // namespace shill
57
58#endif // SHILL_MODEM_GSM_CARD_PROXY_