1 /*
2  *  Copyright (C) 2005-2021 Team Kodi (https://kodi.tv)
3  *
4  *  SPDX-License-Identifier: GPL-2.0-or-later
5  *  See LICENSE.md for more information.
6  */
7 
8 #pragma once
9 
10 #include <string>
11 
12 namespace iptvsimple
13 {
14   enum class StreamType
15     : int // same type as addon settings
16   {
17     HLS = 0,
18     DASH,
19     SMOOTH_STREAMING,
20     TS,
21     PLUGIN,
22     MIME_TYPE_UNRECOGNISED,
23     OTHER_TYPE
24   };
25 
26   namespace data
27   {
28     class StreamEntry
29     {
30     public:
GetStreamKey()31       const std::string& GetStreamKey() const { return m_streamKey; }
SetStreamKey(const std::string & value)32       void SetStreamKey(const std::string& value) { m_streamKey = value; }
33 
GetStreamType()34       const StreamType& GetStreamType() const { return m_streamType; }
SetStreamType(const StreamType & value)35       void SetStreamType(const StreamType& value) { m_streamType = value; }
36 
GetMimeType()37       const std::string& GetMimeType() const { return m_mimeType; }
SetMimeType(const std::string & value)38       void SetMimeType(const std::string& value) { m_mimeType = value; }
39 
GetLastAccessTime()40       time_t GetLastAccessTime() const { return m_lastAcessTime; }
SetLastAccessTime(time_t value)41       void SetLastAccessTime(time_t value) { m_lastAcessTime = value; }
42 
43     private:
44       std::string m_streamKey; // URL or catchup source
45       StreamType m_streamType;
46       std::string m_mimeType;
47       time_t m_lastAcessTime;
48     };
49   } //namespace data
50 } //namespace iptvsimple
51