Peter Qiu | c0beca5 | 2015-09-03 11:25:46 -0700 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2015 The Android Open Source Project |
| 3 | // |
| 4 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | // you may not use this file except in compliance with the License. |
| 6 | // You may obtain a copy of the License at |
| 7 | // |
| 8 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | // |
| 10 | // Unless required by applicable law or agreed to in writing, software |
| 11 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | // See the License for the specific language governing permissions and |
| 14 | // limitations under the License. |
| 15 | // |
Peter Qiu | 6fc1a8c | 2015-04-28 15:47:37 -0700 | [diff] [blame] | 16 | |
| 17 | #include "shill/ethernet/ethernet_temporary_service.h" |
| 18 | |
| 19 | #include <string> |
| 20 | |
| 21 | #include "shill/control_interface.h" |
Peter Qiu | 6fc1a8c | 2015-04-28 15:47:37 -0700 | [diff] [blame] | 22 | #include "shill/event_dispatcher.h" |
| 23 | #include "shill/manager.h" |
| 24 | #include "shill/metrics.h" |
| 25 | |
| 26 | using std::string; |
| 27 | |
| 28 | namespace shill { |
| 29 | |
| 30 | EthernetTemporaryService::EthernetTemporaryService( |
Paul Stewart | 7e779d8 | 2015-06-16 13:13:10 -0700 | [diff] [blame] | 31 | ControlInterface* control_interface, |
| 32 | EventDispatcher* dispatcher, |
| 33 | Metrics* metrics, |
| 34 | Manager* manager, |
| 35 | const string& storage_identifier) |
Peter Qiu | 6fc1a8c | 2015-04-28 15:47:37 -0700 | [diff] [blame] | 36 | : Service(control_interface, |
| 37 | dispatcher, metrics, |
| 38 | manager, |
| 39 | Technology::kEthernet), |
| 40 | storage_identifier_(storage_identifier) { |
| 41 | set_friendly_name("Ethernet"); |
| 42 | } |
| 43 | |
| 44 | EthernetTemporaryService::~EthernetTemporaryService() {} |
| 45 | |
Paul Stewart | 7e779d8 | 2015-06-16 13:13:10 -0700 | [diff] [blame] | 46 | std::string EthernetTemporaryService::GetDeviceRpcId(Error* /*error*/) const { |
Peter Qiu | e5fe58d | 2015-08-12 15:21:56 -0700 | [diff] [blame] | 47 | return control_interface()->NullRPCIdentifier(); |
Peter Qiu | 6fc1a8c | 2015-04-28 15:47:37 -0700 | [diff] [blame] | 48 | } |
| 49 | |
| 50 | string EthernetTemporaryService::GetStorageIdentifier() const { |
| 51 | return storage_identifier_; |
| 52 | } |
| 53 | |
| 54 | bool EthernetTemporaryService::IsVisible() const { |
| 55 | return false; |
| 56 | } |
| 57 | |
| 58 | } // namespace shill |