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