File indexing completed on 2024-05-19 04:55:59

0001 /**
0002  * \file trackdatamatcher.h
0003  * Shuffle imported tracks to optimize match with length, track or title.
0004  *
0005  * \b Project: Kid3
0006  * \author Urs Fleisch
0007  * \date 19 Jun 2011
0008  *
0009  * Copyright (C) 2011-2018  Urs Fleisch
0010  *
0011  * This file is part of Kid3.
0012  *
0013  * Kid3 is free software; you can redistribute it and/or modify
0014  * it under the terms of the GNU General Public License as published by
0015  * the Free Software Foundation; either version 2 of the License, or
0016  * (at your option) any later version.
0017  *
0018  * Kid3 is distributed in the hope that it will be useful,
0019  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0020  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0021  * GNU General Public License for more details.
0022  *
0023  * You should have received a copy of the GNU General Public License
0024  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
0025  */
0026 
0027 #pragma once
0028 
0029 #include "kid3api.h"
0030 
0031 class TrackDataModel;
0032 
0033 /**
0034  * Shuffle imported tracks to optimize match with length, track or title.
0035  */
0036 namespace TrackDataMatcher {
0037 
0038 /**
0039  * Match import data with length.
0040  *
0041  * @param trackDataModel tracks to match
0042  * @param diffCheckEnable true if time difference check is enabled
0043  * @param maxDiff maximum allowed time difference
0044  */
0045 bool KID3_CORE_EXPORT matchWithLength(TrackDataModel* trackDataModel,
0046                      bool diffCheckEnable, int maxDiff);
0047 
0048 /**
0049  * Match import data with track number.
0050  *
0051  * @param trackDataModel tracks to match
0052  */
0053 bool KID3_CORE_EXPORT matchWithTrack(TrackDataModel* trackDataModel);
0054 
0055 /**
0056  * Match import data with title.
0057  *
0058  * @param trackDataModel tracks to match
0059  */
0060 bool KID3_CORE_EXPORT matchWithTitle(TrackDataModel* trackDataModel);
0061 
0062 }