1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_GOOGLE_APIS_DRIVE_API_OPERATIONS_H_
#define CHROME_BROWSER_GOOGLE_APIS_DRIVE_API_OPERATIONS_H_
#include <string>
#include "chrome/browser/google_apis/base_operations.h"
namespace net {
class URLRequestContextGetter;
} // namespace net
namespace google_apis {
//============================== GetAboutOperation =============================
// This class performs the operation for fetching About data.
class GetAboutOperation : public GetDataOperation {
public:
GetAboutOperation(OperationRegistry* registry,
net::URLRequestContextGetter* url_request_context_getter,
const GetDataCallback& callback);
virtual ~GetAboutOperation();
protected:
// Overridden from GetDataOperation.
virtual GURL GetURL() const OVERRIDE;
private:
DISALLOW_COPY_AND_ASSIGN(GetAboutOperation);
};
//============================= GetApplistOperation ============================
// This class performs the operation for fetching Applist.
class GetApplistOperation : public GetDataOperation {
public:
GetApplistOperation(OperationRegistry* registry,
net::URLRequestContextGetter* url_request_context_getter,
const GetDataCallback& callback);
virtual ~GetApplistOperation();
protected:
// Overridden from GetDataOperation.
virtual GURL GetURL() const OVERRIDE;
private:
DISALLOW_COPY_AND_ASSIGN(GetApplistOperation);
};
//============================ GetChangelistOperation ==========================
// This class performs the operation for fetching changelist.
class GetChangelistOperation : public GetDataOperation {
public:
// |start_changestamp| specifies the starting point of change list or 0 if
// all changes are necessary.
// |url| specifies URL for document feed fetching operation. If empty URL is
// passed, the default URL is used and returns the first page of the result.
// When non-first page result is requested, |url| should be specified.
GetChangelistOperation(
OperationRegistry* registry,
net::URLRequestContextGetter* url_request_context_getter,
const GURL& url,
int64 start_changestamp,
const GetDataCallback& callback);
virtual ~GetChangelistOperation();
protected:
// Overridden from GetDataOperation.
virtual GURL GetURL() const OVERRIDE;
private:
GURL url_;
int64 start_changestamp_;
DISALLOW_COPY_AND_ASSIGN(GetChangelistOperation);
};
//============================= GetFlielistOperation ===========================
// This class performs the operation for fetching Filelist.
class GetFilelistOperation : public GetDataOperation {
public:
GetFilelistOperation(
OperationRegistry* registry,
net::URLRequestContextGetter* url_request_context_getter,
const GURL& url,
const std::string& search_string,
const GetDataCallback& callback);
virtual ~GetFilelistOperation();
protected:
// Overridden from GetDataOperation.
virtual GURL GetURL() const OVERRIDE;
private:
GURL url_;
std::string search_string_;
DISALLOW_COPY_AND_ASSIGN(GetFilelistOperation);
};
//=============================== GetFlieOperation =============================
// This class performs the operation for fetching a file.
class GetFileOperation : public GetDataOperation {
public:
GetFileOperation(OperationRegistry* registry,
net::URLRequestContextGetter* url_request_context_getter,
const std::string& file_id,
const GetDataCallback& callback);
virtual ~GetFileOperation();
protected:
// Overridden from GetDataOperation.
virtual GURL GetURL() const OVERRIDE;
private:
std::string file_id_;
DISALLOW_COPY_AND_ASSIGN(GetFileOperation);
};
} // namespace google_apis
#endif // CHROME_BROWSER_GOOGLE_APIS_DRIVE_API_OPERATIONS_H_
|