1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-05 13:47:26 +02:00

Move all implementations out of the header

This commit is contained in:
Uwe L. Korn
2013-06-15 16:14:17 +02:00
parent 619d8a4c6d
commit d3865cc306
2 changed files with 50 additions and 7 deletions

View File

@@ -2,6 +2,7 @@
* *
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org> * Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
* Copyright 2010-2012, Jeff Mitchell <jeff@tomahawk-player.org> * Copyright 2010-2012, Jeff Mitchell <jeff@tomahawk-player.org>
* Copyright 2013, Uwe L. Korn <uwelk@xhochy.com>
* *
* Tomahawk is free software: you can redistribute it and/or modify * Tomahawk is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -87,6 +88,18 @@ Source::~Source()
tDebug() << Q_FUNC_INFO << friendlyName(); tDebug() << Q_FUNC_INFO << friendlyName();
} }
bool
Source::isLocal() const
{
return m_isLocal;
}
bool
Source::isOnline() const
{
return m_online || m_isLocal;
}
bool bool
Source::setControlConnection( ControlConnection* cc ) Source::setControlConnection( ControlConnection* cc )
@@ -147,6 +160,12 @@ Source::dbCollection() const
return tmp; return tmp;
} }
QList<collection_ptr>
Source::collections() const
{
return m_collections;
}
void void
Source::setStats( const QVariantMap& m ) Source::setStats( const QVariantMap& m )
@@ -343,6 +362,18 @@ Source::removeCollection( const collection_ptr& c )
emit collectionRemoved( c ); emit collectionRemoved( c );
} }
int
Source::id() const
{
return m_id;
}
ControlConnection*
Source::controlConnection() const
{
return m_cc.data();
}
void void
Source::handleDisconnect( Tomahawk::Accounts::Account*, Tomahawk::Accounts::AccountManager::DisconnectReason reason ) Source::handleDisconnect( Tomahawk::Accounts::Account*, Tomahawk::Accounts::AccountManager::DisconnectReason reason )
{ {
@@ -484,6 +515,12 @@ Source::trackCount() const
return m_stats.value( "numfiles", 0 ).toUInt(); return m_stats.value( "numfiles", 0 ).toUInt();
} }
query_ptr
Source::currentTrack() const
{
return m_currentTrack;
}
Tomahawk::playlistinterface_ptr Tomahawk::playlistinterface_ptr
Source::playlistInterface() Source::playlistInterface()
@@ -700,3 +737,9 @@ Source::textStatus() const
return tr( "Offline" ); return tr( "Offline" );
} }
} }
DBSyncConnection::State
Source::state() const
{
return m_state;
}

View File

@@ -61,8 +61,8 @@ public:
explicit Source( int id, const QString& nodeId = QString() ); explicit Source( int id, const QString& nodeId = QString() );
virtual ~Source(); virtual ~Source();
bool isLocal() const { return m_isLocal; } bool isLocal() const;
bool isOnline() const { return m_online || m_isLocal; } bool isOnline() const;
QString nodeId() const; QString nodeId() const;
@@ -79,12 +79,12 @@ public:
#endif #endif
collection_ptr dbCollection() const; collection_ptr dbCollection() const;
QList< Tomahawk::collection_ptr > collections() const { return m_collections; } QList< Tomahawk::collection_ptr > collections() const;
void addCollection( const Tomahawk::collection_ptr& c ); void addCollection( const Tomahawk::collection_ptr& c );
void removeCollection( const Tomahawk::collection_ptr& c ); void removeCollection( const Tomahawk::collection_ptr& c );
int id() const { return m_id; } int id() const;
ControlConnection* controlConnection() const { return m_cc.data(); } ControlConnection* controlConnection() const;
bool setControlConnection( ControlConnection* cc ); bool setControlConnection( ControlConnection* cc );
const QSet< Tomahawk::peerinfo_ptr > peerInfos() const; const QSet< Tomahawk::peerinfo_ptr > peerInfos() const;
@@ -94,9 +94,9 @@ public:
unsigned int trackCount() const; unsigned int trackCount() const;
Tomahawk::query_ptr currentTrack() const { return m_currentTrack; } Tomahawk::query_ptr currentTrack() const;
QString textStatus() const; QString textStatus() const;
DBSyncConnection::State state() const { return m_state; } DBSyncConnection::State state() const;
Tomahawk::playlistinterface_ptr playlistInterface(); Tomahawk::playlistinterface_ptr playlistInterface();