Repository: xbmc/xbmc
File: xbmc/pvr/PVRPlaybackState.h (C/C++)

Code before:
   */
  void OnPlaybackStarted(const CFileItem& item);

  /*!
   * @brief Inform that playback of an item was stopped due to user interaction.
   * @param item The item that stopped to play.
   * @return True, if the state has changed, false otherwise
   */
  bool OnPlaybackStopped(const CFileItem& item);

  /*!
   * @brief Inform that playback of an item has stopped without user interaction.
   * @param item The item that ended to play.
   * @return True, if the state has changed, false otherwise
   */
  bool OnPlaybackEnded(const CFileItem& item);

  /*!
   * @brief Start playback of the given item.
   * @param item containing a channel, a recording or an epg tag.
   * @param mode playback mode.
   */
  void StartPlayback(
      CFileItem* item,
      ContentUtils::PlayMode mode = ContentUtils::PlayMode::CHECK_AUTO_PLAY_NEXT_ITEM,
      bool fromEpgAsLive = false) const;

  /*!
   * @brief Check if a TV channel, radio channel or recording is playing.
   * @return True if it's playing, false otherwise.
   */
  bool IsPlaying() const;

  /*!
   * @brief Check if a TV channel is playing.
   * @return True if it's playing, false otherwise.
   */
  bool IsPlayingTV() const;

  /*!
   * @brief Check if a radio channel is playing.
   * @return True if it's playing, false otherwise.
   */
  bool IsPlayingRadio() const;

  /*!
   * @brief Check if a an encrypted TV or radio channel is playing.
   * @return True if it's playing, false otherwise.
   */
  bool IsPlayingEncryptedChannel() const;


Review comment (suggestion):
Do you see a way to avoid the bool param, for example by providing an new method? I'm not a fan of bool parameters, because resulting calling code is (almost ever) not really readable.

And please, no default parameters. Those are for the lazy guys only. :-)

Code after:
   * @brief Inform that playback of an item just started.
   * @param item The item that started to play.
   */
  void OnPlaybackStarted(const CFileItem& item);

  /*!
   * @brief Inform that playback of an item was stopped due to user interaction.
   * @param item The item that stopped to play.
   * @return True, if the state has changed, false otherwise
   */
  bool OnPlaybackStopped(const CFileItem& item);

  /*!
   * @brief Inform that playback of an item has stopped without user interaction.
   * @param item The item that ended to play.
   * @return True, if the state has changed, false otherwise
   */
  bool OnPlaybackEnded(const CFileItem& item);

  /*!
   * @brief Start playback of the given item.
   * @param item containing a channel, a recording or an epg tag.
   * @param mode playback mode.
   */
  void StartPlayback(std::unique_ptr<CFileItem>& item,
                     ContentUtils::PlayMode mode,
                     PVR_SOURCE source) const;

  /*!
   * @brief Check if a TV channel, radio channel or recording is playing.
   * @return True if it's playing, false otherwise.
   */
  bool IsPlaying() const;

  /*!
   * @brief Check if a TV channel is playing.
   * @return True if it's playing, false otherwise.
   */
  bool IsPlayingTV() const;

  /*!
   * @brief Check if a radio channel is playing.
   * @return True if it's playing, false otherwise.
   */
  bool IsPlayingRadio() const;

  /*!
   * @brief Check if a an encrypted TV or radio channel is playing.
   * @return True if it's playing, false otherwise.
   */
  bool IsPlayingEncryptedChannel() const;