| 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 #include "components/storage_monitor/test_media_transfer_protocol_manager_linux.
h" | |
| 6 | |
| 7 #include "device/media_transfer_protocol/mtp_file_entry.pb.h" | |
| 8 #include "device/media_transfer_protocol/mtp_storage_info.pb.h" | |
| 9 | |
| 10 namespace storage_monitor { | |
| 11 | |
| 12 TestMediaTransferProtocolManagerLinux:: | |
| 13 TestMediaTransferProtocolManagerLinux() {} | |
| 14 | |
| 15 TestMediaTransferProtocolManagerLinux:: | |
| 16 ~TestMediaTransferProtocolManagerLinux() {} | |
| 17 | |
| 18 void TestMediaTransferProtocolManagerLinux::AddObserver(Observer* observer) {} | |
| 19 | |
| 20 void TestMediaTransferProtocolManagerLinux::RemoveObserver( | |
| 21 Observer* observer) {} | |
| 22 | |
| 23 const std::vector<std::string> | |
| 24 TestMediaTransferProtocolManagerLinux::GetStorages() const { | |
| 25 return std::vector<std::string>(); | |
| 26 } | |
| 27 const MtpStorageInfo* TestMediaTransferProtocolManagerLinux::GetStorageInfo( | |
| 28 const std::string& storage_name) const { | |
| 29 return NULL; | |
| 30 } | |
| 31 | |
| 32 void TestMediaTransferProtocolManagerLinux::GetStorageInfoFromDevice( | |
| 33 const std::string& storage_name, | |
| 34 const GetStorageInfoFromDeviceCallback& callback) { | |
| 35 MtpStorageInfo mtp_storage_info; | |
| 36 callback.Run(mtp_storage_info, true /* error */); | |
| 37 } | |
| 38 | |
| 39 void TestMediaTransferProtocolManagerLinux::OpenStorage( | |
| 40 const std::string& storage_name, | |
| 41 const std::string& mode, | |
| 42 const OpenStorageCallback& callback) { | |
| 43 callback.Run("", true); | |
| 44 } | |
| 45 | |
| 46 void TestMediaTransferProtocolManagerLinux::CloseStorage( | |
| 47 const std::string& storage_handle, | |
| 48 const CloseStorageCallback& callback) { | |
| 49 callback.Run(true); | |
| 50 } | |
| 51 | |
| 52 void TestMediaTransferProtocolManagerLinux::CreateDirectory( | |
| 53 const std::string& storage_handle, | |
| 54 const uint32_t parent_id, | |
| 55 const std::string& directory_name, | |
| 56 const CreateDirectoryCallback& callback) { | |
| 57 callback.Run(true /* error */); | |
| 58 } | |
| 59 | |
| 60 void TestMediaTransferProtocolManagerLinux::ReadDirectory( | |
| 61 const std::string& storage_handle, | |
| 62 const uint32_t file_id, | |
| 63 const size_t max_size, | |
| 64 const ReadDirectoryCallback& callback) { | |
| 65 callback.Run(std::vector<MtpFileEntry>(), | |
| 66 false /* no more entries*/, | |
| 67 true /* error */); | |
| 68 } | |
| 69 | |
| 70 void TestMediaTransferProtocolManagerLinux::ReadFileChunk( | |
| 71 const std::string& storage_handle, | |
| 72 uint32_t file_id, | |
| 73 uint32_t offset, | |
| 74 uint32_t count, | |
| 75 const ReadFileCallback& callback) { | |
| 76 callback.Run(std::string(), true); | |
| 77 } | |
| 78 | |
| 79 void TestMediaTransferProtocolManagerLinux::GetFileInfo( | |
| 80 const std::string& storage_handle, | |
| 81 uint32_t file_id, | |
| 82 const GetFileInfoCallback& callback) { | |
| 83 callback.Run(MtpFileEntry(), true); | |
| 84 } | |
| 85 | |
| 86 void TestMediaTransferProtocolManagerLinux::RenameObject( | |
| 87 const std::string& storage_handle, | |
| 88 const uint32_t object_id, | |
| 89 const std::string& new_name, | |
| 90 const RenameObjectCallback& callback) { | |
| 91 callback.Run(true /* error */); | |
| 92 } | |
| 93 | |
| 94 void TestMediaTransferProtocolManagerLinux::CopyFileFromLocal( | |
| 95 const std::string& storage_handle, | |
| 96 const int source_file_descriptor, | |
| 97 const uint32_t parent_id, | |
| 98 const std::string& file_name, | |
| 99 const CopyFileFromLocalCallback& callback) { | |
| 100 callback.Run(true /* error */); | |
| 101 } | |
| 102 | |
| 103 void TestMediaTransferProtocolManagerLinux::DeleteObject( | |
| 104 const std::string& storage_handle, | |
| 105 const uint32_t object_id, | |
| 106 const DeleteObjectCallback& callback) { | |
| 107 callback.Run(true /* error */); | |
| 108 } | |
| 109 | |
| 110 } // namespace storage_monitor | |
| OLD | NEW |