| QGIS API Documentation
    3.16.0-Hannover (43b64b13f3)
    | 
 
 
 
Go to the documentation of this file.
   27 #include <QTextStream> 
   35     QFileInfo xsdFileInfo( resourcesDir, QStringLiteral( 
"schemaExtension.xsd" ) );
 
   36     QString schema_str = QStringLiteral( 
"<?xml version='1.0'?>" );
 
   38     if ( !xsdFileInfo.exists() )
 
   45       QFile file( xsdFileInfo.absoluteFilePath() );
 
   46       if ( file.open( QFile::ReadOnly | QFile::Text ) )
 
   48         QTextStream in( &file );
 
   49         schema_str = in.readAll();
 
   58     response.
setHeader( QStringLiteral( 
"Content-Type" ), QStringLiteral( 
"text/xml; charset=utf-8" ) );
 
   59     response.
write( schema_str );
 
  
void writeGetSchemaExtension(QgsServerResponse &response)
Output GetSchemaExtension response.
virtual void write(const QString &data)
Write string This is a convenient method that will write directly to the underlying I/O device.
Median cut implementation.
static void logMessage(const QString &message, const QString &tag=QString(), Qgis::MessageLevel level=Qgis::Warning, bool notifyUser=true)
Adds a message to the log instance (and creates it if necessary).
QgsServerResponse Class defining response interface passed to services QgsService::executeRequest() m...
static QString serverResourcesPath()
Returns the path to the server resources directory.
virtual void setHeader(const QString &key, const QString &value)=0
Set Header entry Add Header entry to the response Note that it is usually an error to set Header afte...