summaryrefslogtreecommitdiffstats
path: root/google_apis/drive/gdata_wapi_requests.h
blob: 7e64906ca48f2932afd54efc3b0a0e278d39e6dc (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
// 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 GOOGLE_APIS_DRIVE_GDATA_WAPI_REQUESTS_H_
#define GOOGLE_APIS_DRIVE_GDATA_WAPI_REQUESTS_H_

#include <string>

#include "google_apis/drive/base_requests.h"
#include "google_apis/drive/gdata_wapi_url_generator.h"

namespace google_apis {

//========================= GetResourceEntryRequest ==========================

// This class performs the request for fetching a single resource entry.
class GetResourceEntryRequest : public GetDataRequest {
 public:
  // |callback| must not be null.
  GetResourceEntryRequest(RequestSender* sender,
                          const GDataWapiUrlGenerator& url_generator,
                          const std::string& resource_id,
                          const GURL& embed_origin,
                          const GetDataCallback& callback);
  virtual ~GetResourceEntryRequest();

 protected:
  // UrlFetchRequestBase overrides.
  virtual GURL GetURL() const OVERRIDE;

 private:
  const GDataWapiUrlGenerator url_generator_;
  // Resource id of the requested entry.
  const std::string resource_id_;
  // Embed origin for an url to the sharing dialog. Can be empty.
  const GURL& embed_origin_;

  DISALLOW_COPY_AND_ASSIGN(GetResourceEntryRequest);
};

}  // namespace google_apis

#endif  // GOOGLE_APIS_DRIVE_GDATA_WAPI_REQUESTS_H_