blob: e8032b9d315b12d5e8bdd4fca4dac40f5580984d [file] [log] [blame]
Chris Masone3bd3c8c2011-06-13 08:20:26 -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_CELLULAR_SERVICE_
6#define SHILL_CELLULAR_SERVICE_
7
8#include <map>
9#include <string>
10
11#include <base/basictypes.h>
12
Chris Masone2b105542011-06-22 10:58:09 -070013#include "shill/refptr_types.h"
Chris Masone3bd3c8c2011-06-13 08:20:26 -070014#include "shill/shill_event.h"
15#include "shill/service.h"
16
17namespace shill {
18
Chris Masone6791a432011-07-12 13:23:19 -070019class ControlInterface;
20class EventDispatcher;
21class Manager;
22
Chris Masone3bd3c8c2011-06-13 08:20:26 -070023class CellularService : public Service {
24 public:
25 CellularService(ControlInterface *control_interface,
26 EventDispatcher *dispatcher,
Chris Masone6791a432011-07-12 13:23:19 -070027 Manager *manager,
Chris Masone2b105542011-06-22 10:58:09 -070028 const CellularRefPtr &device,
Chris Masone3bd3c8c2011-06-13 08:20:26 -070029 const std::string& name);
30 ~CellularService();
31 void Connect();
32 void Disconnect();
33
Chris Masone3bd3c8c2011-06-13 08:20:26 -070034 protected:
35 virtual std::string CalculateState() { return "idle"; }
36
37 // Properties
38 std::string activation_state_;
39 std::string operator_name_;
40 std::string operator_code_;
41 std::string network_tech_;
42 std::string roaming_state_;
43 std::string payment_url_;
44 uint8 strength_;
45
46 std::map<std::string, std::string> apn_info_;
47 std::map<std::string, std::string> last_good_apn_info_;
48
49 private:
Chris Masone95207da2011-06-29 16:50:49 -070050 std::string GetDeviceRpcId();
51
Chris Masone2b105542011-06-22 10:58:09 -070052 CellularRefPtr cellular_;
Chris Masone3bd3c8c2011-06-13 08:20:26 -070053 const std::string type_;
54 DISALLOW_COPY_AND_ASSIGN(CellularService);
55};
56
57} // namespace shill
58
59#endif // SHILL_CELLULAR_SERVICE_