Skip to content

Commit

Permalink
Move mythverbose.h include out of upnpdevice.h to speed up re-compiles.
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-kristjansson committed Jul 19, 2011
1 parent f2304de commit 4bc5e52
Show file tree
Hide file tree
Showing 8 changed files with 76 additions and 69 deletions.
22 changes: 8 additions & 14 deletions mythtv/libs/libmyth/backendselect.cpp
@@ -1,22 +1,16 @@
// -*- Mode: c++ -*-

#include "backendselect.h"

// libmyth
#include "mythcontext.h"

// libmythupnp
#include "mythxmlclient.h"
#include "configuration.h"
#include <QCoreApplication>

// libmythui
#include "mythuistatetype.h"
#include "mythmainwindow.h"
#include "mythdialogbox.h"
#include "backendselect.h"
#include "configuration.h"
#include "mythxmlclient.h"
#include "mythuibutton.h"
#include "mythuistatetype.h"

// qt
#include <QApplication>
#include <QHash>
#include "mythlogging.h"
#include "mythversion.h"

BackendSelection::BackendSelection(MythScreenStack *parent, DatabaseParams *params,
Configuration *conf, bool exitOnFinish)
Expand Down
1 change: 1 addition & 0 deletions mythtv/libs/libmythupnp/httprequest.cpp
Expand Up @@ -49,6 +49,7 @@

#include "compat.h"
#include "mythlogging.h"
#include "mythversion.h"

#include "serializers/xmlSerializer.h"
#include "serializers/soapSerializer.h"
Expand Down
58 changes: 55 additions & 3 deletions mythtv/libs/libmythupnp/upnpdevice.cpp
Expand Up @@ -25,6 +25,7 @@
#include "upnpdevice.h"
#include "httpcomms.h"
#include "mythlogging.h"
#include "mythversion.h" // for MYTH_BINARY_VERSION

// MythDB
#include "mythdb.h"
Expand Down Expand Up @@ -711,13 +712,64 @@ QString UPnpDeviceDesc::GetHostName()
return m_sHostName;
}

/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
//
// UPnpDevice Class Implementation
//
//
//
//
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////

UPnpDevice::UPnpDevice() :
m_sModelNumber(MYTH_BINARY_VERSION),
m_sSerialNumber(MYTH_SOURCE_VERSION),
m_securityPin(false),
m_protocolVersion(MYTH_PROTO_VERSION)
{
}

UPnpDevice::~UPnpDevice()
{
while (!m_listIcons.empty())
{
delete m_listIcons.back();
m_listIcons.pop_back();
}
while (!m_listServices.empty())
{
delete m_listServices.back();
m_listServices.pop_back();
}
while (!m_listDevices.empty())
{
delete m_listDevices.back();
m_listDevices.pop_back();
}
}

QString UPnpDevice::GetUDN(void) const
{
if (m_sUDN.isEmpty())
m_sUDN = "uuid:" + LookupUDN( m_sDeviceType );

return m_sUDN;
}

void UPnpDevice::toMap(QHash<QString, QString> &map)
{
map["name"] = m_sFriendlyName;
map["modelname"] = m_sModelName;
map["modelnumber"] = m_sModelNumber;
map["modelurl"] = m_sModelURL;
map["modeldescription"] = m_sModelDescription;
map["manufacturer"] = m_sManufacturer;
map["manufacturerurl"] = m_sManufacturerURL;
map["devicetype"] = m_sDeviceType;
map["serialnumber"] = m_sSerialNumber;
map["UDN"] = m_sUDN;
map["UPC"] = m_sUPC;
map["protocolversion"] = m_protocolVersion;
}

