test_media_transfer_protocol_manager_linux.cc revision 5f1c94371a64b3196d4be9466099bb892df9b88e
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
9namespace storage_monitor {
10
11TestMediaTransferProtocolManagerLinux::
12TestMediaTransferProtocolManagerLinux() {}
13
14TestMediaTransferProtocolManagerLinux::
15~TestMediaTransferProtocolManagerLinux() {}
16
17void TestMediaTransferProtocolManagerLinux::AddObserver(Observer* observer) {}
18
19void TestMediaTransferProtocolManagerLinux::RemoveObserver(
20    Observer* observer) {}
21
22const std::vector<std::string>
23TestMediaTransferProtocolManagerLinux::GetStorages() const {
24    return std::vector<std::string>();
25}
26const MtpStorageInfo* TestMediaTransferProtocolManagerLinux::GetStorageInfo(
27    const std::string& storage_name) const {
28  return NULL;
29}
30
31void TestMediaTransferProtocolManagerLinux::OpenStorage(
32    const std::string& storage_name,
33    const std::string& mode,
34    const OpenStorageCallback& callback) {
35  callback.Run("", true);
36}
37
38void TestMediaTransferProtocolManagerLinux::CloseStorage(
39    const std::string& storage_handle,
40    const CloseStorageCallback& callback) {
41  callback.Run(true);
42}
43
44void TestMediaTransferProtocolManagerLinux::ReadDirectory(
45    const std::string& storage_handle,
46    uint32 file_id,
47    const ReadDirectoryCallback& callback) {
48  callback.Run(std::vector<MtpFileEntry>(),
49               false /* no more entries*/,
50               true /* error */);
51}
52
53void TestMediaTransferProtocolManagerLinux::ReadFileChunk(
54    const std::string& storage_handle,
55    uint32 file_id,
56    uint32 offset,
57    uint32 count,
58    const ReadFileCallback& callback) {
59  callback.Run(std::string(), true);
60}
61
62void TestMediaTransferProtocolManagerLinux::GetFileInfo(
63    const std::string& storage_handle,
64    uint32 file_id,
65    const GetFileInfoCallback& callback) {
66  callback.Run(MtpFileEntry(), true);
67}
68
69}  // namespace storage_monitor
70