kodi
InfoTagMusic.h
1 /*
2  * Copyright (C) 2005-2018 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 #include "AddonClass.h"
12 
13 #include <vector>
14 
15 namespace MUSIC_INFO
16 {
17 class CMusicInfoTag;
18 }
19 
20 namespace XBMCAddon
21 {
22  namespace xbmc
23  {
24  //
46  //
47  class InfoTagMusic : public AddonClass
48  {
49  private:
51  bool offscreen;
52  bool owned;
53 
54  public:
55 #ifndef SWIG
56  explicit InfoTagMusic(const MUSIC_INFO::CMusicInfoTag* tag);
57  explicit InfoTagMusic(MUSIC_INFO::CMusicInfoTag* tag, bool offscreen = false);
58 #endif
59 
60 #ifdef DOXYGEN_SHOULD_USE_THIS
61  InfoTagMusic(...);
92 #else
93  explicit InfoTagMusic(bool offscreen = false);
94 #endif
95  ~InfoTagMusic() override;
96 
97 #ifdef DOXYGEN_SHOULD_USE_THIS
98  getDbId();
110 #else
111  int getDbId();
112 #endif
113 
114 #ifdef DOXYGEN_SHOULD_USE_THIS
115  getURL();
127 #else
128  String getURL();
129 #endif
130 
131 #ifdef DOXYGEN_SHOULD_USE_THIS
132  getTitle();
144 #else
145  String getTitle();
146 #endif
147 
148 #ifdef DOXYGEN_SHOULD_USE_THIS
149  getMediaType();
167 #else
168  String getMediaType();
169 #endif
170 
171 #ifdef DOXYGEN_SHOULD_USE_THIS
172  getArtist();
184 #else
185  String getArtist();
186 #endif
187 
188 
189 #ifdef DOXYGEN_SHOULD_USE_THIS
190  getAlbum();
202 #else
203  String getAlbum();
204 #endif
205 
206 
207 #ifdef DOXYGEN_SHOULD_USE_THIS
208  getAlbumArtist();
220 #else
221  String getAlbumArtist();
222 #endif
223 
224 
225 #ifdef DOXYGEN_SHOULD_USE_THIS
226  getGenre();
238 #else
239  String getGenre();
240 #endif
241 
242 
243 #ifdef DOXYGEN_SHOULD_USE_THIS
244  getGenres();
256 #else
257  std::vector<String> getGenres();
258 #endif
259 
260 
261 #ifdef DOXYGEN_SHOULD_USE_THIS
262  getDuration();
274 #else
275  int getDuration();
276 #endif
277 
278 
279 #ifdef DOXYGEN_SHOULD_USE_THIS
280  getYear();
293 #else
294  int getYear();
295 #endif
296 
297 #ifdef DOXYGEN_SHOULD_USE_THIS
298  getRating();
310 #else
311  int getRating();
312 #endif
313 
314 #ifdef DOXYGEN_SHOULD_USE_THIS
315  getUserRating();
327 #else
328  int getUserRating();
329 #endif
330 
331 #ifdef DOXYGEN_SHOULD_USE_THIS
332  getTrack();
344 #else
345  int getTrack();
346 #endif
347 
348 #ifdef DOXYGEN_SHOULD_USE_THIS
349  getDisc();
361 #else
362 
365  int getDisc();
366 #endif
367 
368 #ifdef DOXYGEN_SHOULD_USE_THIS
369  getReleaseDate();
381 #else
382  String getReleaseDate();
383 #endif
384 
385 #ifdef DOXYGEN_SHOULD_USE_THIS
386  getListeners();
398 #else
399  int getListeners();
400 #endif
401 
402 #ifdef DOXYGEN_SHOULD_USE_THIS
403  getPlayCount();
415 #else
416  int getPlayCount();
417 #endif
418 
419 #ifdef DOXYGEN_SHOULD_USE_THIS
420  getLastPlayed();
432 #else
433  String getLastPlayed();
434 #endif
435 
436 #ifdef DOXYGEN_SHOULD_USE_THIS
437  getLastPlayedAsW3C();
449 #else
450  String getLastPlayedAsW3C();
451 #endif
452 
453 #ifdef DOXYGEN_SHOULD_USE_THIS
454  getComment();
466 #else
467  String getComment();
468 #endif
469 
470 #ifdef DOXYGEN_SHOULD_USE_THIS
471  getLyrics();
483 #else
484  String getLyrics();
485 #endif
486 
487 #ifdef DOXYGEN_SHOULD_USE_THIS
488  getMusicBrainzTrackID();
500 #else
501  String getMusicBrainzTrackID();
502 #endif
503 
504 #ifdef DOXYGEN_SHOULD_USE_THIS
505  getMusicBrainzArtistID();
517 #else
518  std::vector<String> getMusicBrainzArtistID();
519 #endif
520 
521 #ifdef DOXYGEN_SHOULD_USE_THIS
522  getMusicBrainzAlbumID();
534 #else
535  String getMusicBrainzAlbumID();
536 #endif
537 
538 #ifdef DOXYGEN_SHOULD_USE_THIS
539  getMusicBrainzReleaseGroupID();
551 #else
552  String getMusicBrainzReleaseGroupID();
553 #endif
554 
555 #ifdef DOXYGEN_SHOULD_USE_THIS
556  getMusicBrainzAlbumArtistID();
568 #else
569  std::vector<String> getMusicBrainzAlbumArtistID();
570 #endif
571 
572 #ifdef DOXYGEN_SHOULD_USE_THIS
573  getSongVideoURL();
585 #else
586  String getSongVideoURL();
587 #endif
588 
589 #ifdef DOXYGEN_SHOULD_USE_THIS
590  setDbId(...);
603 #else
604  void setDbId(int dbId, const String& type);
605 #endif
606 
607 #ifdef DOXYGEN_SHOULD_USE_THIS
608  setURL(...);
620 #else
621  void setURL(const String& url);
622 #endif
623 
624 #ifdef DOXYGEN_SHOULD_USE_THIS
625  setMediaType(...);
637 #else
638  void setMediaType(const String& mediaType);
639 #endif
640 
641 #ifdef DOXYGEN_SHOULD_USE_THIS
642  setTrack(...);
654 #else
655  void setTrack(int track);
656 #endif
657 
658 #ifdef DOXYGEN_SHOULD_USE_THIS
659  setDisc(...);
671 #else
672  void setDisc(int disc);
673 #endif
674 
675 #ifdef DOXYGEN_SHOULD_USE_THIS
676  setDuration(...);
688 #else
689  void setDuration(int duration);
690 #endif
691 
692 #ifdef DOXYGEN_SHOULD_USE_THIS
693  setYear(...);
705 #else
706  void setYear(int year);
707 #endif
708 
709 #ifdef DOXYGEN_SHOULD_USE_THIS
710  setReleaseDate(...);
722 #else
723  void setReleaseDate(const String& releaseDate);
724 #endif
725 
726 #ifdef DOXYGEN_SHOULD_USE_THIS
727  setListeners(...);
739 #else
740  void setListeners(int listeners);
741 #endif
742 
743 #ifdef DOXYGEN_SHOULD_USE_THIS
744  setPlayCount(...);
756 #else
757  void setPlayCount(int playcount);
758 #endif
759 
760 #ifdef DOXYGEN_SHOULD_USE_THIS
761  setGenres(...);
773 #else
774  void setGenres(const std::vector<String>& genres);
775 #endif
776 
777 #ifdef DOXYGEN_SHOULD_USE_THIS
778  setAlbum(...);
790 #else
791  void setAlbum(const String& album);
792 #endif
793 
794 #ifdef DOXYGEN_SHOULD_USE_THIS
795  setArtist(...);
807 #else
808  void setArtist(const String& artist);
809 #endif
810 
811 #ifdef DOXYGEN_SHOULD_USE_THIS
812  setAlbumArtist(...);
824 #else
825  void setAlbumArtist(const String& albumArtist);
826 #endif
827 
828 #ifdef DOXYGEN_SHOULD_USE_THIS
829  setTitle(...);
841 #else
842  void setTitle(const String& title);
843 #endif
844 
845 #ifdef DOXYGEN_SHOULD_USE_THIS
846  setRating(...);
858 #else
859  void setRating(float rating);
860 #endif
861 
862 #ifdef DOXYGEN_SHOULD_USE_THIS
863  setUserRating(...);
875 #else
876  void setUserRating(int userrating);
877 #endif
878 
879 #ifdef DOXYGEN_SHOULD_USE_THIS
880  setLyrics(...);
892 #else
893  void setLyrics(const String& lyrics);
894 #endif
895 
896 #ifdef DOXYGEN_SHOULD_USE_THIS
897  setLastPlayed(...);
909 #else
910  void setLastPlayed(const String& lastPlayed);
911 #endif
912 
913 #ifdef DOXYGEN_SHOULD_USE_THIS
914  setMusicBrainzTrackID(...);
926 #else
927  void setMusicBrainzTrackID(const String& musicBrainzTrackID);
928 #endif
929 
930 #ifdef DOXYGEN_SHOULD_USE_THIS
931  setMusicBrainzArtistID(...);
943 #else
944  void setMusicBrainzArtistID(const std::vector<String>& musicBrainzArtistID);
945 #endif
946 
947 #ifdef DOXYGEN_SHOULD_USE_THIS
948  setMusicBrainzAlbumID(...);
960 #else
961  void setMusicBrainzAlbumID(const String& musicBrainzAlbumID);
962 #endif
963 
964 #ifdef DOXYGEN_SHOULD_USE_THIS
965  setMusicBrainzReleaseGroupID(...);
977 #else
978  void setMusicBrainzReleaseGroupID(const String& musicBrainzReleaseGroupID);
979 #endif
980 
981 #ifdef DOXYGEN_SHOULD_USE_THIS
982  setMusicBrainzAlbumArtistID(...);
994 #else
995  void setMusicBrainzAlbumArtistID(const std::vector<String>& musicBrainzAlbumArtistID);
996 #endif
997 
998 #ifdef DOXYGEN_SHOULD_USE_THIS
999  setComment(...);
1011 #else
1012  void setComment(const String& comment);
1013 #endif
1014 
1015 #ifdef DOXYGEN_SHOULD_USE_THIS
1016  setSongVideoURL(...);
1028 #else
1029  void setSongVideoURL(const String& songVideoURL);
1030 #endif
1031 
1032 #ifndef SWIG
1033  static void setDbIdRaw(MUSIC_INFO::CMusicInfoTag* infoTag, int dbId, const String& type);
1034  static void setURLRaw(MUSIC_INFO::CMusicInfoTag* infoTag, const String& url);
1035  static void setMediaTypeRaw(MUSIC_INFO::CMusicInfoTag* infoTag, const String& mediaType);
1036  static void setTrackRaw(MUSIC_INFO::CMusicInfoTag* infoTag, int track);
1037  static void setDiscRaw(MUSIC_INFO::CMusicInfoTag* infoTag, int disc);
1038  static void setDurationRaw(MUSIC_INFO::CMusicInfoTag* infoTag, int duration);
1039  static void setYearRaw(MUSIC_INFO::CMusicInfoTag* infoTag, int year);
1040  static void setReleaseDateRaw(MUSIC_INFO::CMusicInfoTag* infoTag, const String& releaseDate);
1041  static void setListenersRaw(MUSIC_INFO::CMusicInfoTag* infoTag, int listeners);
1042  static void setPlayCountRaw(MUSIC_INFO::CMusicInfoTag* infoTag, int playcount);
1043  static void setGenresRaw(MUSIC_INFO::CMusicInfoTag* infoTag,
1044  const std::vector<String>& genres);
1045  static void setAlbumRaw(MUSIC_INFO::CMusicInfoTag* infoTag, const String& album);
1046  static void setArtistRaw(MUSIC_INFO::CMusicInfoTag* infoTag, const String& artist);
1047  static void setAlbumArtistRaw(MUSIC_INFO::CMusicInfoTag* infoTag, const String& albumArtist);
1048  static void setTitleRaw(MUSIC_INFO::CMusicInfoTag* infoTag, const String& title);
1049  static void setRatingRaw(MUSIC_INFO::CMusicInfoTag* infoTag, float rating);
1050  static void setUserRatingRaw(MUSIC_INFO::CMusicInfoTag* infoTag, int userrating);
1051  static void setLyricsRaw(MUSIC_INFO::CMusicInfoTag* infoTag, const String& lyrics);
1052  static void setLastPlayedRaw(MUSIC_INFO::CMusicInfoTag* infoTag, const String& lastPlayed);
1053  static void setMusicBrainzTrackIDRaw(MUSIC_INFO::CMusicInfoTag* infoTag,
1054  const String& musicBrainzTrackID);
1055  static void setMusicBrainzArtistIDRaw(MUSIC_INFO::CMusicInfoTag* infoTag,
1056  const std::vector<String>& musicBrainzArtistID);
1057  static void setMusicBrainzAlbumIDRaw(MUSIC_INFO::CMusicInfoTag* infoTag,
1058  const String& musicBrainzAlbumID);
1059  static void setMusicBrainzReleaseGroupIDRaw(MUSIC_INFO::CMusicInfoTag* infoTag,
1060  const String& musicBrainzReleaseGroupID);
1061  static void setMusicBrainzAlbumArtistIDRaw(
1062  MUSIC_INFO::CMusicInfoTag* infoTag, const std::vector<String>& musicBrainzAlbumArtistID);
1063  static void setCommentRaw(MUSIC_INFO::CMusicInfoTag* infoTag, const String& comment);
1064  static void setSongVideoURLRaw(MUSIC_INFO::CMusicInfoTag* infoTag,
1065  const String& songVideoURL);
1066 #endif
1067  };
1069  }
1070 }
Defining LOG_LIFECYCLE_EVENTS will log all instantiations, deletions and also reference countings (in...
Definition: Addon.cpp:25
This class is the superclass for all reference counted classes in the api.
Definition: AddonClass.h:57
Definition: InfoTagMusic.h:47
Definition: MusicInfoTag.h:27
Definition: visualization.h:21
Definition: Application.h:77