2 * Copyright (C) 2012-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
11 #include "storage/IStorageProvider.h"
17 class CAndroidStorageProvider
: public IStorageProvider
20 CAndroidStorageProvider();
21 ~CAndroidStorageProvider() override
= default;
23 void Initialize() override
{}
24 void Stop() override
{}
25 bool Eject(const std::string
& mountpath
) override
{ return false; }
27 void GetLocalDrives(VECSOURCES
& localDrives
) override
;
28 void GetRemovableDrives(VECSOURCES
& removableDrives
) override
;
29 std::vector
<std::string
> GetDiskUsage() override
;
31 bool PumpDriveChangeEvents(IStorageEventsCallback
* callback
) override
;
34 * \brief If external storage is available, it returns the path for the external storage (for the specified type)
35 * \param path will contain the path of the external storage (for the specified type)
36 * \param type optional type. Possible values are "", "files", "music", "videos", "pictures", "photos, "downloads"
37 * \return true if external storage is available and a valid path has been stored in the path parameter
39 static bool GetExternalStorage(std::string
& path
, const std::string
& type
= "");
42 std::string
unescape(const std::string
& str
);
43 VECSOURCES m_removableDrives
;
44 unsigned int m_removableLength
;
46 static std::set
<std::string
> GetRemovableDrives();
47 static std::set
<std::string
> GetRemovableDrivesLinux();
49 bool GetStorageUsage(const std::string
& path
, std::string
& usage
);