Repository: xbmc/xbmc
File: xbmc/Util.h (C/C++)

Code before:
#endif
  static std::string ResolveExecutablePath();
  static std::string GetFrameworksPath(bool forPython = false);

  static bool CanBindPrivileged();
  static bool ValidatePort(int port);

  /*!
   * \brief Thread-safe random number generation
   */
  static int GetRandomNumber();

  static int64_t ConvertSecsToMilliSecs(double secs) { return static_cast<int64_t>(secs * 1000); }
  static double ConvertMilliSecsToSecs(int64_t offset) { return offset / 1000.0; }
  static int64_t ConvertMilliSecsToSecsInt(int64_t offset) { return offset / 1000; }
  static int64_t ConvertMilliSecsToSecsIntRounded(int64_t offset) { return ConvertMilliSecsToSecsInt(offset + 499); }

  /** \brief Copy files from the application bundle over to the user data directory in Application Support/Kodi.
  */
  static void CopyUserDataIfNeeded(const std::string& strPath,
                                   const std::string& file,
                                   const std::string& destname = "");

  /** \brief Delete a file with confirmation unless setting is off.
  */
  static bool FileDeleteWithConfirm(const CFileItemPtr& item);

#if !defined(TARGET_WINDOWS)
private:
  static unsigned int s_randomSeed;
#endif

  protected:
    /** \brief Retrieves the base path and the filename of a given video.
    *   \param[in]  videoPath The full path of the video file.
    *   \param[out] basePath The base path of the given video.
    *   \param[out] videoFileName The file name of the given video..
    */
    static void GetVideoBasePathAndFileName(const std::string& videoPath,
                                            std::string& basePath,
                                            std::string& videoFileName);

    /** \brief Retrieves FileItems that could contain associated files of a given video.
    *   \param[in]  videoPath The full path of the video file.
    *   \param[in]  item_exts A | separated string of extensions specifying the associated files.
    *   \param[in]  sub_dirs A vector of sub directory names to look for.
    *   \param[out] items A List of FileItems to scan for associated files.
    */
    static void GetItemsToScan(const std::string& videoPath,
                               const std::string& item_exts,
                               const std::vector<std::string>& sub_dirs,

Review comment (suggestion):
One more time: 

1) This function should be moved to `CFileUtils`.
2) Replace `CFileItemPtr` with `std::shared_ptr>CFileItem>`.

Code after:
#endif
  static std::string ResolveExecutablePath();
  static std::string GetFrameworksPath(bool forPython = false);

  static bool CanBindPrivileged();
  static bool ValidatePort(int port);

  /*!
   * \brief Thread-safe random number generation
   */
  static int GetRandomNumber();

  static int64_t ConvertSecsToMilliSecs(double secs) { return static_cast<int64_t>(secs * 1000); }
  static double ConvertMilliSecsToSecs(int64_t offset) { return offset / 1000.0; }
  static int64_t ConvertMilliSecsToSecsInt(int64_t offset) { return offset / 1000; }
  static int64_t ConvertMilliSecsToSecsIntRounded(int64_t offset) { return ConvertMilliSecsToSecsInt(offset + 499); }

  /** \brief Copy files from the application bundle over to the user data directory in Application Support/Kodi.
  */
  static void CopyUserDataIfNeeded(const std::string& strPath,
                                   const std::string& file,
                                   const std::string& destname = "");

#if !defined(TARGET_WINDOWS)
private:
  static unsigned int s_randomSeed;
#endif

  protected:
    /** \brief Retrieves the base path and the filename of a given video.
    *   \param[in]  videoPath The full path of the video file.
    *   \param[out] basePath The base path of the given video.
    *   \param[out] videoFileName The file name of the given video..
    */
    static void GetVideoBasePathAndFileName(const std::string& videoPath,
                                            std::string& basePath,
                                            std::string& videoFileName);

    /** \brief Retrieves FileItems that could contain associated files of a given video.
    *   \param[in]  videoPath The full path of the video file.
    *   \param[in]  item_exts A | separated string of extensions specifying the associated files.
    *   \param[in]  sub_dirs A vector of sub directory names to look for.
    *   \param[out] items A List of FileItems to scan for associated files.
    */
    static void GetItemsToScan(const std::string& videoPath,
                               const std::string& item_exts,
                               const std::vector<std::string>& sub_dirs,
                               CFileItemList& items);

    /** \brief Searches for associated files of a given video.
    *   \param[in]  videoName The name of the video file.