| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 // Shared implementation of things common between |DirectoryImpl| and | 5 // Shared implementation of things common between |DirectoryImpl| and |
| 6 // |FileImpl|. | 6 // |FileImpl|. |
| 7 | 7 |
| 8 #ifndef SERVICES_FILES_SHARED_IMPL_H_ | 8 #ifndef SERVICES_FILES_SHARED_IMPL_H_ |
| 9 #define SERVICES_FILES_SHARED_IMPL_H_ | 9 #define SERVICES_FILES_SHARED_IMPL_H_ |
| 10 | 10 |
| 11 #include "mojo/public/cpp/bindings/callback.h" | 11 #include "mojo/public/cpp/bindings/callback.h" |
| 12 #include "services/files/types.mojom.h" | 12 #include "mojo/services/files/public/interfaces/types.mojom.h" |
| 13 | 13 |
| 14 namespace mojo { | 14 namespace mojo { |
| 15 namespace files { | 15 namespace files { |
| 16 | 16 |
| 17 // Stats the given FD (which must be valid), calling |callback| appropriately. | 17 // Stats the given FD (which must be valid), calling |callback| appropriately. |
| 18 // The type in the |FileInformation| given to the callback will be assigned from | 18 // The type in the |FileInformation| given to the callback will be assigned from |
| 19 // |type|. | 19 // |type|. |
| 20 void StatFD(int fd, | 20 void StatFD(int fd, |
| 21 FileType type, | 21 FileType type, |
| 22 const Callback<void(Error, FileInformationPtr)>& callback); | 22 const Callback<void(Error, FileInformationPtr)>& callback); |
| 23 | 23 |
| 24 // Touches the given FD (which must be valid), calling |callback| appropriately. | 24 // Touches the given FD (which must be valid), calling |callback| appropriately. |
| 25 void TouchFD(int fd, | 25 void TouchFD(int fd, |
| 26 TimespecOrNowPtr atime, | 26 TimespecOrNowPtr atime, |
| 27 TimespecOrNowPtr mtime, | 27 TimespecOrNowPtr mtime, |
| 28 const Callback<void(Error)>& callback); | 28 const Callback<void(Error)>& callback); |
| 29 | 29 |
| 30 } // namespace files | 30 } // namespace files |
| 31 } // namespace mojo | 31 } // namespace mojo |
| 32 | 32 |
| 33 #endif // SERVICES_FILES_SHARED_IMPL_H_ | 33 #endif // SERVICES_FILES_SHARED_IMPL_H_ |
| OLD | NEW |