1// Copyright (c) 2012 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 CHROME_BROWSER_DRIVE_DUMMY_DRIVE_SERVICE_H_
6#define CHROME_BROWSER_DRIVE_DUMMY_DRIVE_SERVICE_H_
7
8#include "chrome/browser/drive/drive_service_interface.h"
9#include "chrome/browser/google_apis/auth_service_interface.h"
10
11namespace drive {
12
13// Dummy implementation of DriveServiceInterface.
14// All functions do nothing, or return place holder values like 'true'.
15class DummyDriveService : public DriveServiceInterface {
16 public:
17  DummyDriveService();
18  virtual ~DummyDriveService();
19
20  // DriveServiceInterface Overrides
21  virtual void Initialize() OVERRIDE;
22  virtual void AddObserver(DriveServiceObserver* observer) OVERRIDE;
23  virtual void RemoveObserver(DriveServiceObserver* observer) OVERRIDE;
24  virtual bool CanSendRequest() const OVERRIDE;
25  virtual std::string CanonicalizeResourceId(
26      const std::string& resource_id) const OVERRIDE;
27  virtual bool HasAccessToken() const OVERRIDE;
28  virtual void RequestAccessToken(
29      const google_apis::AuthStatusCallback& callback) OVERRIDE;
30  virtual bool HasRefreshToken() const OVERRIDE;
31  virtual void ClearAccessToken() OVERRIDE;
32  virtual void ClearRefreshToken() OVERRIDE;
33  virtual std::string GetRootResourceId() const OVERRIDE;
34  virtual google_apis::CancelCallback GetAllResourceList(
35      const google_apis::GetResourceListCallback& callback) OVERRIDE;
36  virtual google_apis::CancelCallback GetResourceListInDirectory(
37      const std::string& directory_resource_id,
38      const google_apis::GetResourceListCallback& callback) OVERRIDE;
39  virtual google_apis::CancelCallback Search(
40      const std::string& search_query,
41      const google_apis::GetResourceListCallback& callback) OVERRIDE;
42  virtual google_apis::CancelCallback SearchByTitle(
43      const std::string& title,
44      const std::string& directory_resource_id,
45      const google_apis::GetResourceListCallback& callback) OVERRIDE;
46  virtual google_apis::CancelCallback GetChangeList(
47      int64 start_changestamp,
48      const google_apis::GetResourceListCallback& callback) OVERRIDE;
49  virtual google_apis::CancelCallback ContinueGetResourceList(
50      const GURL& override_url,
51      const google_apis::GetResourceListCallback& callback) OVERRIDE;
52  virtual google_apis::CancelCallback GetResourceEntry(
53      const std::string& resource_id,
54      const google_apis::GetResourceEntryCallback& callback) OVERRIDE;
55  virtual google_apis::CancelCallback GetShareUrl(
56      const std::string& resource_id,
57      const GURL& embed_origin,
58      const google_apis::GetShareUrlCallback& callback) OVERRIDE;
59  virtual google_apis::CancelCallback GetAboutResource(
60      const google_apis::GetAboutResourceCallback& callback) OVERRIDE;
61  virtual google_apis::CancelCallback GetAppList(
62      const google_apis::GetAppListCallback& callback) OVERRIDE;
63  virtual google_apis::CancelCallback DeleteResource(
64      const std::string& resource_id,
65      const std::string& etag,
66      const google_apis::EntryActionCallback& callback) OVERRIDE;
67  virtual google_apis::CancelCallback DownloadFile(
68      const base::FilePath& local_cache_path,
69      const std::string& resource_id,
70      const google_apis::DownloadActionCallback& download_action_callback,
71      const google_apis::GetContentCallback& get_content_callback,
72      const google_apis::ProgressCallback& progress_callback) OVERRIDE;
73  virtual google_apis::CancelCallback CopyResource(
74      const std::string& resource_id,
75      const std::string& parent_resource_id,
76      const std::string& new_title,
77      const google_apis::GetResourceEntryCallback& callback) OVERRIDE;
78  virtual google_apis::CancelCallback CopyHostedDocument(
79      const std::string& resource_id,
80      const std::string& new_title,
81      const google_apis::GetResourceEntryCallback& callback) OVERRIDE;
82  virtual google_apis::CancelCallback RenameResource(
83      const std::string& resource_id,
84      const std::string& new_title,
85      const google_apis::EntryActionCallback& callback) OVERRIDE;
86  virtual google_apis::CancelCallback TouchResource(
87      const std::string& resource_id,
88      const base::Time& modified_date,
89      const base::Time& last_viewed_by_me_date,
90      const google_apis::GetResourceEntryCallback& callback) OVERRIDE;
91  virtual google_apis::CancelCallback AddResourceToDirectory(
92      const std::string& parent_resource_id,
93      const std::string& resource_id,
94      const google_apis::EntryActionCallback& callback) OVERRIDE;
95  virtual google_apis::CancelCallback RemoveResourceFromDirectory(
96      const std::string& parent_resource_id,
97      const std::string& resource_id,
98      const google_apis::EntryActionCallback& callback) OVERRIDE;
99  virtual google_apis::CancelCallback AddNewDirectory(
100      const std::string& parent_resource_id,
101      const std::string& directory_title,
102      const google_apis::GetResourceEntryCallback& callback) OVERRIDE;
103  virtual google_apis::CancelCallback InitiateUploadNewFile(
104      const std::string& content_type,
105      int64 content_length,
106      const std::string& parent_resource_id,
107      const std::string& title,
108      const google_apis::InitiateUploadCallback& callback) OVERRIDE;
109  virtual google_apis::CancelCallback InitiateUploadExistingFile(
110      const std::string& content_type,
111      int64 content_length,
112      const std::string& resource_id,
113      const std::string& etag,
114      const google_apis::InitiateUploadCallback& callback) OVERRIDE;
115  virtual google_apis::CancelCallback ResumeUpload(
116      const GURL& upload_url,
117      int64 start_position,
118      int64 end_position,
119      int64 content_length,
120      const std::string& content_type,
121      const base::FilePath& local_file_path,
122      const google_apis::UploadRangeCallback& callback,
123      const google_apis::ProgressCallback& progress_callback) OVERRIDE;
124  virtual google_apis::CancelCallback GetUploadStatus(
125      const GURL& upload_url,
126      int64 content_length,
127      const google_apis::UploadRangeCallback& callback) OVERRIDE;
128  virtual google_apis::CancelCallback AuthorizeApp(
129      const std::string& resource_id,
130      const std::string& app_id,
131      const google_apis::AuthorizeAppCallback& callback) OVERRIDE;
132};
133
134}  // namespace drive
135
136#endif  // CHROME_BROWSER_DRIVE_DUMMY_DRIVE_SERVICE_H_
137