7e64906ca48f2932afd54efc3b0a0e278d39e6dc
[platform/framework/web/crosswalk.git] / src / google_apis / drive / gdata_wapi_requests.h
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
3 // found in the LICENSE file.
4
5 #ifndef GOOGLE_APIS_DRIVE_GDATA_WAPI_REQUESTS_H_
6 #define GOOGLE_APIS_DRIVE_GDATA_WAPI_REQUESTS_H_
7
8 #include <string>
9
10 #include "google_apis/drive/base_requests.h"
11 #include "google_apis/drive/gdata_wapi_url_generator.h"
12
13 namespace google_apis {
14
15 //========================= GetResourceEntryRequest ==========================
16
17 // This class performs the request for fetching a single resource entry.
18 class GetResourceEntryRequest : public GetDataRequest {
19  public:
20   // |callback| must not be null.
21   GetResourceEntryRequest(RequestSender* sender,
22                           const GDataWapiUrlGenerator& url_generator,
23                           const std::string& resource_id,
24                           const GURL& embed_origin,
25                           const GetDataCallback& callback);
26   virtual ~GetResourceEntryRequest();
27
28  protected:
29   // UrlFetchRequestBase overrides.
30   virtual GURL GetURL() const OVERRIDE;
31
32  private:
33   const GDataWapiUrlGenerator url_generator_;
34   // Resource id of the requested entry.
35   const std::string resource_id_;
36   // Embed origin for an url to the sharing dialog. Can be empty.
37   const GURL& embed_origin_;
38
39   DISALLOW_COPY_AND_ASSIGN(GetResourceEntryRequest);
40 };
41
42 }  // namespace google_apis
43
44 #endif  // GOOGLE_APIS_DRIVE_GDATA_WAPI_REQUESTS_H_