[Test] Added tests for CUtil::SplitParams
[xbmc.git] / xbmc / filesystem / FTPParse.h
bloba853b0286931e3c4da59f9ab8de37e1579b7fef3
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 std::string getName();
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