xbmc
PlayList.h
1 /*
2  * Copyright (C) 2005-2018 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 #include "AddonClass.h"
12 #include "Exception.h"
13 #include "ListItem.h"
14 #include "playlists/PlayList.h"
15 
16 namespace XBMCAddon
17 {
18  namespace xbmc
19  {
20  XBMCCOMMONS_STANDARD_EXCEPTION(PlayListException);
21 
22  //
48  //
49  class PlayList : public AddonClass
50  {
51  int iPlayList;
52  PLAYLIST::CPlayList *pPlayList;
53 
54  public:
55  explicit PlayList(int playList);
56  ~PlayList() override;
57 
58 #ifdef DOXYGEN_SHOULD_USE_THIS
59  getPlayListId();
67 #else
68  inline int getPlayListId() const { return iPlayList; }
69 #endif
70 
71 #ifdef DOXYGEN_SHOULD_USE_THIS
72  add(...);
99 #else
100  void add(const String& url, XBMCAddon::xbmcgui::ListItem* listitem = NULL, int index = -1);
101 #endif
102 
103 #ifdef DOXYGEN_SHOULD_USE_THIS
104  load(...);
116 #else
117  bool load(const char* filename);
118 #endif
119 
120 #ifdef DOXYGEN_SHOULD_USE_THIS
121  remove(...);
129 #else
130  void remove(const char* filename);
131 #endif
132 
133 #ifdef DOXYGEN_SHOULD_USE_THIS
134  clear();
140 #else
141  void clear();
142 #endif
143 
144 #ifdef DOXYGEN_SHOULD_USE_THIS
145  size();
153 #else
154  int size();
155 #endif
156 
157 #ifdef DOXYGEN_SHOULD_USE_THIS
158  shuffle();
164 #else
165  void shuffle();
166 #endif
167 
168 #ifdef DOXYGEN_SHOULD_USE_THIS
169  unshuffle();
175 #else
176  void unshuffle();
177 #endif
178 
179 #ifdef DOXYGEN_SHOULD_USE_THIS
180  getposition();
188 #else
189  int getposition();
190 #endif
191 
192 #ifdef DOXYGEN_SHOULD_USE_THIS
193  [](...);
205 #else
206  XBMCAddon::xbmcgui::ListItem* operator[](long i);
207 #endif
208  };
210  }
211 }
212 
Definition: PlayList.h:23
PlayList(int playList)
Definition: PlayList.cpp:22
Defining LOG_LIFECYCLE_EVENTS will log all instantiations, deletions and also reference countings (in...
Definition: Addon.cpp:25
Definition: PlayList.h:49
Definition: ListItem.h:52
This class is the superclass for all reference counted classes in the api.
Definition: AddonClass.h:57