UPnpService UPnpDevice::GetService(const QString &urn, bool *found) const
{
Expand Down
55 changes: 5 additions & 50 deletions mythtv/libs/libmythupnp/upnpdevice.h
Expand Up @@ -32,7 +32,6 @@
#include "upnpexp.h"
#include "upnputil.h"
#include "refcounted.h"
#include "mythversion.h" // for MYTH_BINARY_VERSION

class UPnpDeviceDesc;
class UPnpDevice;
Expand Down Expand Up @@ -118,7 +117,7 @@ class UPNP_PUBLIC UPnpDevice
QString m_sSerialNumber;
QString m_sUPC;
QString m_sPresentationURL;
QString m_sUDN;
mutable QString m_sUDN;

NameValues m_lstExtra;

Expand All @@ -131,56 +130,12 @@ class UPNP_PUBLIC UPnpDevice
UPnpDeviceList m_listDevices;

public:
UPnpDevice();
~UPnpDevice();

UPnpDevice()
{
m_sModelNumber = MYTH_BINARY_VERSION;
m_sSerialNumber = MYTH_SOURCE_VERSION;
m_securityPin = false;
m_protocolVersion = MYTH_PROTO_VERSION;
}
~UPnpDevice()
{
while (!m_listIcons.empty())
{
delete m_listIcons.back();
m_listIcons.pop_back();
}
while (!m_listServices.empty())
{
delete m_listServices.back();
m_listServices.pop_back();
}
while (!m_listDevices.empty())
{
delete m_listDevices.back();
m_listDevices.pop_back();
}
}

QString GetUDN()
{
if (m_sUDN.isEmpty())
m_sUDN = "uuid:" + LookupUDN( m_sDeviceType );
QString GetUDN(void) const;

return m_sUDN;
}

void toMap(QHash<QString, QString> &map)
{
map["name"] = m_sFriendlyName;
map["modelname"] = m_sModelName;
map["modelnumber"] = m_sModelNumber;
map["modelurl"] = m_sModelURL;
map["modeldescription"] = m_sModelDescription;
map["manufacturer"] = m_sManufacturer;
map["manufacturerurl"] = m_sManufacturerURL;
map["devicetype"] = m_sDeviceType;
map["serialnumber"] = m_sSerialNumber;
map["UDN"] = m_sUDN;
map["UPC"] = m_sUPC;
map["protocolversion"] = m_protocolVersion;
}
void toMap(QHash<QString, QString> &map);

UPnpService GetService(const QString &urn, bool *found = NULL) const;

Expand Down
1 change: 1 addition & 0 deletions mythtv/libs/libmythupnp/upnptasknotify.cpp
Expand Up @@ -32,6 +32,7 @@
// MythTV headers
#include "mmulticastsocketdevice.h"
#include "mythlogging.h"
#include "mythversion.h"
#include "compat.h"
#include "upnp.h"

Expand Down
1 change: 1 addition & 0 deletions mythtv/libs/libmythupnp/upnptasksearch.cpp
Expand Up @@ -30,6 +30,7 @@

#include "upnp.h"
#include "upnptasksearch.h"
#include "mythversion.h"
#include "compat.h"

/////////////////////////////////////////////////////////////////////////////
Expand Down
1 change: 1 addition & 0 deletions mythtv/programs/mythfrontend/main.cpp
Expand Up @@ -72,6 +72,7 @@ using namespace std;
#include "mythdb.h"
#include "backendconnectionmanager.h"
#include "themechooser.h"
#include "mythversion.h"

// Video
#include "cleanup.h"
Expand Down
6 changes: 4 additions & 2 deletions mythtv/programs/mythfrontend/mediarenderer.cpp
Expand Up @@ -9,11 +9,13 @@
/////////////////////////////////////////////////////////////////////////////

#include <QTextStream>

#include "upnpsubscription.h"
#include "mediarenderer.h"
#include "mythversion.h"
#include "upnpscanner.h"
#include "mythfexml.h"
#include "compat.h"
#include "upnpsubscription.h"
#include "upnpscanner.h"
#include "util.h"

class MythFrontendStatus : public HttpServerExtension
Expand Down

0 comments on commit 4bc5e52

Please sign in to comment.