• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Copyright (C) 2012 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 //
16 
17 #include "shill/geolocation_info.h"
18 
19 #include <string>
20 
21 namespace shill {
22 
23 using std::string;
24 
GeolocationInfo()25 GeolocationInfo::GeolocationInfo() {
26 }
27 
~GeolocationInfo()28 GeolocationInfo::~GeolocationInfo() {
29 }
30 
AddField(const string & key,const string & value)31 void GeolocationInfo::AddField(const string& key,
32                                const string& value) {
33   properties_[key] = value;
34 }
35 
GetFieldValue(const string & key) const36 const string& GeolocationInfo::GetFieldValue(
37     const string& key) const {
38   return properties_.find(key)->second;
39 }
40 
Equals(const GeolocationInfo & info) const41 bool GeolocationInfo::Equals(const GeolocationInfo& info) const {
42   return properties_ == info.properties_;
43 }
44 
45 }  // namespace shill
46