Ben Chan | b39cb31 | 2012-11-01 22:55:25 -0700 | [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 | |
| 5 | #ifndef SHILL_CELLULAR_OPERATOR_INFO_H_ |
| 6 | #define SHILL_CELLULAR_OPERATOR_INFO_H_ |
| 7 | |
| 8 | #include <string> |
| 9 | |
| 10 | #include <base/basictypes.h> |
| 11 | #include <base/file_path.h> |
| 12 | |
| 13 | #include "shill/cellular_service.h" |
| 14 | #include "shill/key_file_store.h" |
| 15 | |
| 16 | namespace shill { |
| 17 | |
| 18 | class GLib; |
| 19 | |
| 20 | class CellularOperatorInfo { |
| 21 | public: |
| 22 | explicit CellularOperatorInfo(GLib *glib); |
Ben Chan | 1578603 | 2012-11-04 21:28:02 -0800 | [diff] [blame^] | 23 | virtual ~CellularOperatorInfo(); |
Ben Chan | b39cb31 | 2012-11-01 22:55:25 -0700 | [diff] [blame] | 24 | |
| 25 | // Loads the operator info from |info_file_path|. Returns true on success. |
Ben Chan | 1578603 | 2012-11-04 21:28:02 -0800 | [diff] [blame^] | 26 | virtual bool Load(const FilePath &info_file_path); |
Ben Chan | b39cb31 | 2012-11-01 22:55:25 -0700 | [diff] [blame] | 27 | |
| 28 | // Gets the online payment portal info of the operator with ID |operator_id|. |
| 29 | // Returns true if the info is found. |
Ben Chan | 1578603 | 2012-11-04 21:28:02 -0800 | [diff] [blame^] | 30 | virtual bool GetOLP(const std::string &operator_id, |
| 31 | CellularService::OLP *olp); |
Ben Chan | b39cb31 | 2012-11-01 22:55:25 -0700 | [diff] [blame] | 32 | |
| 33 | private: |
| 34 | KeyFileStore info_file_; |
| 35 | |
| 36 | DISALLOW_COPY_AND_ASSIGN(CellularOperatorInfo); |
| 37 | }; |
| 38 | |
| 39 | } // namespace shill |
| 40 | |
| 41 | #endif // SHILL_CELLULAR_OPERATOR_INFO_H_ |