Sayonara Player
StreamRecorderUtils.h
1 /* StreamRecorderUtils.h */
2 
3 /* Copyright (C) 2011-2017 Lucio Carreras
4  *
5  * This file is part of sayonara player
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11 
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16 
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 
22 
23 #ifndef STREAMRECORDERUTILS_H
24 #define STREAMRECORDERUTILS_H
25 
26 #include <QPair>
27 #include <QList>
28 #include <QString>
29 #include <QHash>
30 #include <QDateTime>
31 #include <QList>
32 
33 class MetaData;
34 
35 namespace StreamRecorder
36 {
37  namespace Utils
38  {
39  enum class ErrorCode : uint8_t
40  {
41  OK=1,
42  BracketError,
43  UnknownTag,
44  MissingUniqueTag,
45  InvalidChars,
46  Empty
47  };
48 
49  // filename, playlistname
50  using TargetPaths=QPair<QString, QString>;
51 
52  QList<QString> supported_tags();
53  QList<QPair<QString, QString>> descriptions();
54 
55  ErrorCode validate_template(const QString& target_path_template, int* invalid_idx);
56 
57  QString target_path_template_default(bool use_session_path);
58 
68  TargetPaths full_target_path(const QString& sr_path, const QString& path_template, const MetaData& md, const QDate& d, const QTime& t);
69 
70  QString parse_error_code(ErrorCode err);
71  }
72 }
73 
74 #endif // STREAMRECORDERUTILS_H
The MetaData class.
Definition: MetaData.h:48
Definition: typedefs.h:28
Definition: org_mpris_media_player2_adaptor.h:20