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.
5 #include "components/storage_monitor/test_media_transfer_protocol_manager_linux.h"
7 #include "device/media_transfer_protocol/mtp_file_entry.pb.h"
9 namespace storage_monitor
{
11 TestMediaTransferProtocolManagerLinux::
12 TestMediaTransferProtocolManagerLinux() {}
14 TestMediaTransferProtocolManagerLinux::
15 ~TestMediaTransferProtocolManagerLinux() {}
17 void TestMediaTransferProtocolManagerLinux::AddObserver(Observer
* observer
) {}
19 void TestMediaTransferProtocolManagerLinux::RemoveObserver(
20 Observer
* observer
) {}
22 const std::vector
<std::string
>
23 TestMediaTransferProtocolManagerLinux::GetStorages() const {
24 return std::vector
<std::string
>();
26 const MtpStorageInfo
* TestMediaTransferProtocolManagerLinux::GetStorageInfo(
27 const std::string
& storage_name
) const {
31 void TestMediaTransferProtocolManagerLinux::OpenStorage(
32 const std::string
& storage_name
,
33 const std::string
& mode
,
34 const OpenStorageCallback
& callback
) {
35 callback
.Run("", true);
38 void TestMediaTransferProtocolManagerLinux::CloseStorage(
39 const std::string
& storage_handle
,
40 const CloseStorageCallback
& callback
) {
44 void TestMediaTransferProtocolManagerLinux::CreateDirectory(
45 const std::string
& storage_handle
,
46 const uint32 parent_id
,
47 const std::string
& directory_name
,
48 const CreateDirectoryCallback
& callback
) {
49 callback
.Run(true /* error */);
52 void TestMediaTransferProtocolManagerLinux::ReadDirectory(
53 const std::string
& storage_handle
,
55 const size_t max_size
,
56 const ReadDirectoryCallback
& callback
) {
57 callback
.Run(std::vector
<MtpFileEntry
>(),
58 false /* no more entries*/,
62 void TestMediaTransferProtocolManagerLinux::ReadFileChunk(
63 const std::string
& storage_handle
,
67 const ReadFileCallback
& callback
) {
68 callback
.Run(std::string(), true);
71 void TestMediaTransferProtocolManagerLinux::GetFileInfo(
72 const std::string
& storage_handle
,
74 const GetFileInfoCallback
& callback
) {
75 callback
.Run(MtpFileEntry(), true);
78 void TestMediaTransferProtocolManagerLinux::RenameObject(
79 const std::string
& storage_handle
,
80 const uint32 object_id
,
81 const std::string
& new_name
,
82 const RenameObjectCallback
& callback
) {
83 callback
.Run(true /* error */);
86 void TestMediaTransferProtocolManagerLinux::CopyFileFromLocal(
87 const std::string
& storage_handle
,
88 const int source_file_descriptor
,
89 const uint32 parent_id
,
90 const std::string
& file_name
,
91 const CopyFileFromLocalCallback
& callback
) {
92 callback
.Run(true /* error */);
95 void TestMediaTransferProtocolManagerLinux::DeleteObject(
96 const std::string
& storage_handle
,
97 const uint32 object_id
,
98 const DeleteObjectCallback
& callback
) {
99 callback
.Run(true /* error */);
102 } // namespace storage_monitor