Merge pull request #4775 from jmarshallnz/empty_episode_playcount
[vuplus_xbmc] / xbmc / view / ViewState.h
1 #pragma once
2 /*
3  *      Copyright (C) 2005-2013 Team XBMC
4  *      http://xbmc.org
5  *
6  *  This Program is free software; you can redistribute it and/or modify
7  *  it under the terms of the GNU General Public License as published by
8  *  the Free Software Foundation; either version 2, or (at your option)
9  *  any later version.
10  *
11  *  This Program is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  *  GNU General Public License for more details.
15  *
16  *  You should have received a copy of the GNU General Public License
17  *  along with XBMC; see the file COPYING.  If not, see
18  *  <http://www.gnu.org/licenses/>.
19  *
20  */
21
22 #include "utils/SortUtils.h"
23
24 #define DEFAULT_VIEW_AUTO (VIEW_TYPE_AUTO << 16)
25 #define DEFAULT_VIEW_LIST (VIEW_TYPE_LIST << 16)
26 #define DEFAULT_VIEW_ICONS (VIEW_TYPE_ICON << 16)
27 #define DEFAULT_VIEW_BIG_ICONS (VIEW_TYPE_BIG_ICON << 16)
28 #define DEFAULT_VIEW_INFO (VIEW_TYPE_INFO << 16)
29 #define DEFAULT_VIEW_BIG_INFO (VIEW_TYPE_BIG_INFO << 16)
30 #define DEFAULT_VIEW_MAX (((VIEW_TYPE_MAX - 1) << 16) | 60)
31
32 class CViewState
33 {
34 public:
35   CViewState(int viewMode, SortBy sortMethod, SortOrder sortOrder, SortAttribute sortAttributes = SortAttributeNone)
36   {
37     m_viewMode = viewMode;
38     m_sortDescription.sortBy = sortMethod;
39     m_sortDescription.sortOrder = sortOrder;
40     m_sortDescription.sortAttributes = sortAttributes;
41   };
42   CViewState()
43   {
44     m_viewMode = 0;
45     m_sortDescription.sortBy = SortByLabel;
46     m_sortDescription.sortOrder = SortOrderAscending;
47   };
48
49   int m_viewMode;
50   SortDescription m_sortDescription;
51 };