chromium/components/gcm_driver/registration_info.h

// Copyright 2015 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef COMPONENTS_GCM_DRIVER_REGISTRATION_INFO_H_
#define COMPONENTS_GCM_DRIVER_REGISTRATION_INFO_H_

#include <map>
#include <memory>
#include <string>
#include <vector>

#include "base/memory/ref_counted.h"
#include "base/time/time.h"

namespace gcm  {

// Encapsulates the information needed to register with the server.
struct RegistrationInfo : public base::RefCounted<RegistrationInfo> {};

// For GCM registration.
struct GCMRegistrationInfo final : public RegistrationInfo {};

// For InstanceID token retrieval.
struct InstanceIDTokenInfo final : public RegistrationInfo {};

struct RegistrationInfoComparer {};

// Collection of registration info.
// Map from RegistrationInfo instance to registration ID.
RegistrationInfoMap;

// Returns true if a GCM registration for |app_id| exists in |map|.
bool ExistsGCMRegistrationInMap(const RegistrationInfoMap& map,
                                const std::string& app_id);

}  // namespace gcm

#endif  // COMPONENTS_GCM_DRIVER_REGISTRATION_INFO_H_