| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 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 COMPONENTS_STORAGE_MONITOR_TEST_MEDIA_TRANSFER_PROTOCOL_MANAGER_LINUX_H_ | |
| 6 #define COMPONENTS_STORAGE_MONITOR_TEST_MEDIA_TRANSFER_PROTOCOL_MANAGER_LINUX_H_ | |
| 7 | |
| 8 #include <stddef.h> | |
| 9 #include <stdint.h> | |
| 10 | |
| 11 #include "base/macros.h" | |
| 12 #include "device/media_transfer_protocol/media_transfer_protocol_manager.h" | |
| 13 | |
| 14 namespace storage_monitor { | |
| 15 | |
| 16 // A dummy MediaTransferProtocolManager implementation. | |
| 17 class TestMediaTransferProtocolManagerLinux | |
| 18 : public device::MediaTransferProtocolManager { | |
| 19 public: | |
| 20 TestMediaTransferProtocolManagerLinux(); | |
| 21 ~TestMediaTransferProtocolManagerLinux() override; | |
| 22 | |
| 23 private: | |
| 24 // device::MediaTransferProtocolManager implementation. | |
| 25 void AddObserver(Observer* observer) override; | |
| 26 void RemoveObserver(Observer* observer) override; | |
| 27 const std::vector<std::string> GetStorages() const override; | |
| 28 const MtpStorageInfo* GetStorageInfo( | |
| 29 const std::string& storage_name) const override; | |
| 30 void GetStorageInfoFromDevice( | |
| 31 const std::string& storage_name, | |
| 32 const GetStorageInfoFromDeviceCallback& callback) override; | |
| 33 void OpenStorage(const std::string& storage_name, | |
| 34 const std::string& mode, | |
| 35 const OpenStorageCallback& callback) override; | |
| 36 void CloseStorage(const std::string& storage_handle, | |
| 37 const CloseStorageCallback& callback) override; | |
| 38 void CreateDirectory(const std::string& storage_handle, | |
| 39 const uint32_t parent_id, | |
| 40 const std::string& directory_name, | |
| 41 const CreateDirectoryCallback& callback) override; | |
| 42 void ReadDirectory(const std::string& storage_handle, | |
| 43 const uint32_t file_id, | |
| 44 const size_t max_size, | |
| 45 const ReadDirectoryCallback& callback) override; | |
| 46 void ReadFileChunk(const std::string& storage_handle, | |
| 47 uint32_t file_id, | |
| 48 uint32_t offset, | |
| 49 uint32_t count, | |
| 50 const ReadFileCallback& callback) override; | |
| 51 void GetFileInfo(const std::string& storage_handle, | |
| 52 uint32_t file_id, | |
| 53 const GetFileInfoCallback& callback) override; | |
| 54 void RenameObject(const std::string& storage_handle, | |
| 55 const uint32_t object_id, | |
| 56 const std::string& new_name, | |
| 57 const RenameObjectCallback& callback) override; | |
| 58 void CopyFileFromLocal(const std::string& storage_handle, | |
| 59 const int source_file_descriptor, | |
| 60 const uint32_t parent_id, | |
| 61 const std::string& file_name, | |
| 62 const CopyFileFromLocalCallback& callback) override; | |
| 63 void DeleteObject(const std::string& storage_handle, | |
| 64 const uint32_t object_id, | |
| 65 const DeleteObjectCallback& callback) override; | |
| 66 | |
| 67 DISALLOW_COPY_AND_ASSIGN(TestMediaTransferProtocolManagerLinux); | |
| 68 }; | |
| 69 | |
| 70 } // namespace storage_monitor | |
| 71 | |
| 72 #endif // COMPONENTS_STORAGE_MONITOR_TEST_MEDIA_TRANSFER_PROTOCOL_MANAGER_LINUX
_H_ | |
| OLD | NEW |