blob: 45307e0081c6cdc72c9225d9f22eb0810dde5439 [file] [log] [blame]
Gaurav Shah6d2c72d2012-10-16 16:30:44 -07001// 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#ifndef SHILL_GEOLOCATION_INFO_
6#define SHILL_GEOLOCATION_INFO_
7
8#include <map>
9#include <string>
10
11#include <gtest/gtest_prod.h> // for FRIEND_TEST
12
13namespace shill {
14
15class WiFiMainTest;
16
17// This class stores properties (key-value pairs) for a single entity
18// (e.g. a WiFi access point) that may be used for geolocation.
19class GeolocationInfo {
20 public:
21 GeolocationInfo();
22 ~GeolocationInfo();
23
24 void AddField(const std::string &key, const std::string &value);
25 const std::string &GetFieldValue(const std::string &key) const;
26 private:
27 FRIEND_TEST(WiFiMainTest, GetGeolocationObjects);
28
29 // An equality testing helper for unit tests.
30 bool Equals(const GeolocationInfo &info) const;
31
32 std::map<std::string, std::string> properties_;
33};
34
35} // namespace shill
36
37#endif // SHILL_GEOLOCATION_INFO_