blob: a17c87266d865f9993129577ae24cf0973b0842a [file] [log] [blame]
Aline Gondim Santos607635b2022-08-22 15:40:59 -03001/**
2 * Copyright (C) 2022 Savoir-faire Linux Inc.
3 *
4 * Author: Aline Gondim Santos <aline.gondimsantos@savoirfairelinux.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21#ifndef COMMON_H
22#define COMMON_H
23
Aline Gondim Santos9bd153e2022-08-25 10:49:23 -030024#include <fstream>
Aline Gondim Santos607635b2022-08-22 15:40:59 -030025#include <string>
Aline Gondim Santos676d1c32022-12-05 21:13:25 -030026#include <vector>
Aline Gondim Santos607635b2022-08-22 15:40:59 -030027
28namespace string_utils {
Aline Gondim Santos4b62db12022-10-06 18:20:07 -030029#ifdef WIN32
Aline Gondim Santos607635b2022-08-22 15:40:59 -030030std::wstring to_wstring(const std::string& str);
Aline Gondim Santos607635b2022-08-22 15:40:59 -030031#endif // WIN32
Aline Gondim Santos4b62db12022-10-06 18:20:07 -030032void ffmpegFormatStringInline(std::string& str);
33std::string ffmpegFormatString(const std::string& str);
Aline Gondim Santos329f8622022-11-08 08:04:22 -030034void ffmpegScapeStringInline(std::string& str);
35std::string ffmpegScapeString(const std::string& str);
Aline Gondim Santos676d1c32022-12-05 21:13:25 -030036std::vector<std::string> getWords(const std::string& text, const std::string& splits);
Aline Gondim Santos4b62db12022-10-06 18:20:07 -030037} // namespace string_utils
Aline Gondim Santos9bd153e2022-08-25 10:49:23 -030038
39namespace file_utils {
40void openStream(std::ifstream& file, const std::string& path);
41}
Aline Gondim Santos607635b2022-08-22 15:40:59 -030042#endif // COMMON_H