blob: 85cd57fbec173e6b5f4b5548631d1af23c198600 [file] [log] [blame]
Jason Glasgow74f5ef22012-03-29 16:15:04 -04001// 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
Ben Chanc45688b2014-07-02 23:50:45 -07005#ifndef SHILL_MM1_SIM_PROXY_INTERFACE_H_
6#define SHILL_MM1_SIM_PROXY_INTERFACE_H_
Jason Glasgow74f5ef22012-03-29 16:15:04 -04007
8#include <string>
9
10#include <base/basictypes.h>
11
12#include "shill/callbacks.h"
13
14namespace shill {
15
16class Error;
17
18namespace mm1 {
19
20// These are the methods that a org.freedesktop.ModemManager1.Sim
21// proxy must support. The interface is provided so that it can be
22// mocked in tests. All calls are made asynchronously. Call completion
23// is signalled via the callbacks passed to the methods.
24class SimProxyInterface {
25 public:
26 virtual ~SimProxyInterface() {}
27
28 virtual void SendPin(const std::string &pin,
29 Error *error,
30 const ResultCallback &callback,
31 int timeout) = 0;
32 virtual void SendPuk(const std::string &puk,
33 const std::string &pin,
34 Error *error,
35 const ResultCallback &callback,
36 int timeout) = 0;
37 virtual void EnablePin(const std::string &pin,
38 const bool enabled,
39 Error *error,
40 const ResultCallback &callback,
41 int timeout) = 0;
42 virtual void ChangePin(const std::string &old_pin,
43 const std::string &new_pin,
44 Error *error,
45 const ResultCallback &callback,
46 int timeout) = 0;
Jason Glasgow74f5ef22012-03-29 16:15:04 -040047};
48
49} // namespace mm1
50} // namespace shill
51
Ben Chanc45688b2014-07-02 23:50:45 -070052#endif // SHILL_MM1_SIM_PROXY_INTERFACE_H_