Merge pull request #25808 from CastagnaIT/fix_url_parse
[xbmc.git] / xbmc / filesystem / FTPParse.h
blobdaabb72f3c61336f64441a622f0c1f2ddc120f4b
1 /*
2 * Copyright (C) 2010-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.
7 */
9 #pragma once
11 #include <ctime>
12 #include <stdint.h>
13 #include <string>
15 class CFTPParse
17 public:
18 CFTPParse();
19 int FTPParse(const std::string& str);
20 const std::string& getName() const { return m_name; }
21 int getFlagtrycwd();
22 int getFlagtryretr();
23 uint64_t getSize();
24 time_t getTime();
25 private:
26 std::string m_name; // not necessarily 0-terminated
27 int m_flagtrycwd; // 0 if cwd is definitely pointless, 1 otherwise
28 int m_flagtryretr; // 0 if retr is definitely pointless, 1 otherwise
29 uint64_t m_size; // number of octets
30 time_t m_time = 0; // modification time
31 void setTime(const std::string& str); // Method used to set m_time from a string