OLD | NEW |
---|---|
(Empty) | |
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 CHROME_BROWSER_CHROMEOS_GDATA_GDATA_WAPI_SERVICE_H_ | |
6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_WAPI_SERVICE_H_ | |
7 | |
8 #include <string> | |
9 | |
10 #include "base/memory/scoped_ptr.h" | |
11 #include "base/memory/weak_ptr.h" | |
12 #include "chrome/browser/chromeos/gdata/documents_service_interface.h" | |
13 #include "chrome/browser/chromeos/gdata/gdata_operations.h" | |
14 #include "chrome/browser/chromeos/gdata/gdata_auth_service.h" | |
15 #include "chrome/browser/chromeos/gdata/gdata_errorcode.h" | |
16 | |
17 class FilePath; | |
18 class GURL; | |
19 class Profile; | |
20 | |
21 namespace gdata { | |
22 | |
23 class GDataOperationRunner; | |
24 | |
25 // This class provides documents feed service calls. | |
26 // TODO(kochi): rewrite this comment. | |
satorux1
2012/08/17 12:05:48
Can you do this now? Please mention about what WAP
kochi
2012/08/20 09:17:30
Sorry, I intended to get this done before review.
| |
27 class GDataWapiService : public DocumentsServiceInterface { | |
28 public: | |
29 // Instance is usually created by GDataSystemServiceFactory and owned by | |
30 // GDataFileSystem. | |
31 GDataWapiService(); | |
32 virtual ~GDataWapiService(); | |
33 | |
34 GDataAuthService* auth_service_for_testing(); | |
35 | |
36 // DocumentsServiceInterface Overrides | |
37 virtual void Initialize(Profile* profile) OVERRIDE; | |
38 virtual GDataOperationRegistry* operation_registry() const OVERRIDE; | |
39 virtual void CancelAll() OVERRIDE; | |
40 virtual void Authenticate(const AuthStatusCallback& callback) OVERRIDE; | |
41 virtual void GetDocuments(const GURL& feed_url, | |
42 int64 start_changestamp, | |
43 const std::string& search_query, | |
44 const std::string& directory_resource_id, | |
45 const GetDataCallback& callback) OVERRIDE; | |
46 virtual void GetDocumentEntry(const std::string& resource_id, | |
47 const GetDataCallback& callback) OVERRIDE; | |
48 | |
49 virtual void GetAccountMetadata(const GetDataCallback& callback) OVERRIDE; | |
50 virtual void GetApplicationInfo(const GetDataCallback& callback) OVERRIDE; | |
51 virtual void DeleteDocument(const GURL& document_url, | |
52 const EntryActionCallback& callback) OVERRIDE; | |
53 virtual void DownloadDocument( | |
54 const FilePath& virtual_path, | |
55 const FilePath& local_cache_path, | |
56 const GURL& content_url, | |
57 DocumentExportFormat format, | |
58 const DownloadActionCallback& callback) OVERRIDE; | |
59 virtual void DownloadFile( | |
60 const FilePath& virtual_path, | |
61 const FilePath& local_cache_path, | |
62 const GURL& content_url, | |
63 const DownloadActionCallback& download_action_callback, | |
64 const GetContentCallback& get_content_callback) OVERRIDE; | |
65 virtual void CopyDocument(const std::string& resource_id, | |
66 const FilePath::StringType& new_name, | |
67 const GetDataCallback& callback) OVERRIDE; | |
68 virtual void RenameResource(const GURL& document_url, | |
69 const FilePath::StringType& new_name, | |
70 const EntryActionCallback& callback) OVERRIDE; | |
71 virtual void AddResourceToDirectory( | |
72 const GURL& parent_content_url, | |
73 const GURL& resource_url, | |
74 const EntryActionCallback& callback) OVERRIDE; | |
75 virtual void RemoveResourceFromDirectory( | |
76 const GURL& parent_content_url, | |
77 const GURL& resource_url, | |
78 const std::string& resource_id, | |
79 const EntryActionCallback& callback) OVERRIDE; | |
80 virtual void CreateDirectory(const GURL& parent_content_url, | |
81 const FilePath::StringType& directory_name, | |
82 const GetDataCallback& callback) OVERRIDE; | |
83 virtual void InitiateUpload(const InitiateUploadParams& params, | |
84 const InitiateUploadCallback& callback) OVERRIDE; | |
85 virtual void ResumeUpload(const ResumeUploadParams& params, | |
86 const ResumeUploadCallback& callback) OVERRIDE; | |
87 virtual void AuthorizeApp(const GURL& resource_url, | |
88 const std::string& app_id, | |
89 const GetDataCallback& callback) OVERRIDE; | |
90 virtual bool HasAccessToken() const OVERRIDE; | |
91 virtual bool HasRefreshToken() const OVERRIDE; | |
92 | |
93 private: | |
94 Profile* profile_; | |
95 | |
96 scoped_ptr<GDataOperationRunner> runner_; | |
97 | |
98 DISALLOW_COPY_AND_ASSIGN(GDataWapiService); | |
99 }; | |
100 | |
101 } // namespace gdata | |
102 | |
103 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_WAPI_SERVICE_H_ | |
OLD | NEW |