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"
33 XBMCCOMMONS_STANDARD_EXCEPTION(ListItemException);
36 typedef Alternative<StringOrInt,Tuple<String, StringOrInt> > InfoLabelStringOrTuple;
39 typedef Alternative<StringOrInt, std::vector<InfoLabelStringOrTuple> > InfoLabelValue;
44 typedef Dictionary<InfoLabelValue> InfoLabelDict;
55 #if !defined SWIG && !defined DOXYGEN_SHOULD_SKIP_THIS
60 #ifdef DOXYGEN_SHOULD_USE_THIS
101 ListItem(
const String& label = emptyString,
102 const String& label2 = emptyString,
103 const String& path = emptyString,
104 bool offscreen =
false);
107 #if !defined SWIG && !defined DOXYGEN_SHOULD_SKIP_THIS
108 inline explicit ListItem(CFileItemPtr pitem) : item(std::move(pitem)), m_offscreen(false) {}
110 static inline AddonClass::Ref<ListItem> fromString(
const String& str)
112 AddonClass::Ref<ListItem> ret = AddonClass::Ref<ListItem>(
new ListItem());
113 ret->item.reset(
new CFileItem(str));
118 #ifndef DOXYGEN_SHOULD_SKIP_THIS
122 #ifdef DOXYGEN_SHOULD_USE_THIS
146 #ifdef DOXYGEN_SHOULD_USE_THIS
170 #ifdef DOXYGEN_SHOULD_USE_THIS
194 #ifdef DOXYGEN_SHOULD_USE_THIS
218 #ifdef DOXYGEN_SHOULD_USE_THIS
243 #ifdef DOXYGEN_SHOULD_USE_THIS
278 #ifdef DOXYGEN_SHOULD_USE_THIS
313 void setArt(
const Properties& dictionary);
316 #ifdef DOXYGEN_SHOULD_USE_THIS
342 #ifdef DOXYGEN_SHOULD_USE_THIS
374 void setUniqueIDs(
const Properties& dictionary,
const String& defaultrating =
"");
377 #ifdef DOXYGEN_SHOULD_USE_THIS
410 void setRating(
const std::string& type,
float rating,
int votes = 0,
bool defaultt =
false);
413 #ifdef DOXYGEN_SHOULD_USE_THIS
438 void addSeason(
int number, std::string name =
"");
441 #ifdef DOXYGEN_SHOULD_USE_THIS
473 String
getArt(
const char* key);
476 #ifdef DOXYGEN_SHOULD_USE_THIS
497 #ifdef DOXYGEN_SHOULD_USE_THIS
529 #ifdef DOXYGEN_SHOULD_USE_THIS
561 #ifdef DOXYGEN_SHOULD_USE_THIS
593 #ifdef DOXYGEN_SHOULD_USE_THIS
615 void select(
bool selected);
618 #ifdef DOXYGEN_SHOULD_USE_THIS
643 #ifdef DOXYGEN_SHOULD_USE_THIS
793 void setInfo(
const char* type,
const InfoLabelDict& infoLabels);
796 #ifdef DOXYGEN_SHOULD_USE_THIS
827 void setCast(
const std::vector<Properties>& actors);
830 #ifdef DOXYGEN_SHOULD_USE_THIS
862 #ifdef DOXYGEN_SHOULD_USE_THIS
893 const std::string& art_type =
"",
894 const std::string& preview =
"",
895 const std::string& referrer =
"",
896 const std::string& cache =
"",
902 #ifdef DOXYGEN_SHOULD_USE_THIS
946 void addStreamInfo(
const char* cType,
const Properties& dictionary);
949 #ifdef DOXYGEN_SHOULD_USE_THIS
975 void addContextMenuItems(
const std::vector<Tuple<String,String> >& items,
bool replaceItems =
false);
978 #ifdef DOXYGEN_SHOULD_USE_THIS
1025 void setProperty(
const char * key,
const String& value);
1028 #ifdef DOXYGEN_SHOULD_USE_THIS
1052 #ifdef DOXYGEN_SHOULD_USE_THIS
1080 #ifdef DOXYGEN_SHOULD_USE_THIS
1102 void setPath(
const String& path);
1105 #ifdef DOXYGEN_SHOULD_USE_THIS
1121 #ifdef DOXYGEN_SHOULD_USE_THIS
1140 #ifdef DOXYGEN_SHOULD_USE_THIS
1163 void setSubtitles(
const std::vector<String>& subtitleFiles);
1166 #ifdef DOXYGEN_SHOULD_USE_THIS
1184 #ifdef DOXYGEN_SHOULD_USE_THIS
1201 #ifdef DOXYGEN_SHOULD_USE_THIS
1218 #ifdef DOXYGEN_SHOULD_USE_THIS
1235 #ifdef DOXYGEN_SHOULD_USE_THIS
1253 std::vector<std::string> getStringArray(
const InfoLabelValue& alt,
1254 const std::string& tag,
1256 const std::string& separator);
1257 std::vector<std::string> getVideoStringArray(
const InfoLabelValue& alt,
1258 const std::string& tag,
1259 std::string value =
"");
1260 std::vector<std::string> getMusicStringArray(
const InfoLabelValue& alt,
1261 const std::string& tag,
1262 std::string value =
"");
1264 CVideoInfoTag* GetVideoInfoTag();
1265 const CVideoInfoTag* GetVideoInfoTag()
const;
1267 MUSIC_INFO::CMusicInfoTag* GetMusicInfoTag();
1268 const MUSIC_INFO::CMusicInfoTag* GetMusicInfoTag()
const;
1270 void setTitleRaw(std::string title);
1271 void setPathRaw(
const std::string& path);
1272 void setCountRaw(
int count);
1273 void setSizeRaw(int64_t size);
1274 void setDateTimeRaw(
const std::string& dateTime);
1275 void setIsFolderRaw(
bool isFolder);
1276 void setStartOffsetRaw(
double startOffset);
1277 void setMimeTypeRaw(
const std::string& mimetype);
1278 void setSpecialSortRaw(std::string specialSort);
1279 void setContentLookupRaw(
bool enable);
1280 void addArtRaw(std::string type,
const std::string& url);
1281 void addPropertyRaw(std::string type,
const CVariant& value);
1282 void addSubtitlesRaw(
const std::vector<std::string>& subtitles);
1285 #ifndef DOXYGEN_SHOULD_SKIP_THIS
1286 typedef std::vector<ListItem*> ListItemList;
Definition: InfoTagGame.h:49
Definition: InfoTagMusic.h:48
Definition: InfoTagPicture.h:44
Definition: InfoTagVideo.h:815
Definition: ListItem.h:53
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...