Merge pull request #4222 from Montellese/jsonrpc_audiolibrary_fixes
[vuplus_xbmc] / xbmc / video / Bookmark.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 <vector>
23
24 #include "utils/StdString.h"
25
26 class CBookmark
27 {
28 public:
29   CBookmark();
30   void Reset();
31
32   /*! \brief returns true if this bookmark has been set.
33    \return true if totalTimeInSeconds is positive.
34    */
35   bool IsSet() const;
36
37   /*! \brief returns true if this bookmark is part way through the video file
38    \return true if both totalTimeInSeconds and timeInSeconds are positive.
39    */
40   bool IsPartWay() const;
41
42   double timeInSeconds;
43   double totalTimeInSeconds;
44   long partNumber;
45   CStdString thumbNailImage;
46   CStdString playerState;
47   CStdString player;
48   long seasonNumber;
49   long episodeNumber;
50
51   enum EType
52   {
53     STANDARD = 0,
54     RESUME = 1,
55     EPISODE = 2
56   } type;
57 };
58
59 typedef std::vector<CBookmark> VECBOOKMARKS;
60