[M120 Migration][VD] Enable direct rendering for TVPlus
[platform/framework/web/chromium-efl.git] / components / storage_monitor / test_media_transfer_protocol_manager_chromeos.h
1 // Copyright 2014 The Chromium Authors
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_CHROMEOS_H_
6 #define COMPONENTS_STORAGE_MONITOR_TEST_MEDIA_TRANSFER_PROTOCOL_MANAGER_CHROMEOS_H_
7
8 #include <stddef.h>
9 #include <stdint.h>
10
11 #include <string>
12
13 #include "mojo/public/cpp/bindings/pending_associated_remote.h"
14 #include "mojo/public/cpp/bindings/pending_receiver.h"
15 #include "mojo/public/cpp/bindings/receiver_set.h"
16 #include "services/device/public/mojom/mtp_manager.mojom.h"
17
18 namespace storage_monitor {
19
20 // A dummy MediaTransferProtocolManager implementation.
21 class TestMediaTransferProtocolManagerChromeOS
22     : public device::mojom::MtpManager {
23  public:
24   static TestMediaTransferProtocolManagerChromeOS* GetFakeMtpManager();
25   TestMediaTransferProtocolManagerChromeOS();
26
27   TestMediaTransferProtocolManagerChromeOS(
28       const TestMediaTransferProtocolManagerChromeOS&) = delete;
29   TestMediaTransferProtocolManagerChromeOS& operator=(
30       const TestMediaTransferProtocolManagerChromeOS&) = delete;
31
32   ~TestMediaTransferProtocolManagerChromeOS() override;
33
34   void AddReceiver(mojo::PendingReceiver<device::mojom::MtpManager> receiver);
35
36  private:
37   // device::mojom::MtpManager implementation.
38   void EnumerateStoragesAndSetClient(
39       mojo::PendingAssociatedRemote<device::mojom::MtpManagerClient> client,
40       EnumerateStoragesAndSetClientCallback callback) override;
41   void GetStorageInfo(const std::string& storage_name,
42                       GetStorageInfoCallback callback) override;
43   void GetStorageInfoFromDevice(
44       const std::string& storage_name,
45       GetStorageInfoFromDeviceCallback callback) override;
46   void OpenStorage(const std::string& storage_name,
47                    const std::string& mode,
48                    OpenStorageCallback callback) override;
49   void CloseStorage(const std::string& storage_handle,
50                     CloseStorageCallback callback) override;
51   void CreateDirectory(const std::string& storage_handle,
52                        uint32_t parent_id,
53                        const std::string& directory_name,
54                        CreateDirectoryCallback callback) override;
55   void ReadDirectoryEntryIds(const std::string& storage_handle,
56                              uint32_t file_id,
57                              ReadDirectoryEntryIdsCallback callback) override;
58   void ReadFileChunk(const std::string& storage_handle,
59                      uint32_t file_id,
60                      uint32_t offset,
61                      uint32_t count,
62                      ReadFileChunkCallback callback) override;
63   void GetFileInfo(const std::string& storage_handle,
64                    const std::vector<uint32_t>& file_ids,
65                    GetFileInfoCallback callback) override;
66   void RenameObject(const std::string& storage_handle,
67                     uint32_t object_id,
68                     const std::string& new_name,
69                     RenameObjectCallback callback) override;
70   void CopyFileFromLocal(const std::string& storage_handle,
71                          int64_t source_file_descriptor,
72                          uint32_t parent_id,
73                          const std::string& file_name,
74                          CopyFileFromLocalCallback callback) override;
75   void DeleteObject(const std::string& storage_handle,
76                     uint32_t object_id,
77                     DeleteObjectCallback callback) override;
78
79   mojo::ReceiverSet<device::mojom::MtpManager> receivers_;
80 };
81
82 }  // namespace storage_monitor
83
84 #endif  // COMPONENTS_STORAGE_MONITOR_TEST_MEDIA_TRANSFER_PROTOCOL_MANAGER_CHROMEOS_H_