Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(535)

Side by Side Diff: ppapi/cpp/dev/file_ref_dev.h

Issue 7387011: Clean up the file dev interfaces. The combination of some dev and some non (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef PPAPI_CPP_DEV_FILE_REF_DEV_H_ 5 #ifndef PPAPI_CPP_DEV_FILE_REF_DEV_H_
6 #define PPAPI_CPP_DEV_FILE_REF_DEV_H_ 6 #define PPAPI_CPP_DEV_FILE_REF_DEV_H_
7 7
8 #include "ppapi/c/dev/ppb_file_ref_dev.h" 8 #include "ppapi/c/ppb_file_ref.h"
9 #include "ppapi/c/pp_stdint.h"
10 #include "ppapi/cpp/resource.h"
11 #include "ppapi/cpp/var.h"
12 9
13 namespace pp { 10 namespace pp {
14 11
15 class CompletionCallback; 12 typedef FileRef FileRef_Dev;
16 class FileSystem_Dev;
17
18 class FileRef_Dev : public Resource {
19 public:
20 // Creates an is_null() FileRef object.
21 FileRef_Dev() {}
22
23 // This constructor is used when we've gotten a PP_Resource as a return value
24 // that we need to addref.
25 explicit FileRef_Dev(PP_Resource resource);
26
27 // This constructor is used when we've gotten a PP_Resource as a return value
28 // that has already been addref'ed for us.
29 struct PassRef {};
30 FileRef_Dev(PassRef, PP_Resource resource);
31
32 // Creates a FileRef pointing to a path in the given filesystem.
33 FileRef_Dev(const FileSystem_Dev& file_system, const char* path);
34
35 FileRef_Dev(const FileRef_Dev& other);
36
37 // Returns the file system type.
38 PP_FileSystemType_Dev GetFileSystemType() const;
39
40 // Returns the name of the file.
41 Var GetName() const;
42
43 // Returns the absolute path of the file. See PPB_FileRef::GetPath for more
44 // details.
45 Var GetPath() const;
46
47 // Returns the parent directory of this file. See PPB_FileRef::GetParent for
48 // more details.
49 FileRef_Dev GetParent() const;
50
51 int32_t MakeDirectory(const CompletionCallback& cc);
52
53 int32_t MakeDirectoryIncludingAncestors(const CompletionCallback& cc);
54
55 int32_t Touch(PP_Time last_access_time,
56 PP_Time last_modified_time,
57 const CompletionCallback& cc);
58
59 int32_t Delete(const CompletionCallback& cc);
60
61 int32_t Rename(const FileRef_Dev& new_file_ref, const CompletionCallback& cc);
62 };
63 13
64 } // namespace pp 14 } // namespace pp
65 15
66 #endif // PPAPI_CPP_FILE_REF_H_ 16 #endif // PPAPI_CPP_FILE_REF_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698