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 61 ListItem([label, label2, path, offscreen]);
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) {}
118 #ifndef DOXYGEN_SHOULD_SKIP_THIS 122 #ifdef DOXYGEN_SHOULD_USE_THIS 146 #ifdef DOXYGEN_SHOULD_USE_THIS 170 #ifdef DOXYGEN_SHOULD_USE_THIS 191 void setLabel(
const String& label);
194 #ifdef DOXYGEN_SHOULD_USE_THIS 215 void setLabel2(
const String& label);
218 #ifdef DOXYGEN_SHOULD_USE_THIS 240 String getDateTime();
243 #ifdef DOXYGEN_SHOULD_USE_THIS 275 void setDateTime(
const String& dateTime);
278 #ifdef DOXYGEN_SHOULD_USE_THIS 316 #ifdef DOXYGEN_SHOULD_USE_THIS 339 void setIsFolder(
bool isFolder);
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 494 bool isFolder()
const;
497 #ifdef DOXYGEN_SHOULD_USE_THIS 526 String getUniqueID(
const char* key);
529 #ifdef DOXYGEN_SHOULD_USE_THIS 558 float getRating(
const char* key);
561 #ifdef DOXYGEN_SHOULD_USE_THIS 590 int getVotes(
const char* key);
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 831 setAvailableFanart(...);
859 void setAvailableFanart(
const std::vector<Properties>& images);
862 #ifdef DOXYGEN_SHOULD_USE_THIS 863 addAvailableArtwork(...);
892 void addAvailableArtwork(
const std::string& url,
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 950 addContextMenuItems(...);
975 void addContextMenuItems(
const std::vector<
Tuple<String,String> >& items,
bool replaceItems =
false);
978 #ifdef DOXYGEN_SHOULD_USE_THIS 1027 void setProperty(
const char * key,
const String& value);
1030 #ifdef DOXYGEN_SHOULD_USE_THIS 1051 void setProperties(
const Properties& dictionary);
1054 #ifdef DOXYGEN_SHOULD_USE_THIS 1079 String getProperty(
const char* key);
1082 #ifdef DOXYGEN_SHOULD_USE_THIS 1104 void setPath(
const String& path);
1107 #ifdef DOXYGEN_SHOULD_USE_THIS 1120 void setMimeType(
const String& mimetype);
1123 #ifdef DOXYGEN_SHOULD_USE_THIS 1124 setContentLookup(...);
1139 void setContentLookup(
bool enable);
1142 #ifdef DOXYGEN_SHOULD_USE_THIS 1165 void setSubtitles(
const std::vector<String>& subtitleFiles);
1168 #ifdef DOXYGEN_SHOULD_USE_THIS 1186 #ifdef DOXYGEN_SHOULD_USE_THIS 1203 #ifdef DOXYGEN_SHOULD_USE_THIS 1220 #ifdef DOXYGEN_SHOULD_USE_THIS 1221 getPictureInfoTag();
1237 #ifdef DOXYGEN_SHOULD_USE_THIS 1255 std::vector<std::string> getStringArray(
const InfoLabelValue& alt,
1256 const std::string& tag,
1258 const std::string& separator);
1259 std::vector<std::string> getVideoStringArray(
const InfoLabelValue& alt,
1260 const std::string& tag,
1261 std::string value =
"");
1262 std::vector<std::string> getMusicStringArray(
const InfoLabelValue& alt,
1263 const std::string& tag,
1264 std::string value =
"");
1272 void setTitleRaw(std::string title);
1273 void setPathRaw(
const std::string& path);
1274 void setCountRaw(
int count);
1275 void setSizeRaw(int64_t size);
1276 void setDateTimeRaw(
const std::string& dateTime);
1277 void setIsFolderRaw(
bool isFolder);
1278 void setStartOffsetRaw(
double startOffset);
1279 void setMimeTypeRaw(
const std::string& mimetype);
1280 void setSpecialSortRaw(std::string specialSort);
1281 void setContentLookupRaw(
bool enable);
1282 void addArtRaw(std::string type,
const std::string& url);
1283 void addPropertyRaw(std::string type,
const CVariant& value);
1284 void addSubtitlesRaw(
const std::vector<std::string>& subtitles);
1287 #ifndef DOXYGEN_SHOULD_SKIP_THIS 1288 typedef std::vector<ListItem*> ListItemList;
This class is a smart pointer for a Referenced class.
Definition: AddonClass.h:154
Definition: InfoTagGame.h:48
Definition: InfoTagPicture.h:43
Definition: InfoTagVideo.h:858
Defining LOG_LIFECYCLE_EVENTS will log all instantiations, deletions and also reference countings (in...
Definition: Addon.cpp:25
Definition: ListItem.h:52
void setInfo(const char *type, const InfoLabelDict &infoLabels)
Definition: ListItem.cpp:373
This class is the superclass for all reference counted classes in the api.
Definition: AddonClass.h:57
Definition: InfoTagMusic.h:47
Definition: VideoInfoTag.h:51
Definition: MusicInfoTag.h:27
This is a bit of a hack for dynamically typed languages.
Definition: Dictionary.h:31
Represents a file on a share.
Definition: FileItem.h:102