diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-11-29 00:33:44 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-12-08 21:29:37 +0100 |
| commit | 3896921f82140b43e32e68f5e509e57b927733fb (patch) | |
| tree | ae155cc726c85ecceec75ddc20aacf2e73c26395 /src | |
| parent | eee577a2146f537d3417eb919d0587ff3e15cd0d (diff) | |
Extract some stuff to verify_internal.h
Diffstat (limited to 'src')
| -rw-r--r-- | src/verify.cc | 1 | ||||
| -rw-r--r-- | src/verify.h | 17 | ||||
| -rw-r--r-- | src/verify_internal.h | 73 |
3 files changed, 74 insertions, 17 deletions
diff --git a/src/verify.cc b/src/verify.cc index f34e0fda..42149197 100644 --- a/src/verify.cc +++ b/src/verify.cc @@ -57,6 +57,7 @@ #include "stereo_j2k_picture_asset.h" #include "stereo_j2k_picture_frame.h" #include "verify.h" +#include "verify_internal.h" #include "verify_j2k.h" #include <libxml/parserInternals.h> #include <xercesc/dom/DOMAttr.hpp> diff --git a/src/verify.h b/src/verify.h index ed36d7af..c333d86e 100644 --- a/src/verify.h +++ b/src/verify.h @@ -732,23 +732,6 @@ bool operator< (dcp::VerificationNote const& a, dcp::VerificationNote const& b); std::ostream& operator<<(std::ostream& s, dcp::VerificationNote const& note); - -struct LinesCharactersResult -{ - bool warning_length_exceeded = false; - bool error_length_exceeded = false; - bool line_count_exceeded = false; -}; - - -extern void verify_text_lines_and_characters( - std::shared_ptr<const dcp::TextAsset> asset, - int warning_length, - int error_length, - dcp::LinesCharactersResult* result - ); - } - #endif diff --git a/src/verify_internal.h b/src/verify_internal.h new file mode 100644 index 00000000..3dfc4fb5 --- /dev/null +++ b/src/verify_internal.h @@ -0,0 +1,73 @@ +/* + Copyright (C) 2024 Carl Hetherington <cth@carlh.net> + + This file is part of libdcp. + + libdcp is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + libdcp is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libdcp. If not, see <http://www.gnu.org/licenses/>. + + In addition, as a special exception, the copyright holders give + permission to link the code of portions of this program with the + OpenSSL library under certain conditions as described in each + individual source file, and distribute linked combinations + including the two. + + You must obey the GNU General Public License in all respects + for all of the code used other than OpenSSL. If you modify + file(s) with this exception, you may extend this exception to your + version of the file(s), but you are not obligated to do so. If you + do not wish to do so, delete this exception statement from your + version. If you delete this exception statement from all source + files in the program, then also delete it here. +*/ + + +/** @file src/verify_internal.h + * @brief Verification-related things exposed for testing. + * + * These things are not intended for use by library users, just + * by the libdcp tests. + */ + + +#ifndef LIBDCP_VERIFY_INTERNAL_H +#define LIBDCP_VERIFY_INTERNAL_H + + +#include <memory> + + +namespace dcp { + +class TextAsset; + +struct LinesCharactersResult +{ + bool warning_length_exceeded = false; + bool error_length_exceeded = false; + bool line_count_exceeded = false; +}; + + +extern void verify_text_lines_and_characters( + std::shared_ptr<const dcp::TextAsset> asset, + int warning_length, + int error_length, + dcp::LinesCharactersResult* result + ); + + +} + + +#endif |
