Gaurav Shah | 6d2c72d | 2012-10-16 16:30:44 -0700 | [diff] [blame^] | 1 | // Copyright (c) 2012 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 | #include "shill/geolocation_info.h" |
| 6 | |
| 7 | #include <map> |
| 8 | #include <string> |
| 9 | |
| 10 | namespace shill { |
| 11 | |
| 12 | using std::string; |
| 13 | |
| 14 | GeolocationInfo::GeolocationInfo() { |
| 15 | } |
| 16 | |
| 17 | GeolocationInfo::~GeolocationInfo() { |
| 18 | } |
| 19 | |
| 20 | void GeolocationInfo::AddField(const std::string &key, |
| 21 | const std::string &value) { |
| 22 | properties_[key] = value; |
| 23 | } |
| 24 | |
| 25 | const std::string &GeolocationInfo::GetFieldValue( |
| 26 | const std::string &key) const { |
| 27 | return properties_.find(key)->second; |
| 28 | } |
| 29 | |
| 30 | bool GeolocationInfo::Equals(const GeolocationInfo &info) const{ |
| 31 | return properties_ == info.properties_; |
| 32 | } |
| 33 | |
| 34 | } // namespace shill |