blob: f748377b155bf10f684bd5eee4b293a31c135122 [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
13#include "shill/cellular.h"
Chris Masone2b105542011-06-22 10:58:09 -070014#include "shill/refptr_types.h"
Chris Masone3bd3c8c2011-06-13 08:20:26 -070015#include "shill/shill_event.h"
16#include "shill/service.h"
17
18namespace shill {
19
Chris Masone3bd3c8c2011-06-13 08:20:26 -070020class CellularService : public Service {
21 public:
22 CellularService(ControlInterface *control_interface,
23 EventDispatcher *dispatcher,
Chris Masone2b105542011-06-22 10:58:09 -070024 const CellularRefPtr &device,
Chris Masone3bd3c8c2011-06-13 08:20:26 -070025 const std::string& name);
26 ~CellularService();
27 void Connect();
28 void Disconnect();
29
Chris Masone3bd3c8c2011-06-13 08:20:26 -070030 protected:
31 virtual std::string CalculateState() { return "idle"; }
32
33 // Properties
34 std::string activation_state_;
35 std::string operator_name_;
36 std::string operator_code_;
37 std::string network_tech_;
38 std::string roaming_state_;
39 std::string payment_url_;
40 uint8 strength_;
41
42 std::map<std::string, std::string> apn_info_;
43 std::map<std::string, std::string> last_good_apn_info_;
44
45 private:
Chris Masone2b105542011-06-22 10:58:09 -070046 CellularRefPtr cellular_;
Chris Masone3bd3c8c2011-06-13 08:20:26 -070047 const std::string type_;
48 DISALLOW_COPY_AND_ASSIGN(CellularService);
49};
50
51} // namespace shill
52
53#endif // SHILL_CELLULAR_SERVICE_