blob: 307471ff8a5bbce7418abdc7595590bb53b38327 [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();
Darin Petkove42e1012011-08-31 12:35:04 -070030 virtual void EnablePIN(const std::string &pin, bool enabled);
31 virtual void SendPIN(const std::string &pin);
32 virtual void SendPUK(const std::string &puk, const std::string &pin);
33 virtual void ChangePIN(const std::string &old_pin,
34 const std::string &new_pin);
Darin Petkov975b5e72011-08-30 11:48:08 -070035
36 private:
37 class Proxy
38 : public org::freedesktop::ModemManager::Modem::Gsm::Card_proxy,
39 public DBus::ObjectProxy {
40 public:
41 Proxy(ModemGSMCardProxyListener *listener,
42 DBus::Connection *connection,
43 const std::string &path,
44 const std::string &service);
45 virtual ~Proxy();
46
47 private:
48 // Signal callbacks inherited from ModemManager::Modem::Gsm::Card_proxy.
49 // None.
50
51 ModemGSMCardProxyListener *listener_;
52
53 DISALLOW_COPY_AND_ASSIGN(Proxy);
54 };
55
56 Proxy proxy_;
57
58 DISALLOW_COPY_AND_ASSIGN(ModemGSMCardProxy);
59};
60
61} // namespace shill
62
63#endif // SHILL_MODEM_GSM_CARD_PROXY_