Files
Rivendellaudio/lib/rdescape_string.h
Fred Gleason e2c52bc5a3 2025-10-23 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in 'RDCart::updateLength()' that could cause patently
	ridiculous values to be calculated for the 'Start' and 'End'
	date-time columns in the cart library.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
2025-10-23 15:43:31 -04:00

48 lines
1.8 KiB
C

// rdescape_string.h
//
// Escape non-valid characters in a string.
//
// (C) Copyright 2002-2005,2016-2017 Fred Gleason <fredg@paravelsystems.com>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as
// published by the Free Software Foundation.
//
// This program 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 this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
#ifndef RDESCAPE_STRING_H
#define RDESCAPE_STRING_H
#include <qbytearray.h>
#include <qdatetime.h>
#include <qstring.h>
/*
* These are used in conjunction with the code in RDCart::updateLength()
* to calculate the outer limits of a disjunctive set of QDateTime values.
*
* If either of these values are found by RDCheckDateTime(), they will be
* returned as a NULL value (meaning, "no limits were found").
*/
#define RDCheckDateTime_InvalidStart QDateTime(QDate(3000,1,1),QTime(0,0,0))
#define RDCheckDateTime_InvalidEnd QDateTime(QDate(1000,1,1),QTime(0,0,0))
QString RDCheckDateTime(const QTime &time, const QString &format);
QString RDCheckDateTime(const QDateTime &datetime, const QString &format);
QString RDCheckDateTime(const QDate &date, const QString &format);
QString RDEscapeString(const QString &str);
QString RDEscapeShellString(QString str);
QString RDEscapeBlob(const QByteArray &data);
QString RDEscapeBlob(const char *data,size_t len);
#endif // RDESCAPE_STRING_H