kodi
UPnPDirectory.h
1 /*
2  * UPnP Support for XBMC
3  * Copyright (c) 2006 c0diq (Sylvain Rebaud)
4  * Portions Copyright (c) by the authors of libPlatinum
5  * http://www.plutinosoft.com/blog/category/platinum/
6  *
7  * Copyright (C) 2010-2018 Team Kodi
8  * This file is part of Kodi - https://kodi.tv
9  *
10  * SPDX-License-Identifier: GPL-2.0-or-later
11  * See LICENSES/README.md for more information.
12  */
13 
14 #pragma once
15 
16 #include "IDirectory.h"
17 
18 class CFileItem;
19 class CURL;
20 
21 namespace XFILE
22 {
23 class CUPnPDirectory : public IDirectory
24 {
25 public:
26  CUPnPDirectory(void) = default;
27  ~CUPnPDirectory(void) override = default;
28 
29  // IDirectory methods
30  bool GetDirectory(const CURL& url, CFileItemList &items) override;
31  bool AllowAll() const override { return true; }
32  bool Resolve(CFileItem& item) const override;
33 
34  // class methods
35  static std::string GetFriendlyName(const CURL& url);
36  static bool GetResource(const CURL &path, CFileItem& item);
37 };
38 }
Interface to the directory on a file system.
Definition: IDirectory.h:51
Definition: Scraper.h:41
bool AllowAll() const override
Whether to allow all files/folders to be listed.
Definition: UPnPDirectory.h:31
Represents a list of files.
Definition: FileItem.h:702
Definition: URL.h:21
Definition: UPnPDirectory.h:23
bool Resolve(CFileItem &item) const override
Resolves a given item to a playable item.
Definition: UPnPDirectory.cpp:360
bool GetDirectory(const CURL &url, CFileItemList &items) override
Get the items of the directory strPath.
Definition: UPnPDirectory.cpp:181
Represents a file on a share.
Definition: FileItem.h:102