[videodb] remove unused seasons table from episode_view
[xbmc.git] / xbmc / platform / posix / XHandle.h
blob158817ed0fefbb413c11637ee15b475194c4108f
1 /*
2 * Copyright (C) 2005-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 "XHandlePublic.h"
12 #include "threads/Condition.h"
13 #include "threads/CriticalSection.h"
15 #include <list>
16 #include <string>
17 #include <vector>
19 #include "PlatformDefs.h"
21 struct CXHandle {
23 public:
24 typedef enum { HND_NULL = 0, HND_FILE, HND_EVENT, HND_MUTEX, HND_FIND_FILE } HandleType;
26 CXHandle();
27 explicit CXHandle(HandleType nType);
28 CXHandle(const CXHandle &src);
30 virtual ~CXHandle();
31 void Init();
32 inline HandleType GetType() { return m_type; }
33 void ChangeType(HandleType newType);
35 XbmcThreads::ConditionVariable *m_hCond;
36 std::list<CXHandle*> m_hParents;
38 // simulate mutex and critical section
39 CCriticalSection *m_hMutex;
40 int RecursionCount; // for mutex - for compatibility with TARGET_WINDOWS critical section
41 int fd;
42 bool m_bManualEvent;
43 time_t m_tmCreation;
44 std::vector<std::string> m_FindFileResults;
45 int m_nFindFileIterator;
46 std::string m_FindFileDir;
47 off64_t m_iOffset;
48 bool m_bCDROM;
49 bool m_bEventSet;
50 int m_nRefCount;
51 CCriticalSection *m_internalLock;
53 static void DumpObjectTracker();
55 protected:
56 HandleType m_type;
57 static int m_objectTracker[10];