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
865#ifdef DOXYGEN_SHOULD_USE_THIS
896 const std::string& art_type =
"",
897 const std::string& preview =
"",
898 const std::string& referrer =
"",
899 const std::string& cache =
"",
905#ifdef DOXYGEN_SHOULD_USE_THIS
949 void addStreamInfo(
const char* cType,
const Properties& dictionary);
952#ifdef DOXYGEN_SHOULD_USE_THIS
978 void addContextMenuItems(
const std::vector<Tuple<String,String> >& items,
bool replaceItems =
false);
981#ifdef DOXYGEN_SHOULD_USE_THIS
1030 void setProperty(
const char * key,
const String& value);
1033#ifdef DOXYGEN_SHOULD_USE_THIS
1057#ifdef DOXYGEN_SHOULD_USE_THIS
1085#ifdef DOXYGEN_SHOULD_USE_THIS
1107 void setPath(
const String& path);
1110#ifdef DOXYGEN_SHOULD_USE_THIS
1126#ifdef DOXYGEN_SHOULD_USE_THIS
1145#ifdef DOXYGEN_SHOULD_USE_THIS
1168 void setSubtitles(
const std::vector<String>& subtitleFiles);
1171#ifdef DOXYGEN_SHOULD_USE_THIS
1189#ifdef DOXYGEN_SHOULD_USE_THIS
1206#ifdef DOXYGEN_SHOULD_USE_THIS
1223#ifdef DOXYGEN_SHOULD_USE_THIS
1240#ifdef DOXYGEN_SHOULD_USE_THIS
1258 std::vector<std::string> getStringArray(
const InfoLabelValue& alt,
1259 const std::string& tag,
1261 const std::string& separator);
1262 std::vector<std::string> getVideoStringArray(
const InfoLabelValue& alt,
1263 const std::string& tag,
1264 std::string value =
"");
1265 std::vector<std::string> getMusicStringArray(
const InfoLabelValue& alt,
1266 const std::string& tag,
1267 std::string value =
"");
1269 CVideoInfoTag* GetVideoInfoTag();
1270 const CVideoInfoTag* GetVideoInfoTag()
const;
1272 MUSIC_INFO::CMusicInfoTag* GetMusicInfoTag();
1273 const MUSIC_INFO::CMusicInfoTag* GetMusicInfoTag()
const;
1275 void setTitleRaw(std::string title);
1276 void setPathRaw(
const std::string& path);
1277 void setCountRaw(
int count);
1278 void setSizeRaw(int64_t size);
1279 void setDateTimeRaw(
const std::string& dateTime);
1280 void setIsFolderRaw(
bool isFolder);
1281 void setStartOffsetRaw(
double startOffset);
1282 void setMimeTypeRaw(
const std::string& mimetype);
1283 void setSpecialSortRaw(std::string specialSort);
1284 void setContentLookupRaw(
bool enable);
1285 void addArtRaw(std::string type,
const std::string& url);
1286 void addPropertyRaw(std::string type,
const CVariant& value);
1287 void addSubtitlesRaw(
const std::vector<std::string>& subtitles);
1290#ifndef DOXYGEN_SHOULD_SKIP_THIS
1291 typedef std::vector<ListItem*> ListItemList;
Definition InfoTagGame.h:49
Definition InfoTagMusic.h:48
Definition InfoTagPicture.h:44
Definition InfoTagVideo.h:859
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...
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...
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...
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...
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...