diff options
Diffstat (limited to 'xbmc/guilib/guiinfo/GUIInfo.cpp')
-rw-r--r-- | xbmc/guilib/guiinfo/GUIInfo.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/xbmc/guilib/guiinfo/GUIInfo.cpp b/xbmc/guilib/guiinfo/GUIInfo.cpp new file mode 100644 index 0000000..5542a78 --- /dev/null +++ b/xbmc/guilib/guiinfo/GUIInfo.cpp @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv + * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. + */ + +#include "GUIInfo.h" + +#include <assert.h> + +using namespace KODI::GUILIB::GUIINFO; + +void CGUIInfo::SetInfoFlag(uint32_t flag) +{ + assert(flag >= (1 << 24)); + m_data1 |= flag; +} + +uint32_t CGUIInfo::GetInfoFlag() const +{ + // we strip out the bottom 24 bits, where we keep data + // and return the flag only + return m_data1 & 0xff000000; +} + +uint32_t CGUIInfo::GetData1() const +{ + // we strip out the top 8 bits, where we keep flags + // and return the unflagged data + return m_data1 & ((1 << 24) -1); +} |