blob: d39e43cd0a079685df8e419f43083d3e48b20c42 (
plain)
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
|
// Copyright 2013 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.
//
// This file contains callback types used for communicating with the Drive
// server via WAPI (Documents List API) and Drive API.
#ifndef CHROME_BROWSER_GOOGLE_APIS_DRIVE_COMMON_CALLBACKS_H_
#define CHROME_BROWSER_GOOGLE_APIS_DRIVE_COMMON_CALLBACKS_H_
#include "chrome/browser/google_apis/base_requests.h"
namespace google_apis {
class AboutResource;
class AppList;
class ResourceEntry;
class ResourceList;
// Callback used for getting ResourceList.
typedef base::Callback<void(GDataErrorCode error,
scoped_ptr<ResourceList> resource_list)>
GetResourceListCallback;
// Callback used for getting ResourceEntry.
typedef base::Callback<void(GDataErrorCode error,
scoped_ptr<ResourceEntry> entry)>
GetResourceEntryCallback;
// Callback used for gettign AboutResource.
typedef base::Callback<void(GDataErrorCode error,
scoped_ptr<AboutResource> about_resource)>
GetAboutResourceCallback;
// Callback used for getting AppList.
typedef base::Callback<void(GDataErrorCode error,
scoped_ptr<AppList> app_list)>
GetAppListCallback;
// Callback used for handling UploadRangeResponse.
typedef base::Callback<void(
const UploadRangeResponse& response,
scoped_ptr<ResourceEntry> new_entry)> UploadRangeCallback;
// Callback used for authrozing an app. |open_url| is used to open the target
// file with the authorized app.
typedef base::Callback<void(GDataErrorCode error,
const GURL& open_url)>
AuthorizeAppCallback;
// Closure for canceling a certain request. Each request-issuing method returns
// this type of closure. If it is called during the request is in-flight, the
// callback passed with the request is invoked with GDATA_CANCELLED. If the
// request is already finished, nothing happens.
typedef base::Closure CancelCallback;
} // namespace google_apis
#endif // CHROME_BROWSER_GOOGLE_APIS_DRIVE_COMMON_CALLBACKS_H_
|