blob: 8a88dcdcd1c88f12e7d49c8c141c87180259d27e [file] [log] [blame]
//
// Copyright (C) 2012 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#ifndef SHILL_GEOLOCATION_INFO_H_
#define SHILL_GEOLOCATION_INFO_H_
#include <map>
#include <string>
#include <base/time/time.h>
namespace shill {
// Geolocation property field names are defined by those kGeo* constants in
// <chromiumos>/src/platform/system_api/dbus/shill/dbus-constants.h.
using GeolocationInfo = std::map<std::string, std::string>;
// Helper functions to serialize and transform the last-seen time for a
// geolocation object, so up-to-date age values can be returned over D-Bus.
void AddLastSeenTime(GeolocationInfo* info, const base::TimeTicks& time);
GeolocationInfo PrepareGeolocationInfoForExport(const GeolocationInfo& info);
} // namespace shill
#endif // SHILL_GEOLOCATION_INFO_H_