OLD | NEW |
---|---|
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 Loading... | |
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 | |
satorux1
2012/08/14 13:17:21
Do we need to say V2? The public documentation doe
kochi
2012/08/15 04:17:17
The Drive V1 API is so poor that only file access
| |
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, | |
satorux1
2012/08/14 13:17:21
GetFileList?
kochi
2012/08/15 04:17:18
This convention is following GetChangelist() above
| |
111 const std::string& search_query, | |
112 const GetDataCallback& callback) = 0; | |
satorux1
2012/08/14 13:17:21
Would it be difficult to create a new file like dr
kochi
2012/08/15 04:17:18
Filed http://crbug.com/142809
I'll work on it.
| |
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. | |
satorux1
2012/08/14 13:17:21
reference URL? Is this also Drive API?
kochi
2012/08/15 04:17:18
Done.
| |
123 virtual void GetFile(const std::string& file_id, | |
124 const GetDataCallback& callback) = 0; | |
125 | |
111 // Gets the account metadata from the server using the default account | 126 // Gets the account metadata from the server using the default account |
112 // metadata URL. Upon completion, invokes |callback| with results on the | 127 // metadata URL. Upon completion, invokes |callback| with results on the |
113 // calling thread. | 128 // calling thread. |
114 virtual void GetAccountMetadata(const GetDataCallback& callback) = 0; | 129 virtual void GetAccountMetadata(const GetDataCallback& callback) = 0; |
115 | 130 |
116 // Gets the About resource from the server for the current account. | 131 // Gets the About resource from the server for the current account. |
117 // Upon completion, invokes |callback| with results on the calling thread. | 132 // Upon completion, invokes |callback| with results on the calling thread. |
118 // (For Drive V2 API only) | 133 // (For Drive V2 API only) |
119 virtual void GetAboutResource(const GetDataCallback& callback) = 0; | 134 virtual void GetAboutResource(const GetDataCallback& callback) = 0; |
120 | 135 |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
222 // DocumentsServiceInterface Overrides | 237 // DocumentsServiceInterface Overrides |
223 virtual void Initialize(Profile* profile) OVERRIDE; | 238 virtual void Initialize(Profile* profile) OVERRIDE; |
224 virtual GDataOperationRegistry* operation_registry() const OVERRIDE; | 239 virtual GDataOperationRegistry* operation_registry() const OVERRIDE; |
225 virtual void CancelAll() OVERRIDE; | 240 virtual void CancelAll() OVERRIDE; |
226 virtual void Authenticate(const AuthStatusCallback& callback) OVERRIDE; | 241 virtual void Authenticate(const AuthStatusCallback& callback) OVERRIDE; |
227 virtual void GetDocuments(const GURL& feed_url, | 242 virtual void GetDocuments(const GURL& feed_url, |
228 int start_changestamp, | 243 int start_changestamp, |
229 const std::string& search_query, | 244 const std::string& search_query, |
230 const std::string& directory_resource_id, | 245 const std::string& directory_resource_id, |
231 const GetDataCallback& callback) OVERRIDE; | 246 const GetDataCallback& callback) OVERRIDE; |
247 virtual void GetFilelist(const GURL& url, | |
248 const std::string& search_query, | |
249 const GetDataCallback& callback) OVERRIDE; | |
232 virtual void GetChangelist(const GURL& url, | 250 virtual void GetChangelist(const GURL& url, |
233 int64 start_changestamp, | 251 int64 start_changestamp, |
234 const GetDataCallback& callback) OVERRIDE; | 252 const GetDataCallback& callback) OVERRIDE; |
235 virtual void GetDocumentEntry(const std::string& resource_id, | 253 virtual void GetDocumentEntry(const std::string& resource_id, |
236 const GetDataCallback& callback) OVERRIDE; | 254 const GetDataCallback& callback) OVERRIDE; |
255 virtual void GetFile(const std::string& file_id, | |
256 const GetDataCallback& callback) OVERRIDE; | |
237 | 257 |
238 virtual void GetAccountMetadata(const GetDataCallback& callback) OVERRIDE; | 258 virtual void GetAccountMetadata(const GetDataCallback& callback) OVERRIDE; |
239 virtual void GetAboutResource(const GetDataCallback& callback) OVERRIDE; | 259 virtual void GetAboutResource(const GetDataCallback& callback) OVERRIDE; |
240 virtual void GetApplicationList(const GetDataCallback& callback) OVERRIDE; | 260 virtual void GetApplicationList(const GetDataCallback& callback) OVERRIDE; |
241 virtual void DeleteDocument(const GURL& document_url, | 261 virtual void DeleteDocument(const GURL& document_url, |
242 const EntryActionCallback& callback) OVERRIDE; | 262 const EntryActionCallback& callback) OVERRIDE; |
243 virtual void DownloadDocument( | 263 virtual void DownloadDocument( |
244 const FilePath& virtual_path, | 264 const FilePath& virtual_path, |
245 const FilePath& local_cache_path, | 265 const FilePath& local_cache_path, |
246 const GURL& content_url, | 266 const GURL& content_url, |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
284 Profile* profile_; | 304 Profile* profile_; |
285 | 305 |
286 scoped_ptr<GDataOperationRunner> runner_; | 306 scoped_ptr<GDataOperationRunner> runner_; |
287 | 307 |
288 DISALLOW_COPY_AND_ASSIGN(DocumentsService); | 308 DISALLOW_COPY_AND_ASSIGN(DocumentsService); |
289 }; | 309 }; |
290 | 310 |
291 } // namespace gdata | 311 } // namespace gdata |
292 | 312 |
293 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_DOCUMENTS_SERVICE_H_ | 313 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_DOCUMENTS_SERVICE_H_ |
OLD | NEW |