OLD | NEW |
(Empty) | |
| 1 // 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_MANAGER_ |
| 6 #define SHILL_MANAGER_ |
| 7 |
| 8 #include "shill/resource.h" |
| 9 #include "shill/shill_event.h" |
| 10 |
| 11 namespace shill { |
| 12 |
| 13 class Connection; |
| 14 class Configuration; |
| 15 class Device; |
| 16 class Endpoint; |
| 17 |
| 18 class Service : public Resource { |
| 19 public: |
| 20 // A constructor for the Service object |
| 21 explicit Service(ControlInterface *control_interface, |
| 22 EventDispatcher *dispatcher); |
| 23 ~Service(); |
| 24 void Connnect(); |
| 25 void Disconnect(); |
| 26 enum ConnectState { |
| 27 kServiceStateUnknown, |
| 28 kServiceStateIdle, |
| 29 kServiceStateAssociating, |
| 30 kServiceStateConfiguring, |
| 31 kServiceStateConnected, |
| 32 kServiceStateDisconnected, |
| 33 kServiceStateFailure |
| 34 }; |
| 35 enum ConnectFailure { |
| 36 kServiceFailureUnknown, |
| 37 kServiceFailureActivationFailure, |
| 38 kServiceFailureOutOfRange, |
| 39 kServiceFailurePinMissing, |
| 40 kServiceFailureConfigurationFailed, |
| 41 kServiceFailureBadCredentials, |
| 42 kServiceFailureNeedEVDO, |
| 43 kServiceFailureNeedHomeNetwork, |
| 44 kServiceFailureOTASPFailure, |
| 45 kServiceFailureAAAFailure |
| 46 }; |
| 47 |
| 48 private: |
| 49 string name_; |
| 50 bool available_; |
| 51 bool configured_; |
| 52 bool auto_connect_; |
| 53 Configuration *configuration_; |
| 54 Connection *connection_; |
| 55 Device *interface_; |
| 56 Endpoint *endpoint_; |
| 57 ServiceProxyInterface *proxy_; |
| 58 friend class ServiceProxyInterface; |
| 59 }; |
| 60 |
| 61 } // namespace shill |
| 62 |
| 63 #endif // SHILL_SERVICE_ |
OLD | NEW |