1 /* 2 * Copyright (C) 2005-2018 Team Kodi 3 * This file is part of Kodi - https://kodi.tv 4 * 5 * SPDX-License-Identifier: GPL-2.0-or-later 6 * See LICENSES/README.md for more information. 7 */ 8 9 #pragma once 10 11 #include "storage/IStorageProvider.h" 12 13 #include <string> 14 #include <utility> 15 #include <vector> 16 17 class COSXStorageProvider : public IStorageProvider 18 { 19 public: 20 COSXStorageProvider(); 21 ~COSXStorageProvider() override = default; 22 Initialize()23 void Initialize() override {} Stop()24 void Stop() override {} 25 26 void GetLocalDrives(VECSOURCES& localDrives) override; 27 void GetRemovableDrives(VECSOURCES& removableDrives) override; 28 29 std::vector<std::string> GetDiskUsage() override; 30 31 bool Eject(const std::string& mountpath) override; 32 33 bool PumpDriveChangeEvents(IStorageEventsCallback* callback) override; 34 35 static void VolumeMountNotification(const char* label, const char* mountpoint); 36 static void VolumeUnmountNotification(const char* label, const char* mountpoint); 37 38 private: 39 static std::vector<std::pair<std::string, std::string>> m_mountsToNotify; // label, mountpoint 40 static std::vector<std::pair<std::string, std::string>> m_unmountsToNotify; // label, mountpoint 41 }; 42