| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2011 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 PPAPI_CPP_DEV_DIRECTORY_ENTRY_DEV_H_ | |
| 6 #define PPAPI_CPP_DEV_DIRECTORY_ENTRY_DEV_H_ | |
| 7 | |
| 8 #include "ppapi/c/dev/ppb_directory_reader_dev.h" | |
| 9 #include "ppapi/cpp/file_ref.h" | |
| 10 | |
| 11 namespace pp { | |
| 12 | |
| 13 class DirectoryEntry_Dev { | |
| 14 public: | |
| 15 DirectoryEntry_Dev(); | |
| 16 DirectoryEntry_Dev(PassRef, const PP_DirectoryEntry_Dev& data); | |
| 17 DirectoryEntry_Dev(const DirectoryEntry_Dev& other); | |
| 18 | |
| 19 ~DirectoryEntry_Dev(); | |
| 20 | |
| 21 DirectoryEntry_Dev& operator=(const DirectoryEntry_Dev& other); | |
| 22 | |
| 23 // Returns true if the DirectoryEntry is invalid or uninitialized. | |
| 24 bool is_null() const { return !data_.file_ref; } | |
| 25 | |
| 26 // Returns the FileRef held by this DirectoryEntry. | |
| 27 FileRef file_ref() const { return FileRef(data_.file_ref); } | |
| 28 | |
| 29 // Returns the type of the file referenced by this DirectoryEntry. | |
| 30 PP_FileType file_type() const { return data_.file_type; } | |
| 31 | |
| 32 private: | |
| 33 PP_DirectoryEntry_Dev data_; | |
| 34 }; | |
| 35 | |
| 36 } // namespace pp | |
| 37 | |
| 38 #endif // PPAPI_CPP_DEV_DIRECTORY_ENTRY_DEV_H_ | |
| OLD | NEW |