11#include "AddonClass.h"
12#include "AddonString.h"
13#include "Alternative.h"
14#include "Dictionary.h"
16#include "InfoTagGame.h"
17#include "InfoTagMusic.h"
18#include "InfoTagPicture.h"
19#include "InfoTagVideo.h"
22#include "commons/Exception.h"
34 XBMCCOMMONS_STANDARD_EXCEPTION(ListItemException);
37 typedef Alternative<StringOrInt,Tuple<String, StringOrInt> > InfoLabelStringOrTuple;
40 typedef Alternative<StringOrInt, std::vector<InfoLabelStringOrTuple> > InfoLabelValue;
45 typedef Dictionary<InfoLabelValue> InfoLabelDict;
56#if !defined SWIG && !defined DOXYGEN_SHOULD_SKIP_THIS
61#ifdef DOXYGEN_SHOULD_USE_THIS
102 ListItem(
const String& label = emptyString,
103 const String& label2 = emptyString,
104 const String& path = emptyString,
105 bool offscreen =
false);
108#if !defined SWIG && !defined DOXYGEN_SHOULD_SKIP_THIS
109 inline explicit ListItem(CFileItemPtr pitem) : item(std::move(pitem)), m_offscreen(false) {}
111 static inline AddonClass::Ref<ListItem> fromString(
const String& str)
113 AddonClass::Ref<ListItem> ret = AddonClass::Ref<ListItem>(
new ListItem());
114 ret->item = std::make_shared<CFileItem>(str);
119#ifndef DOXYGEN_SHOULD_SKIP_THIS
120 ~ListItem()
override;
123#ifdef DOXYGEN_SHOULD_USE_THIS
147#ifdef DOXYGEN_SHOULD_USE_THIS
171#ifdef DOXYGEN_SHOULD_USE_THIS
195#ifdef DOXYGEN_SHOULD_USE_THIS
219#ifdef DOXYGEN_SHOULD_USE_THIS
244#ifdef DOXYGEN_SHOULD_USE_THIS
279#ifdef DOXYGEN_SHOULD_USE_THIS
314 void setArt(
const Properties& dictionary);
317#ifdef DOXYGEN_SHOULD_USE_THIS
343#ifdef DOXYGEN_SHOULD_USE_THIS
375 void setUniqueIDs(
const Properties& dictionary,
const String& defaultrating =
"");
378#ifdef DOXYGEN_SHOULD_USE_THIS
411 void setRating(
const std::string& type,
float rating,
int votes = 0,
bool defaultt =
false);
414#ifdef DOXYGEN_SHOULD_USE_THIS
439 void addSeason(
int number, std::string name =
"");
442#ifdef DOXYGEN_SHOULD_USE_THIS
474 String
getArt(
const char* key);
477#ifdef DOXYGEN_SHOULD_USE_THIS
498#ifdef DOXYGEN_SHOULD_USE_THIS
530#ifdef DOXYGEN_SHOULD_USE_THIS
562#ifdef DOXYGEN_SHOULD_USE_THIS
594#ifdef DOXYGEN_SHOULD_USE_THIS
616 void select(
bool selected);
619#ifdef DOXYGEN_SHOULD_USE_THIS
644#ifdef DOXYGEN_SHOULD_USE_THIS
796 void setInfo(
const char* type,
const InfoLabelDict& infoLabels);
799#ifdef DOXYGEN_SHOULD_USE_THIS
830 void setCast(
const std::vector<Properties>& actors);
833#ifdef DOXYGEN_SHOULD_USE_THIS
866#ifdef DOXYGEN_SHOULD_USE_THIS
897 const std::string& art_type =
"",
898 const std::string& preview =
"",
899 const std::string& referrer =
"",
900 const std::string& cache =
"",
906#ifdef DOXYGEN_SHOULD_USE_THIS
950 void addStreamInfo(
const char* cType,
const Properties& dictionary);
953#ifdef DOXYGEN_SHOULD_USE_THIS
979 void addContextMenuItems(
const std::vector<Tuple<String,String> >& items,
bool replaceItems =
false);
982#ifdef DOXYGEN_SHOULD_USE_THIS
1031 void setProperty(
const char * key,
const String& value);
1034#ifdef DOXYGEN_SHOULD_USE_THIS
1058#ifdef DOXYGEN_SHOULD_USE_THIS
1086#ifdef DOXYGEN_SHOULD_USE_THIS
1108 void setPath(
const String& path);
1111#ifdef DOXYGEN_SHOULD_USE_THIS
1127#ifdef DOXYGEN_SHOULD_USE_THIS
1146#ifdef DOXYGEN_SHOULD_USE_THIS
1164#ifdef DOXYGEN_SHOULD_USE_THIS
1182#ifdef DOXYGEN_SHOULD_USE_THIS
1199#ifdef DOXYGEN_SHOULD_USE_THIS
1219#ifdef DOXYGEN_SHOULD_USE_THIS
1242 void setSubtitles(
const std::vector<String>& subtitleFiles);
1245#ifdef DOXYGEN_SHOULD_USE_THIS
1263#ifdef DOXYGEN_SHOULD_USE_THIS
1280#ifdef DOXYGEN_SHOULD_USE_THIS
1297#ifdef DOXYGEN_SHOULD_USE_THIS
1314#ifdef DOXYGEN_SHOULD_USE_THIS
1332 std::vector<std::string> getStringArray(
const InfoLabelValue& alt,
1333 const std::string& tag,
1335 const std::string& separator);
1336 std::vector<std::string> getVideoStringArray(
const InfoLabelValue& alt,
1337 const std::string& tag,
1338 std::string value =
"");
1339 std::vector<std::string> getMusicStringArray(
const InfoLabelValue& alt,
1340 const std::string& tag,
1341 std::string value =
"");
1343 CVideoInfoTag* GetVideoInfoTag();
1344 const CVideoInfoTag* GetVideoInfoTag()
const;
1346 MUSIC_INFO::CMusicInfoTag* GetMusicInfoTag();
1347 const MUSIC_INFO::CMusicInfoTag* GetMusicInfoTag()
const;
1349 void setTitleRaw(
const std::string& title);
1350 void setPathRaw(
const std::string& path);
1351 void setCountRaw(
int count);
1352 void setSizeRaw(int64_t size);
1353 void setDateTimeRaw(
const std::string& dateTime);
1354 void setIsFolderRaw(
bool isFolder);
1355 void setStartOffsetRaw(
double startOffset);
1356 void setMimeTypeRaw(
const std::string& mimetype);
1357 void setSpecialSortRaw(std::string specialSort);
1358 void setContentLookupRaw(
bool enable);
1359 void addArtRaw(std::string type,
const std::string& url);
1360 void addPropertyRaw(std::string type,
const CVariant& value);
1361 void addSubtitlesRaw(
const std::vector<std::string>& subtitles);
1364#ifndef DOXYGEN_SHOULD_SKIP_THIS
1365 typedef std::vector<ListItem*> ListItemList;
Definition InfoTagGame.h:49
Definition InfoTagMusic.h:48
Definition InfoTagPicture.h:44
Definition InfoTagVideo.h:902
setLabel(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
setRating(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
getRating(key)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
setCount(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
setInfo(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
getUniqueID(key)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
addContextMenuItems(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
getLabel()
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
getArt(key)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
getVideoInfoTag()
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
getProperty(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
setSubtitles(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
getPictureInfoTag()
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
isSelected()
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
setProperties(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
setIsFolder(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
setAvailableFanart(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
getPath()
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
getMusicInfoTag()
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
addSeason(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
setDateTime(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
setFileTitle(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
setUniqueIDs(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
getGameInfoTag()
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
setOverlay(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
select(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
getDateTime()
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
getLabel2()
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
getVotes(key)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
setLabel2(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
setArt(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
setProperty(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
addStreamInfo(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
ListItem([label, label2, path, offscreen])
Selectable window list item.
setContentLookup(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
setSize(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
addAvailableArtwork(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
setCast(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
isFolder()
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
setMimeType(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
setPath(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...