xbmc
MusicDatabaseFile.h
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 "File.h"
12 #include "IFile.h"
13 
14 namespace XFILE
15 {
16 class CMusicDatabaseFile : public IFile
17 {
18 public:
19  CMusicDatabaseFile(void);
20  ~CMusicDatabaseFile(void) override;
21  bool Open(const CURL& url) override;
22  bool Exists(const CURL& url) override;
23  int Stat(const CURL& url, struct __stat64* buffer) override;
24 
25  ssize_t Read(void* lpBuf, size_t uiBufSize) override;
26  int64_t Seek(int64_t iFilePosition, int iWhence = SEEK_SET) override;
27  void Close() override;
28  int64_t GetPosition() override;
29  int64_t GetLength() override;
30 
31  static std::string TranslateUrl(const CURL& url);
32 protected:
33  CFile m_file;
34 };
35 }
ssize_t Read(void *lpBuf, size_t uiBufSize) override
Attempt to read bufSize bytes from currently opened file into buffer bufPtr.
Definition: MusicDatabaseFile.cpp:66
Definition: Scraper.h:41
int Stat(const CURL &url, struct __stat64 *buffer) override
Fills struct __stat64 with information about file specified by url.
Definition: MusicDatabaseFile.cpp:61
Definition: URL.h:20
Definition: File.h:37
Definition: IFile.h:42
Definition: MusicDatabaseFile.h:16