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_OPERATIONS_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_OPERATIONS_H_ |
6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_OPERATIONS_H_ | 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_OPERATIONS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "chrome/browser/chromeos/gdata/operations_base.h" | 11 #include "chrome/browser/chromeos/gdata/operations_base.h" |
12 | 12 |
13 namespace gdata { | 13 namespace gdata { |
14 | 14 |
15 //============================ GetDocumentsOperation =========================== | 15 //============================ GetDocumentsOperation =========================== |
16 | 16 |
17 // This class performs the operation for fetching a document list. | 17 // This class performs the operation for fetching a document list. |
18 class GetDocumentsOperation : public GetDataOperation { | 18 class GetDocumentsOperation : public GetDataOperation { |
19 public: | 19 public: |
| 20 // |start_changestamp| specifies the starting point of change list or 0 if |
| 21 // all changes are necessary. |
| 22 // |url| specifies URL for documents feed fetching operation. If empty URL is |
| 23 // passed, the default URL is used and returns the first page of the result. |
| 24 // When non-first page result is requested, |url| should be specified. |
20 GetDocumentsOperation(GDataOperationRegistry* registry, | 25 GetDocumentsOperation(GDataOperationRegistry* registry, |
| 26 const GURL& url, |
21 int start_changestamp, | 27 int start_changestamp, |
22 const std::string& search_string, | 28 const std::string& search_string, |
23 const std::string& directory_resource_id, | 29 const std::string& directory_resource_id, |
24 const GetDataCallback& callback); | 30 const GetDataCallback& callback); |
25 virtual ~GetDocumentsOperation(); | 31 virtual ~GetDocumentsOperation(); |
26 | 32 |
27 // Sets |url| for document fetching operation. This URL should be set in use | |
28 // case when additional 'pages' of document lists are being fetched. | |
29 void SetUrl(const GURL& url); | |
30 | |
31 protected: | 33 protected: |
32 // Overridden from GetDataOperation. | 34 // Overridden from GetDataOperation. |
33 virtual GURL GetURL() const OVERRIDE; | 35 virtual GURL GetURL() const OVERRIDE; |
34 | 36 |
35 private: | 37 private: |
36 GURL override_url_; | 38 GURL override_url_; |
37 int start_changestamp_; | 39 int start_changestamp_; |
38 std::string search_string_; | 40 std::string search_string_; |
39 std::string directory_resource_id_; | 41 std::string directory_resource_id_; |
40 | 42 |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 | 424 |
423 // Callback to which the photo data is passed. | 425 // Callback to which the photo data is passed. |
424 GetDownloadDataCallback callback_; | 426 GetDownloadDataCallback callback_; |
425 | 427 |
426 DISALLOW_COPY_AND_ASSIGN(GetContactPhotoOperation); | 428 DISALLOW_COPY_AND_ASSIGN(GetContactPhotoOperation); |
427 }; | 429 }; |
428 | 430 |
429 } // namespace gdata | 431 } // namespace gdata |
430 | 432 |
431 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_OPERATIONS_H_ | 433 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_OPERATIONS_H_ |
OLD | NEW |