Skip to content

Commit

Permalink
Use httpcomms.h only where needed, & disable the httpcomms code compi…
Browse files Browse the repository at this point in the history
…lation under Qt5.
  • Loading branch information
daniel-kristjansson committed Mar 1, 2013
1 parent e7de92f commit 4679e35
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 6 deletions.
1 change: 0 additions & 1 deletion mythplugins/mythgallery/mythgallery/iconview.cpp
Expand Up @@ -37,7 +37,6 @@ using namespace std;
// MythTV headers
#include <mythdate.h>
#include <mythdbcon.h>
#include <httpcomms.h>
#include <mythsystem.h>
#include <mythcontext.h>
#include <mythlogging.h>
Expand Down
1 change: 0 additions & 1 deletion mythplugins/mythmusic/mythmusic/streamview.cpp
Expand Up @@ -16,7 +16,6 @@
#include <mythuiprogressbar.h>
#include <mythuiutils.h>
#include <mythdialogbox.h>
#include <httpcomms.h>
#include <mythuihelper.h>
#include <mythdownloadmanager.h>
#include <mythdirs.h>
Expand Down
1 change: 0 additions & 1 deletion mythtv/libs/libmythmetadata/metadataimagedownload.cpp
Expand Up @@ -9,7 +9,6 @@
#include "mythcorecontext.h"
#include "mythuihelper.h"
#include "mythdirs.h"
#include "httpcomms.h"
#include "storagegroup.h"
#include "metadataimagedownload.h"
#include "remotefile.h"
Expand Down
2 changes: 0 additions & 2 deletions mythtv/libs/libmythupnp/mythxmlclient.h
Expand Up @@ -15,8 +15,6 @@

#include <QDomDocument>

#include "httpcomms.h"

#include "upnpexp.h"

#include "mythdbparams.h"
Expand Down
11 changes: 11 additions & 0 deletions mythtv/libs/libmythupnp/soapclient.cpp
Expand Up @@ -18,6 +18,10 @@
#include "httprequest.h"
#include "upnp.h"

#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
#include "httpcomms.h"
#endif

#define LOC QString("SOAPClient: ")

/** \brief Full SOAPClient constructor. After constructing the client
Expand Down Expand Up @@ -201,11 +205,13 @@ QDomDocument SOAPClient::SendSOAPRequest(const QString &sMethod,
// Add appropriate headers
// --------------------------------------------------------------

#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
QHttpRequestHeader header("POST", sMethod, 1, 0);

header.setValue("CONTENT-TYPE", "text/xml; charset=\"utf-8\"" );
header.setValue("SOAPACTION",
QString("\"%1#%2\"").arg(m_sNamespace).arg(sMethod));
#endif

// --------------------------------------------------------------
// Build request payload
Expand Down Expand Up @@ -246,6 +252,7 @@ QDomDocument SOAPClient::SendSOAPRequest(const QString &sMethod,

QBuffer buff(&aBuffer);

#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
LOG(VB_UPNP, LOG_DEBUG,
QString("SOAPClient(%1) sending:\n").arg(url.toString()) +
header.toString() + QString("\n%1\n").arg(aBuffer.constData()));
Expand All @@ -263,6 +270,10 @@ QDomDocument SOAPClient::SendSOAPRequest(const QString &sMethod,
QString() // userAgent, UPnP/1.0 very strict on
// format if set
);
#else
#warning This needs to be ported to Qt5
QString sXml("This needs to be ported to Qt5");
#endif

// --------------------------------------------------------------
// Parse response
Expand Down
1 change: 0 additions & 1 deletion mythtv/libs/libmythupnp/soapclient.h
Expand Up @@ -17,7 +17,6 @@
#include <QString>
#include <QUrl>

#include "httpcomms.h"
#include "upnputil.h"
#include "upnpexp.h"

Expand Down

0 comments on commit 4679e35

Please sign in to comment.