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 62 ListItem([label, label2, path, offscreen]);
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) {}
114 ret->item = std::make_shared<CFileItem>(str);
119 #ifndef DOXYGEN_SHOULD_SKIP_THIS 123 #ifdef DOXYGEN_SHOULD_USE_THIS 147 #ifdef DOXYGEN_SHOULD_USE_THIS 171 #ifdef DOXYGEN_SHOULD_USE_THIS 192 void setLabel(
const String& label);
195 #ifdef DOXYGEN_SHOULD_USE_THIS 216 void setLabel2(
const String& label);
219 #ifdef DOXYGEN_SHOULD_USE_THIS 241 String getDateTime();
244 #ifdef DOXYGEN_SHOULD_USE_THIS 276 void setDateTime(
const String& dateTime);
279 #ifdef DOXYGEN_SHOULD_USE_THIS 317 #ifdef DOXYGEN_SHOULD_USE_THIS 340 void setIsFolder(
bool isFolder);
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 495 bool isFolder()
const;
498 #ifdef DOXYGEN_SHOULD_USE_THIS 527 String getUniqueID(
const char* key);
530 #ifdef DOXYGEN_SHOULD_USE_THIS 559 float getRating(
const char* key);
562 #ifdef DOXYGEN_SHOULD_USE_THIS 591 int getVotes(
const char* key);
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 834 setAvailableFanart(...);
862 void setAvailableFanart(
const std::vector<Properties>& images);
865 #ifdef DOXYGEN_SHOULD_USE_THIS 866 addAvailableArtwork(...);
895 void addAvailableArtwork(
const std::string& url,
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 953 addContextMenuItems(...);
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 1054 void setProperties(
const Properties& dictionary);
1057 #ifdef DOXYGEN_SHOULD_USE_THIS 1082 String getProperty(
const char* key);
1085 #ifdef DOXYGEN_SHOULD_USE_THIS 1107 void setPath(
const String& path);
1110 #ifdef DOXYGEN_SHOULD_USE_THIS 1123 void setMimeType(
const String& mimetype);
1126 #ifdef DOXYGEN_SHOULD_USE_THIS 1127 setContentLookup(...);
1142 void setContentLookup(
bool enable);
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 1224 getPictureInfoTag();
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 =
"");
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;
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:53
void setInfo(const char *type, const InfoLabelDict &infoLabels)
Definition: ListItem.cpp:374
This class is the superclass for all reference counted classes in the api.
Definition: AddonClass.h:57
Definition: InfoTagMusic.h:47
Definition: VideoInfoTag.h:53
Definition: MusicInfoTag.h:27
This is a bit of a hack for dynamically typed languages.
Definition: Dictionary.h:31