blob: 4a32f772250c99f921b201123ce764c11be4c00d [file] [log] [blame]
[email protected]e4097c82013-11-08 00:16:121// Copyright 2013 The Chromium 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 GOOGLE_APIS_GCM_GCM_CLIENT_IMPL_H_
6#define GOOGLE_APIS_GCM_GCM_CLIENT_IMPL_H_
7
8#include "base/compiler_specific.h"
[email protected]79994f42014-01-16 16:05:369#include "base/memory/ref_counted.h"
10#include "base/memory/scoped_ptr.h"
[email protected]e4097c82013-11-08 00:16:1211#include "google_apis/gcm/gcm_client.h"
12
[email protected]79994f42014-01-16 16:05:3613namespace base {
14class FilePath;
15class SequencedTaskRunner;
16} // namespace base
17
[email protected]e4097c82013-11-08 00:16:1218namespace gcm {
19
[email protected]79994f42014-01-16 16:05:3620class GCMStore;
21class UserList;
22
[email protected]0db118222014-01-22 01:37:5923class GCM_EXPORT GCMClientImpl : public GCMClient {
[email protected]e4097c82013-11-08 00:16:1224 public:
25 GCMClientImpl();
26 virtual ~GCMClientImpl();
27
[email protected]79994f42014-01-16 16:05:3628 void Initialize(
29 const base::FilePath& path,
30 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner);
31
[email protected]e4097c82013-11-08 00:16:1232 // Overridden from GCMClient:
[email protected]1b1c3cdc2013-12-17 18:40:0433 virtual void SetUserDelegate(const std::string& username,
34 Delegate* delegate) OVERRIDE;
35 virtual void CheckIn(const std::string& username) OVERRIDE;
[email protected]e4097c82013-11-08 00:16:1236 virtual void Register(const std::string& username,
37 const std::string& app_id,
38 const std::string& cert,
39 const std::vector<std::string>& sender_ids) OVERRIDE;
40 virtual void Unregister(const std::string& username,
41 const std::string& app_id) OVERRIDE;
42 virtual void Send(const std::string& username,
43 const std::string& app_id,
44 const std::string& receiver_id,
45 const OutgoingMessage& message) OVERRIDE;
46 virtual bool IsLoading() const OVERRIDE;
47
48 private:
[email protected]79994f42014-01-16 16:05:3649 scoped_ptr<GCMStore> gcm_store_;
50 scoped_ptr<UserList> user_list_;
51
[email protected]e4097c82013-11-08 00:16:1252 DISALLOW_COPY_AND_ASSIGN(GCMClientImpl);
53};
54
55} // namespace gcm
56
57#endif // GOOGLE_APIS_GCM_GCM_CLIENT_IMPL_H_