1c0beca55d290fe0b1c96d78cbbcf94b05c23f5a5Peter Qiu//
2c0beca55d290fe0b1c96d78cbbcf94b05c23f5a5Peter Qiu// Copyright (C) 2012 The Android Open Source Project
3c0beca55d290fe0b1c96d78cbbcf94b05c23f5a5Peter Qiu//
4c0beca55d290fe0b1c96d78cbbcf94b05c23f5a5Peter Qiu// Licensed under the Apache License, Version 2.0 (the "License");
5c0beca55d290fe0b1c96d78cbbcf94b05c23f5a5Peter Qiu// you may not use this file except in compliance with the License.
6c0beca55d290fe0b1c96d78cbbcf94b05c23f5a5Peter Qiu// You may obtain a copy of the License at
7c0beca55d290fe0b1c96d78cbbcf94b05c23f5a5Peter Qiu//
8c0beca55d290fe0b1c96d78cbbcf94b05c23f5a5Peter Qiu//      http://www.apache.org/licenses/LICENSE-2.0
9c0beca55d290fe0b1c96d78cbbcf94b05c23f5a5Peter Qiu//
10c0beca55d290fe0b1c96d78cbbcf94b05c23f5a5Peter Qiu// Unless required by applicable law or agreed to in writing, software
11c0beca55d290fe0b1c96d78cbbcf94b05c23f5a5Peter Qiu// distributed under the License is distributed on an "AS IS" BASIS,
12c0beca55d290fe0b1c96d78cbbcf94b05c23f5a5Peter Qiu// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13c0beca55d290fe0b1c96d78cbbcf94b05c23f5a5Peter Qiu// See the License for the specific language governing permissions and
14c0beca55d290fe0b1c96d78cbbcf94b05c23f5a5Peter Qiu// limitations under the License.
15c0beca55d290fe0b1c96d78cbbcf94b05c23f5a5Peter Qiu//
16975b5e7f8eae3a22b40f2218ce6f089f1e660d00Darin Petkov
17c54afe521739065a5d77e7c049acdb5e603f0592Ben Chan#ifndef SHILL_CELLULAR_MODEM_GSM_CARD_PROXY_INTERFACE_H_
18c54afe521739065a5d77e7c049acdb5e603f0592Ben Chan#define SHILL_CELLULAR_MODEM_GSM_CARD_PROXY_INTERFACE_H_
19975b5e7f8eae3a22b40f2218ce6f089f1e660d00Darin Petkov
20975b5e7f8eae3a22b40f2218ce6f089f1e660d00Darin Petkov#include <string>
21975b5e7f8eae3a22b40f2218ce6f089f1e660d00Darin Petkov
229a24553461df7036755060423f90804011612249Eric Shienbrood#include "shill/callbacks.h"
239a24553461df7036755060423f90804011612249Eric Shienbrood
24975b5e7f8eae3a22b40f2218ce6f089f1e660d00Darin Petkovnamespace shill {
25975b5e7f8eae3a22b40f2218ce6f089f1e660d00Darin Petkov
265de44ab664b7cbb7619e31431e346ec8309548a6Eric Shienbroodclass Error;
27f58b28e08efb9e3beccb993bc27dd68e0025a7daPaul Stewarttypedef base::Callback<void(const std::string&,
28f58b28e08efb9e3beccb993bc27dd68e0025a7daPaul Stewart                            const Error&)> GSMIdentifierCallback;
295de44ab664b7cbb7619e31431e346ec8309548a6Eric Shienbrood
30975b5e7f8eae3a22b40f2218ce6f089f1e660d00Darin Petkov// These are the methods that a ModemManager.Modem.Gsm.Card proxy must
31975b5e7f8eae3a22b40f2218ce6f089f1e660d00Darin Petkov// support. The interface is provided so that it can be mocked in tests.
329a24553461df7036755060423f90804011612249Eric Shienbrood// All calls are made asynchronously.
33975b5e7f8eae3a22b40f2218ce6f089f1e660d00Darin Petkovclass ModemGSMCardProxyInterface {
34975b5e7f8eae3a22b40f2218ce6f089f1e660d00Darin Petkov public:
35975b5e7f8eae3a22b40f2218ce6f089f1e660d00Darin Petkov  virtual ~ModemGSMCardProxyInterface() {}
36975b5e7f8eae3a22b40f2218ce6f089f1e660d00Darin Petkov
37f58b28e08efb9e3beccb993bc27dd68e0025a7daPaul Stewart  virtual void GetIMEI(Error* error, const GSMIdentifierCallback& callback,
389a24553461df7036755060423f90804011612249Eric Shienbrood                       int timeout) = 0;
39f58b28e08efb9e3beccb993bc27dd68e0025a7daPaul Stewart  virtual void GetIMSI(Error* error, const GSMIdentifierCallback& callback,
409a24553461df7036755060423f90804011612249Eric Shienbrood                       int timeout) = 0;
41f58b28e08efb9e3beccb993bc27dd68e0025a7daPaul Stewart  virtual void GetSPN(Error* error, const GSMIdentifierCallback& callback,
429a24553461df7036755060423f90804011612249Eric Shienbrood                      int timeout) = 0;
43f58b28e08efb9e3beccb993bc27dd68e0025a7daPaul Stewart  virtual void GetMSISDN(Error* error, const GSMIdentifierCallback& callback,
449a24553461df7036755060423f90804011612249Eric Shienbrood                         int timeout) = 0;
45f58b28e08efb9e3beccb993bc27dd68e0025a7daPaul Stewart  virtual void EnablePIN(const std::string& pin, bool enabled,
46f58b28e08efb9e3beccb993bc27dd68e0025a7daPaul Stewart                         Error* error, const ResultCallback& callback,
479a24553461df7036755060423f90804011612249Eric Shienbrood                         int timeout) = 0;
48f58b28e08efb9e3beccb993bc27dd68e0025a7daPaul Stewart  virtual void SendPIN(const std::string& pin,
49f58b28e08efb9e3beccb993bc27dd68e0025a7daPaul Stewart                       Error* error, const ResultCallback& callback,
509a24553461df7036755060423f90804011612249Eric Shienbrood                       int timeout) = 0;
51f58b28e08efb9e3beccb993bc27dd68e0025a7daPaul Stewart  virtual void SendPUK(const std::string& puk, const std::string& pin,
52f58b28e08efb9e3beccb993bc27dd68e0025a7daPaul Stewart                       Error* error, const ResultCallback& callback,
539a24553461df7036755060423f90804011612249Eric Shienbrood                       int timeout) = 0;
54f58b28e08efb9e3beccb993bc27dd68e0025a7daPaul Stewart  virtual void ChangePIN(const std::string& old_pin,
55f58b28e08efb9e3beccb993bc27dd68e0025a7daPaul Stewart                         const std::string& new_pin,
56f58b28e08efb9e3beccb993bc27dd68e0025a7daPaul Stewart                         Error* error, const ResultCallback& callback,
579a24553461df7036755060423f90804011612249Eric Shienbrood                         int timeout) = 0;
5863138a9b8249fd69c83a772ee3170551a589d57aDarin Petkov
5963138a9b8249fd69c83a772ee3170551a589d57aDarin Petkov  // Properties.
607fab89734d88724a288e96a9996b15548c5294c7Ben Chan  virtual uint32_t EnabledFacilityLocks() = 0;
61975b5e7f8eae3a22b40f2218ce6f089f1e660d00Darin Petkov};
62975b5e7f8eae3a22b40f2218ce6f089f1e660d00Darin Petkov
63975b5e7f8eae3a22b40f2218ce6f089f1e660d00Darin Petkov}  // namespace shill
64975b5e7f8eae3a22b40f2218ce6f089f1e660d00Darin Petkov
65c54afe521739065a5d77e7c049acdb5e603f0592Ben Chan#endif  // SHILL_CELLULAR_MODEM_GSM_CARD_PROXY_INTERFACE_H_
66