Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(373)

Side by Side Diff: chrome/browser/chromeos/gdata/gdata_documents_service.h

Issue 10830300: Add GetFilelist/GetFile operations for Drive V2 API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix for comments. Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_DOCUMENTS_SERVICE_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_DOCUMENTS_SERVICE_H_
6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_DOCUMENTS_SERVICE_H_ 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_DOCUMENTS_SERVICE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 // Fetches a changelist from |url| with |start_changestamp|, using Drive V2 95 // Fetches a changelist from |url| with |start_changestamp|, using Drive V2
96 // API. If this URL is empty the call will use the default URL. Specify |url| 96 // API. If this URL is empty the call will use the default URL. Specify |url|
97 // when pagenated request should be issued. 97 // when pagenated request should be issued.
98 // |start_changestamp| specifies the starting point of change list or 0 if 98 // |start_changestamp| specifies the starting point of change list or 0 if
99 // all changes are necessary. 99 // all changes are necessary.
100 // Upon completion, invokes |callback| with results on calling thread. 100 // Upon completion, invokes |callback| with results on calling thread.
101 virtual void GetChangelist(const GURL& url, 101 virtual void GetChangelist(const GURL& url,
102 int64 start_changestamp, 102 int64 start_changestamp,
103 const GetDataCallback& callback) = 0; 103 const GetDataCallback& callback) = 0;
104 104
105 // Fetches a filelist from |url| with |search_query|, using Drive V2 API. If
106 // this URL is empty the call will use the default URL. Specify |url| when
107 // pagenated request should be issued.
108 // |search_query| specifies query string, whose syntax is described at
109 // https://developers.google.com/drive/search-parameters
110 virtual void GetFilelist(const GURL& url,
111 const std::string& search_query,
112 const GetDataCallback& callback) = 0;
113
105 // Fetches single entry metadata from server. The entry's resource id equals 114 // Fetches single entry metadata from server. The entry's resource id equals
106 // |resource_id|. 115 // |resource_id|.
107 // Upon completion, invokes |callback| with results on the calling thread. 116 // Upon completion, invokes |callback| with results on the calling thread.
108 virtual void GetDocumentEntry(const std::string& resource_id, 117 virtual void GetDocumentEntry(const std::string& resource_id,
109 const GetDataCallback& callback) = 0; 118 const GetDataCallback& callback) = 0;
110 119
120 // Fetches single entry metadata from server. The entry's file id equals
121 // |file_id|.
122 // Upon completion, invokes |callback| with results on the calling thread.
123 // https://developers.google.com/drive/v2/reference/files/get
124 virtual void GetFile(const std::string& file_id,
125 const GetDataCallback& callback) = 0;
126
111 // Gets the account metadata from the server using the default account 127 // Gets the account metadata from the server using the default account
112 // metadata URL. Upon completion, invokes |callback| with results on the 128 // metadata URL. Upon completion, invokes |callback| with results on the
113 // calling thread. 129 // calling thread.
114 virtual void GetAccountMetadata(const GetDataCallback& callback) = 0; 130 virtual void GetAccountMetadata(const GetDataCallback& callback) = 0;
115 131
116 // Gets the About resource from the server for the current account. 132 // Gets the About resource from the server for the current account.
117 // Upon completion, invokes |callback| with results on the calling thread. 133 // Upon completion, invokes |callback| with results on the calling thread.
118 // (For Drive V2 API only) 134 // (For Drive V2 API only)
119 virtual void GetAboutResource(const GetDataCallback& callback) = 0; 135 virtual void GetAboutResource(const GetDataCallback& callback) = 0;
120 136
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 // DocumentsServiceInterface Overrides 238 // DocumentsServiceInterface Overrides
223 virtual void Initialize(Profile* profile) OVERRIDE; 239 virtual void Initialize(Profile* profile) OVERRIDE;
224 virtual GDataOperationRegistry* operation_registry() const OVERRIDE; 240 virtual GDataOperationRegistry* operation_registry() const OVERRIDE;
225 virtual void CancelAll() OVERRIDE; 241 virtual void CancelAll() OVERRIDE;
226 virtual void Authenticate(const AuthStatusCallback& callback) OVERRIDE; 242 virtual void Authenticate(const AuthStatusCallback& callback) OVERRIDE;
227 virtual void GetDocuments(const GURL& feed_url, 243 virtual void GetDocuments(const GURL& feed_url,
228 int start_changestamp, 244 int start_changestamp,
229 const std::string& search_query, 245 const std::string& search_query,
230 const std::string& directory_resource_id, 246 const std::string& directory_resource_id,
231 const GetDataCallback& callback) OVERRIDE; 247 const GetDataCallback& callback) OVERRIDE;
248 virtual void GetFilelist(const GURL& url,
249 const std::string& search_query,
250 const GetDataCallback& callback) OVERRIDE;
232 virtual void GetChangelist(const GURL& url, 251 virtual void GetChangelist(const GURL& url,
233 int64 start_changestamp, 252 int64 start_changestamp,
234 const GetDataCallback& callback) OVERRIDE; 253 const GetDataCallback& callback) OVERRIDE;
235 virtual void GetDocumentEntry(const std::string& resource_id, 254 virtual void GetDocumentEntry(const std::string& resource_id,
236 const GetDataCallback& callback) OVERRIDE; 255 const GetDataCallback& callback) OVERRIDE;
256 virtual void GetFile(const std::string& file_id,
257 const GetDataCallback& callback) OVERRIDE;
237 258
238 virtual void GetAccountMetadata(const GetDataCallback& callback) OVERRIDE; 259 virtual void GetAccountMetadata(const GetDataCallback& callback) OVERRIDE;
239 virtual void GetAboutResource(const GetDataCallback& callback) OVERRIDE; 260 virtual void GetAboutResource(const GetDataCallback& callback) OVERRIDE;
240 virtual void GetApplicationList(const GetDataCallback& callback) OVERRIDE; 261 virtual void GetApplicationList(const GetDataCallback& callback) OVERRIDE;
241 virtual void DeleteDocument(const GURL& document_url, 262 virtual void DeleteDocument(const GURL& document_url,
242 const EntryActionCallback& callback) OVERRIDE; 263 const EntryActionCallback& callback) OVERRIDE;
243 virtual void DownloadDocument( 264 virtual void DownloadDocument(
244 const FilePath& virtual_path, 265 const FilePath& virtual_path,
245 const FilePath& local_cache_path, 266 const FilePath& local_cache_path,
246 const GURL& content_url, 267 const GURL& content_url,
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 Profile* profile_; 305 Profile* profile_;
285 306
286 scoped_ptr<GDataOperationRunner> runner_; 307 scoped_ptr<GDataOperationRunner> runner_;
287 308
288 DISALLOW_COPY_AND_ASSIGN(DocumentsService); 309 DISALLOW_COPY_AND_ASSIGN(DocumentsService);
289 }; 310 };
290 311
291 } // namespace gdata 312 } // namespace gdata
292 313
293 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_DOCUMENTS_SERVICE_H_ 314 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_DOCUMENTS_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/gdata/drive_api_operations.cc ('k') | chrome/browser/chromeos/gdata/gdata_documents_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698