| Jason Glasgow | 74f5ef2 | 2012-03-29 16:15:04 -0400 | [diff] [blame] | 1 | // 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 Chan | c45688b | 2014-07-02 23:50:45 -0700 | [diff] [blame] | 5 | #ifndef SHILL_MM1_SIM_PROXY_INTERFACE_H_ | 
|  | 6 | #define SHILL_MM1_SIM_PROXY_INTERFACE_H_ | 
| Jason Glasgow | 74f5ef2 | 2012-03-29 16:15:04 -0400 | [diff] [blame] | 7 |  | 
|  | 8 | #include <string> | 
|  | 9 |  | 
|  | 10 | #include <base/basictypes.h> | 
|  | 11 |  | 
|  | 12 | #include "shill/callbacks.h" | 
|  | 13 |  | 
|  | 14 | namespace shill { | 
|  | 15 |  | 
|  | 16 | class Error; | 
|  | 17 |  | 
|  | 18 | namespace 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. | 
|  | 24 | class 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 Glasgow | 74f5ef2 | 2012-03-29 16:15:04 -0400 | [diff] [blame] | 47 | }; | 
|  | 48 |  | 
|  | 49 | }  // namespace mm1 | 
|  | 50 | }  // namespace shill | 
|  | 51 |  | 
| Ben Chan | c45688b | 2014-07-02 23:50:45 -0700 | [diff] [blame] | 52 | #endif  // SHILL_MM1_SIM_PROXY_INTERFACE_H_ |