Thieu Le | 3426c8f | 2012-01-11 17:35:11 -0800 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium OS Authors. All rights reserved. |
Chris Masone | 6515aab | 2011-10-12 16:19:09 -0700 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include "shill/service_under_test.h" |
| 6 | |
| 7 | #include <string> |
| 8 | |
| 9 | #include "shill/mock_adaptors.h" |
| 10 | |
| 11 | using std::string; |
| 12 | |
| 13 | namespace shill { |
| 14 | |
| 15 | // static |
Jason Glasgow | acdc11f | 2012-03-30 14:12:22 -0400 | [diff] [blame] | 16 | const char ServiceUnderTest::kRpcId[] = "/mock_device_rpc"; |
Paul Stewart | 99dc9f3 | 2013-06-27 07:39:25 -0700 | [diff] [blame] | 17 | const char ServiceUnderTest::kStringsProperty[] = "strings"; |
Chris Masone | 6515aab | 2011-10-12 16:19:09 -0700 | [diff] [blame] | 18 | const char ServiceUnderTest::kStorageId[] = "service"; |
| 19 | |
| 20 | ServiceUnderTest::ServiceUnderTest(ControlInterface *control_interface, |
| 21 | EventDispatcher *dispatcher, |
Thieu Le | 3426c8f | 2012-01-11 17:35:11 -0800 | [diff] [blame] | 22 | Metrics *metrics, |
Chris Masone | 6515aab | 2011-10-12 16:19:09 -0700 | [diff] [blame] | 23 | Manager *manager) |
Thieu Le | 3426c8f | 2012-01-11 17:35:11 -0800 | [diff] [blame] | 24 | : Service(control_interface, dispatcher, metrics, manager, |
| 25 | Technology::kUnknown) { |
Paul Stewart | 99dc9f3 | 2013-06-27 07:39:25 -0700 | [diff] [blame] | 26 | this->mutable_store()->RegisterStrings(kStringsProperty, &strings_); |
Chris Masone | 6515aab | 2011-10-12 16:19:09 -0700 | [diff] [blame] | 27 | } |
| 28 | |
| 29 | ServiceUnderTest::~ServiceUnderTest() {} |
| 30 | |
Chris Masone | 6515aab | 2011-10-12 16:19:09 -0700 | [diff] [blame] | 31 | string ServiceUnderTest::GetRpcIdentifier() const { |
| 32 | return ServiceMockAdaptor::kRpcId; |
| 33 | } |
| 34 | |
Paul Stewart | 1cf7eb8 | 2013-12-03 19:34:36 -0800 | [diff] [blame] | 35 | string ServiceUnderTest::GetDeviceRpcId(Error */*error*/) const { |
| 36 | return kRpcId; |
| 37 | } |
Chris Masone | 6515aab | 2011-10-12 16:19:09 -0700 | [diff] [blame] | 38 | |
| 39 | string ServiceUnderTest::GetStorageIdentifier() const { return kStorageId; } |
| 40 | |
| 41 | } // namespace shill |