Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
ASTYLE formatting
Funded by ItOpen - http://www.itopen.it
  • Loading branch information
elpaso committed Nov 4, 2014
1 parent 4a25575 commit 840fcf3
Showing 1 changed file with 44 additions and 42 deletions.
86 changes: 44 additions & 42 deletions src/mapserver/qgis_map_serv.cpp
Expand Up @@ -351,49 +351,51 @@ int main( int argc, char * argv[] )
QString serviceString = theRequestHandler->parameter( "SERVICE" );

// Enter core services main switch
if ( !theRequestHandler->exceptionRaised() ) {
if ( serviceString == "WCS")
{
QgsWCSProjectParser* p = QgsConfigCache::instance()->wcsConfiguration( configFilePath );
if ( !p )
{
theRequestHandler->setServiceException( QgsMapServiceException( "Project file error", "Error reading the project file" ) );
}
else {
QgsWCSServer wcsServer( configFilePath, parameterMap, p, theRequestHandler.data() );
wcsServer.executeRequest();
}
}
else if ( serviceString == "WFS")
{
QgsWFSProjectParser* p = QgsConfigCache::instance()->wfsConfiguration( configFilePath );
if ( !p )
{
theRequestHandler->setServiceException( QgsMapServiceException( "Project file error", "Error reading the project file" ) );
}
else
{
QgsWFSServer wfsServer( configFilePath, parameterMap, p, theRequestHandler.data() );
wfsServer.executeRequest();
}
}
else if ( serviceString == "WMS")
{
QgsWMSConfigParser* p = QgsConfigCache::instance()->wmsConfiguration( configFilePath, parameterMap );
if ( !p )
{
theRequestHandler->setServiceException( QgsMapServiceException( "WMS configuration error", "There was an error reading the project file or the SLD configuration" ) );
}
else
{
QgsWMSServer wmsServer( configFilePath, parameterMap, p, theRequestHandler.data() , theMapRenderer.data(), &capabilitiesCache );
wmsServer.executeRequest();
}
}
if ( !theRequestHandler->exceptionRaised() )
{
if ( serviceString == "WCS" )
{
QgsWCSProjectParser* p = QgsConfigCache::instance()->wcsConfiguration( configFilePath );
if ( !p )
{
theRequestHandler->setServiceException( QgsMapServiceException( "Project file error", "Error reading the project file" ) );
}
else
{
QgsWCSServer wcsServer( configFilePath, parameterMap, p, theRequestHandler.data() );
wcsServer.executeRequest();
}
}
else if ( serviceString == "WFS" )
{
QgsWFSProjectParser* p = QgsConfigCache::instance()->wfsConfiguration( configFilePath );
if ( !p )
{
theRequestHandler->setServiceException( QgsMapServiceException( "Project file error", "Error reading the project file" ) );
}
else
{
QgsWFSServer wfsServer( configFilePath, parameterMap, p, theRequestHandler.data() );
wfsServer.executeRequest();
}
}
else if ( serviceString == "WMS" )
{
QgsWMSConfigParser* p = QgsConfigCache::instance()->wmsConfiguration( configFilePath, parameterMap );
if ( !p )
{
theRequestHandler->setServiceException( QgsMapServiceException( "WMS configuration error", "There was an error reading the project file or the SLD configuration" ) );
}
else
{
theRequestHandler->setServiceException( QgsMapServiceException( "Service configuration error", "Service unknown or unsupported" ) );
} // end switch
{
QgsWMSServer wmsServer( configFilePath, parameterMap, p, theRequestHandler.data() , theMapRenderer.data(), &capabilitiesCache );
wmsServer.executeRequest();
}
}
else
{
theRequestHandler->setServiceException( QgsMapServiceException( "Service configuration error", "Service unknown or unsupported" ) );
} // end switch
} // end if not exception raised

theRequestHandler->sendResponse();
Expand Down

0 comments on commit 840fcf3

Please sign in to comment.