Use libmygpo-1.0.7
This commit is contained in:
parent
dac22dbd72
commit
f777561f4a
4
3rdparty/libmygpo-qt/AddRemoveResult.cpp
vendored
4
3rdparty/libmygpo-qt/AddRemoveResult.cpp
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
@ -20,7 +20,7 @@
|
||||
* USA *
|
||||
***************************************************************************/
|
||||
|
||||
#include <qjson/parser.h>
|
||||
#include <parser.h>
|
||||
|
||||
#include "AddRemoveResult.h"
|
||||
#include "AddRemoveResult_p.h"
|
||||
|
2
3rdparty/libmygpo-qt/AddRemoveResult.h
vendored
2
3rdparty/libmygpo-qt/AddRemoveResult.h
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
|
2
3rdparty/libmygpo-qt/AddRemoveResult_p.h
vendored
2
3rdparty/libmygpo-qt/AddRemoveResult_p.h
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
|
17
3rdparty/libmygpo-qt/ApiRequest.cpp
vendored
17
3rdparty/libmygpo-qt/ApiRequest.cpp
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
@ -391,6 +391,16 @@ DeviceSyncResultPtr ApiRequestPrivate::deviceSynchronizationStatus ( const QStri
|
||||
return result;
|
||||
}
|
||||
|
||||
DeviceSyncResultPtr ApiRequestPrivate::setDeviceSynchronizationStatus(const QString& username, const QList< QStringList >& synchronize, const QList< QString >& stopSynchronize )
|
||||
{
|
||||
QString requestUrl = UrlBuilder::getDeviceSynchronizationStatusUrl( username );
|
||||
QNetworkReply* reply;
|
||||
QByteArray data = JsonCreator::deviceSynchronizationListsToJSON( synchronize, stopSynchronize );
|
||||
reply = m_requestHandler.postRequest( data, requestUrl );
|
||||
DeviceSyncResultPtr result( new DeviceSyncResult( reply ) );
|
||||
return result;
|
||||
}
|
||||
|
||||
ApiRequest::ApiRequest( const QString& username, const QString& password, QNetworkAccessManager* nam ) : d( new ApiRequestPrivate( username, password, nam ) )
|
||||
{
|
||||
}
|
||||
@ -598,3 +608,8 @@ DeviceSyncResultPtr ApiRequest::deviceSynchronizationStatus ( const QString& use
|
||||
{
|
||||
return d->deviceSynchronizationStatus( username );
|
||||
}
|
||||
|
||||
DeviceSyncResultPtr ApiRequest::setDeviceSynchronizationStatus(const QString& username, const QList<QStringList>& synchronize, const QList<QString>& stopSynchronize )
|
||||
{
|
||||
return d->setDeviceSynchronizationStatus( username, synchronize, stopSynchronize );
|
||||
}
|
||||
|
16
3rdparty/libmygpo-qt/ApiRequest.h
vendored
16
3rdparty/libmygpo-qt/ApiRequest.h
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
@ -23,10 +23,6 @@
|
||||
#ifndef LIBMYGPO_QT_APIREQUEST_H
|
||||
#define LIBMYGPO_QT_APIREQUEST_H
|
||||
|
||||
#define MYGPO_MAJOR_VERSION 1
|
||||
#define MYGPO_MINOR_VERSION 0
|
||||
#define MYGPO_PATCH_VERSION 5
|
||||
|
||||
#include "mygpo_export.h"
|
||||
#include "AddRemoveResult.h"
|
||||
#include "EpisodeList.h"
|
||||
@ -60,9 +56,9 @@ public:
|
||||
ApiRequest( const QString& username, const QString& password, QNetworkAccessManager* nam );
|
||||
ApiRequest( QNetworkAccessManager* nam );
|
||||
~ApiRequest( );
|
||||
|
||||
|
||||
//SIMPLE API
|
||||
|
||||
|
||||
/**
|
||||
* Returns the OPML Result for the Simple API Call "Downloading Podcast Toplists"
|
||||
* @param count The number of Podcasts that should be returned - will be set to to 100 if > 100 or < 1
|
||||
@ -87,7 +83,7 @@ public:
|
||||
*
|
||||
*/
|
||||
QNetworkReply* suggestionsOpml( uint count );
|
||||
|
||||
|
||||
QNetworkReply* downloadSubscriptionsOpml( const QString& username, const QString& device );
|
||||
|
||||
/**
|
||||
@ -114,7 +110,7 @@ public:
|
||||
*
|
||||
*/
|
||||
QNetworkReply* suggestionsTxt( uint count );
|
||||
|
||||
|
||||
QNetworkReply* downloadSubscriptionsTxt( const QString& username, const QString& device );
|
||||
|
||||
/**
|
||||
@ -395,6 +391,8 @@ public:
|
||||
|
||||
DeviceSyncResultPtr deviceSynchronizationStatus( const QString& username );
|
||||
|
||||
DeviceSyncResultPtr setDeviceSynchronizationStatus( const QString& username, const QList<QStringList>& synchronize, const QList<QString>& stopSynchronize );
|
||||
|
||||
private:
|
||||
ApiRequestPrivate* const d;
|
||||
};
|
||||
|
3
3rdparty/libmygpo-qt/ApiRequest_p.h
vendored
3
3rdparty/libmygpo-qt/ApiRequest_p.h
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
@ -76,6 +76,7 @@ public:
|
||||
EpisodeActionListPtr episodeActionsByDeviceAndTimestamp( const QString& username, const QString& deviceId, const qulonglong since );
|
||||
AddRemoveResultPtr uploadEpisodeActions( const QString& username, const QList<EpisodeActionPtr>& episodeActions );
|
||||
DeviceSyncResultPtr deviceSynchronizationStatus( const QString& username );
|
||||
DeviceSyncResultPtr setDeviceSynchronizationStatus( const QString& username, const QList<QStringList>& synchronize, const QList<QString>& stopSynchronize );
|
||||
private:
|
||||
RequestHandler m_requestHandler;
|
||||
};
|
||||
|
9
3rdparty/libmygpo-qt/CMakeLists.txt
vendored
9
3rdparty/libmygpo-qt/CMakeLists.txt
vendored
@ -1,7 +1,14 @@
|
||||
# Extra bits for Clementine.
|
||||
set( MYGPO_QT_VERSION_MAJOR "1" )
|
||||
set( MYGPO_QT_VERSION_MINOR "0" )
|
||||
set( MYGPO_QT_VERSION_PATCH "7" )
|
||||
configure_file( Version.h.in ${CMAKE_CURRENT_BINARY_DIR}/Version.h )
|
||||
include_directories("${QJSON_INCLUDEDIR}/qjson")
|
||||
|
||||
include_directories( ${QT_INCLUDES} ${QJSON_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} )
|
||||
|
||||
set ( LIBMYGPO_QT_SRC
|
||||
Config.cpp
|
||||
DeviceSyncResult.cpp
|
||||
Settings.cpp
|
||||
AddRemoveResult.cpp
|
||||
@ -56,6 +63,7 @@ set ( LIBMYGPO_QT_MOC_H
|
||||
set ( LIBMYGPO_QT_INSTALL_H
|
||||
ApiRequest.h
|
||||
mygpo_export.h
|
||||
Config.h
|
||||
Podcast.h
|
||||
PodcastList.h
|
||||
Episode.h
|
||||
@ -77,3 +85,4 @@ QT4_WRAP_CPP(LIBMYGPO_QT_MOC_SRC ${LIBMYGPO_QT_MOC_H} )
|
||||
add_library( mygpo-qt STATIC ${LIBMYGPO_QT_SRC} ${LIBMYGPO_QT_MOC_SRC} )
|
||||
|
||||
target_link_libraries( mygpo-qt ${QJSON_LIBRARIES} ${QT_QTCORE_LIBRARY} ${QT_QTNETWORK_LIBRARY} )
|
||||
set_target_properties( mygpo-qt PROPERTIES VERSION ${MYGPO_QT_VERSION} SOVERSION ${MYGPO_QT_SONAME} DEFINE_SYMBOL MYGPO_MAKEDLL)
|
||||
|
153
3rdparty/libmygpo-qt/Config.cpp
vendored
Normal file
153
3rdparty/libmygpo-qt/Config.cpp
vendored
Normal file
@ -0,0 +1,153 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2012 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Lesser General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2.1 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
* Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with this library; if not, write to the Free Software *
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 *
|
||||
* USA *
|
||||
***************************************************************************/
|
||||
|
||||
#include "Config_p.h"
|
||||
#include "Version.h"
|
||||
|
||||
#include <QString>
|
||||
#include <QStringBuilder>
|
||||
#include <QLatin1String>
|
||||
|
||||
using namespace mygpo;
|
||||
|
||||
Config* Config::s_instance = 0;
|
||||
|
||||
ConfigPrivate::ConfigPrivate( Config* qq ) : q( qq ), m_mygpoBaseUrl( QUrl( QLatin1String( "http://gpodder.net" ) ) ), m_userAgentPrefix( QString() )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
ConfigPrivate::~ConfigPrivate()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
int ConfigPrivate::majorVersion() const
|
||||
{
|
||||
return MYGPO_QT_VERSION_MAJOR;
|
||||
}
|
||||
|
||||
int ConfigPrivate::minorVersion() const
|
||||
{
|
||||
return MYGPO_QT_VERSION_MINOR;
|
||||
}
|
||||
|
||||
int ConfigPrivate::patchVersion() const
|
||||
{
|
||||
return MYGPO_QT_VERSION_PATCH;
|
||||
}
|
||||
|
||||
QString ConfigPrivate::version() const
|
||||
{
|
||||
return QString( QLatin1String( "%1.%2.%3" ) ).arg( majorVersion() ).arg( minorVersion() ).arg( patchVersion() );
|
||||
}
|
||||
|
||||
QUrl ConfigPrivate::mygpoBaseUrl() const
|
||||
{
|
||||
return m_mygpoBaseUrl;
|
||||
}
|
||||
|
||||
void ConfigPrivate::setMygpoBaseUrl( const QUrl& mygpoBaseUrl )
|
||||
{
|
||||
this->m_mygpoBaseUrl = mygpoBaseUrl;
|
||||
}
|
||||
|
||||
QString ConfigPrivate::userAgent() const
|
||||
{
|
||||
QString userAgent;
|
||||
if ( !m_userAgentPrefix.isEmpty() )
|
||||
userAgent = m_userAgentPrefix % QLatin1String( " " );
|
||||
userAgent = userAgent % QLatin1String( "libmygpo-qt " ) % version();
|
||||
return userAgent;
|
||||
}
|
||||
|
||||
QString ConfigPrivate::userAgentPrefix() const
|
||||
{
|
||||
return m_userAgentPrefix;
|
||||
}
|
||||
|
||||
void ConfigPrivate::setUserAgentPrefix( const QString& prefix )
|
||||
{
|
||||
m_userAgentPrefix = prefix;
|
||||
}
|
||||
|
||||
Config::Config() : d( new ConfigPrivate( this ) )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
Config::~Config()
|
||||
{
|
||||
delete d;
|
||||
}
|
||||
|
||||
int Config::majorVersion() const
|
||||
{
|
||||
return d->majorVersion();
|
||||
}
|
||||
|
||||
int Config::minorVersion() const
|
||||
{
|
||||
return d->minorVersion();
|
||||
}
|
||||
|
||||
int Config::patchVersion() const
|
||||
{
|
||||
return d->patchVersion();
|
||||
}
|
||||
|
||||
QString Config::version() const
|
||||
{
|
||||
return d->version();
|
||||
}
|
||||
|
||||
QUrl Config::mygpoBaseUrl() const
|
||||
{
|
||||
return d->mygpoBaseUrl();
|
||||
}
|
||||
|
||||
void Config::setMygpoBaseUrl(const QUrl& mygpoBaseUrl)
|
||||
{
|
||||
d->setMygpoBaseUrl( mygpoBaseUrl );
|
||||
}
|
||||
|
||||
QString Config::userAgent() const
|
||||
{
|
||||
return d->userAgent();
|
||||
}
|
||||
|
||||
QString Config::userAgentPrefix() const
|
||||
{
|
||||
return d->userAgentPrefix();
|
||||
}
|
||||
|
||||
void Config::setUserAgentPrefix(const QString& prefix)
|
||||
{
|
||||
d->setUserAgentPrefix( prefix );
|
||||
}
|
||||
|
||||
Config* Config::instance()
|
||||
{
|
||||
if ( !s_instance ) {
|
||||
s_instance = new Config;
|
||||
}
|
||||
|
||||
return s_instance;
|
||||
}
|
64
3rdparty/libmygpo-qt/Config.h
vendored
Normal file
64
3rdparty/libmygpo-qt/Config.h
vendored
Normal file
@ -0,0 +1,64 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2012 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Lesser General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2.1 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
* Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with this library; if not, write to the Free Software *
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 *
|
||||
* USA *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef LIBMYGPO_QT_CONFIG_H
|
||||
#define LIBMYGPO_QT_CONFIG_H
|
||||
|
||||
#include "mygpo_export.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QUrl>
|
||||
|
||||
namespace mygpo
|
||||
{
|
||||
|
||||
class ConfigPrivate;
|
||||
//TODO: More config entries (mygpo-feedservice baseurl), let class inherit from QObject, set everything as a Property
|
||||
class MYGPO_EXPORT Config
|
||||
{
|
||||
|
||||
public:
|
||||
static Config* instance();
|
||||
|
||||
int majorVersion() const;
|
||||
int minorVersion() const;
|
||||
int patchVersion() const;
|
||||
|
||||
QString version() const;
|
||||
|
||||
QUrl mygpoBaseUrl() const;
|
||||
void setMygpoBaseUrl( const QUrl& mygpoBaseUrl );
|
||||
|
||||
QString userAgent() const;
|
||||
|
||||
QString userAgentPrefix() const;
|
||||
void setUserAgentPrefix( const QString& prefix );
|
||||
private:
|
||||
Config();
|
||||
~Config();
|
||||
|
||||
static Config* s_instance;
|
||||
|
||||
ConfigPrivate* const d;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // LIBMYGPO_QT_CONFIG_H
|
58
3rdparty/libmygpo-qt/Config_p.h
vendored
Normal file
58
3rdparty/libmygpo-qt/Config_p.h
vendored
Normal file
@ -0,0 +1,58 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2012 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Lesser General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2.1 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
* Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with this library; if not, write to the Free Software *
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 *
|
||||
* USA *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef LIBMYGPO_QT_CONFIG_PRIVATE_H
|
||||
#define LIBMYGPO_QT_CONFIG_PRIVATE_H
|
||||
|
||||
#include "Config.h"
|
||||
|
||||
namespace mygpo
|
||||
{
|
||||
|
||||
class ConfigPrivate
|
||||
{
|
||||
|
||||
public:
|
||||
ConfigPrivate( Config* qq );
|
||||
~ConfigPrivate();
|
||||
|
||||
int majorVersion() const;
|
||||
int minorVersion() const;
|
||||
int patchVersion() const;
|
||||
|
||||
QString version() const;
|
||||
|
||||
QUrl mygpoBaseUrl() const;
|
||||
void setMygpoBaseUrl( const QUrl& mygpoBaseUrl );
|
||||
|
||||
QString userAgent() const;
|
||||
|
||||
QString userAgentPrefix() const;
|
||||
void setUserAgentPrefix( const QString& prefix );
|
||||
private:
|
||||
Config* q;
|
||||
QUrl m_mygpoBaseUrl;
|
||||
QString m_userAgentPrefix;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // LIBMYGPO_QT_CONFIG_PRIVATE_H
|
2
3rdparty/libmygpo-qt/Device.cpp
vendored
2
3rdparty/libmygpo-qt/Device.cpp
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
|
2
3rdparty/libmygpo-qt/Device.h
vendored
2
3rdparty/libmygpo-qt/Device.h
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
|
2
3rdparty/libmygpo-qt/DeviceList.cpp
vendored
2
3rdparty/libmygpo-qt/DeviceList.cpp
vendored
@ -22,7 +22,7 @@
|
||||
|
||||
#include "DeviceList_p.h"
|
||||
|
||||
#include <qjson/parser.h>
|
||||
#include <parser.h>
|
||||
|
||||
using namespace mygpo;
|
||||
|
||||
|
2
3rdparty/libmygpo-qt/DeviceList.h
vendored
2
3rdparty/libmygpo-qt/DeviceList.h
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
|
2
3rdparty/libmygpo-qt/DeviceList_p.h
vendored
2
3rdparty/libmygpo-qt/DeviceList_p.h
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
|
4
3rdparty/libmygpo-qt/DeviceSyncResult.cpp
vendored
4
3rdparty/libmygpo-qt/DeviceSyncResult.cpp
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2011 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Lesser General Public *
|
||||
@ -20,7 +20,7 @@
|
||||
|
||||
#include "DeviceSyncResult_p.h"
|
||||
|
||||
#include <qjson/parser.h>
|
||||
#include <parser.h>
|
||||
|
||||
using namespace mygpo;
|
||||
|
||||
|
2
3rdparty/libmygpo-qt/DeviceSyncResult.h
vendored
2
3rdparty/libmygpo-qt/DeviceSyncResult.h
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2011 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Lesser General Public *
|
||||
|
2
3rdparty/libmygpo-qt/DeviceSyncResult_p.h
vendored
2
3rdparty/libmygpo-qt/DeviceSyncResult_p.h
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2011 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Lesser General Public *
|
||||
|
4
3rdparty/libmygpo-qt/DeviceUpdates.cpp
vendored
4
3rdparty/libmygpo-qt/DeviceUpdates.cpp
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
@ -22,7 +22,7 @@
|
||||
|
||||
#include "DeviceUpdates_p.h"
|
||||
|
||||
#include <qjson/parser.h>
|
||||
#include <parser.h>
|
||||
|
||||
using namespace mygpo;
|
||||
|
||||
|
2
3rdparty/libmygpo-qt/DeviceUpdates.h
vendored
2
3rdparty/libmygpo-qt/DeviceUpdates.h
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
|
2
3rdparty/libmygpo-qt/DeviceUpdates_p.h
vendored
2
3rdparty/libmygpo-qt/DeviceUpdates_p.h
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
|
2
3rdparty/libmygpo-qt/Device_p.h
vendored
2
3rdparty/libmygpo-qt/Device_p.h
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
|
4
3rdparty/libmygpo-qt/Episode.cpp
vendored
4
3rdparty/libmygpo-qt/Episode.cpp
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
@ -22,7 +22,7 @@
|
||||
|
||||
#include "Episode_p.h"
|
||||
|
||||
#include <qjson/parser.h>
|
||||
#include <parser.h>
|
||||
|
||||
using namespace mygpo;
|
||||
|
||||
|
2
3rdparty/libmygpo-qt/Episode.h
vendored
2
3rdparty/libmygpo-qt/Episode.h
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
|
26
3rdparty/libmygpo-qt/EpisodeAction.cpp
vendored
26
3rdparty/libmygpo-qt/EpisodeAction.cpp
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
@ -22,13 +22,16 @@
|
||||
|
||||
#include "EpisodeAction_p.h"
|
||||
|
||||
#include <qjson/parser.h>
|
||||
#include <parser.h>
|
||||
|
||||
using namespace mygpo;
|
||||
|
||||
static qulonglong c_maxlonglong = (2^64)-1;
|
||||
|
||||
EpisodeActionPrivate::EpisodeActionPrivate( EpisodeAction* qq, const QVariant& variant, QObject* parent ) : QObject( parent ), q( qq )
|
||||
{
|
||||
parse( variant );
|
||||
bool valid = parse( variant );
|
||||
qq->setProperty("valid", QVariant( valid ) );
|
||||
}
|
||||
|
||||
EpisodeActionPrivate::EpisodeActionPrivate( EpisodeAction* qq, const QUrl& podcastUrl, const QUrl& episodeUrl, const QString& deviceName, EpisodeAction::ActionType action, qulonglong timestamp, qulonglong started, qulonglong position, qulonglong total, QObject* parent )
|
||||
@ -147,6 +150,11 @@ bool EpisodeActionPrivate::parseActionType( const QString& data )
|
||||
m_action = EpisodeAction::New;
|
||||
return true;
|
||||
}
|
||||
else if ( data.compare( QLatin1String( "flattr" ) ) == 0 )
|
||||
{
|
||||
m_action = EpisodeAction::Flattr;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
@ -222,6 +230,18 @@ EpisodeAction::EpisodeAction( const QUrl& podcastUrl, const QUrl& episodeUrl, co
|
||||
|
||||
}
|
||||
|
||||
EpisodeAction::EpisodeAction(const QUrl& podcastUrl, const QUrl& episodeUrl, const QString& deviceName, EpisodeAction::ActionType action, qulonglong timestamp, qulonglong position, QObject* parent)
|
||||
: QObject( parent ), d( new EpisodeActionPrivate( this, podcastUrl, episodeUrl, deviceName, action, timestamp, c_maxlonglong, position, c_maxlonglong ) )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
EpisodeAction::EpisodeAction(const QUrl& podcastUrl, const QUrl& episodeUrl, const QString& deviceName, EpisodeAction::ActionType action, qulonglong timestamp, QObject* parent)
|
||||
: QObject( parent ), d( new EpisodeActionPrivate( this, podcastUrl, episodeUrl, deviceName, action, timestamp, c_maxlonglong, c_maxlonglong, c_maxlonglong ) )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
EpisodeAction::~EpisodeAction()
|
||||
{
|
||||
delete d;
|
||||
|
6
3rdparty/libmygpo-qt/EpisodeAction.h
vendored
6
3rdparty/libmygpo-qt/EpisodeAction.h
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
@ -49,9 +49,11 @@ class MYGPO_EXPORT EpisodeAction : public QObject
|
||||
Q_PROPERTY( qulonglong total READ total CONSTANT )
|
||||
|
||||
public:
|
||||
enum ActionType { Download, Play, Delete, New };
|
||||
enum ActionType { Download, Play, Delete, New, Flattr };
|
||||
EpisodeAction( const QVariant& variant, QObject* parent = 0 );
|
||||
EpisodeAction( const QUrl& podcastUrl, const QUrl& episodeUrl, const QString& deviceName, EpisodeAction::ActionType action, qulonglong timestamp, qulonglong started, qulonglong position, qulonglong total, QObject* parent = 0 );
|
||||
EpisodeAction( const QUrl& podcastUrl, const QUrl& episodeUrl, const QString& deviceName, EpisodeAction::ActionType action, qulonglong timestamp, qulonglong position, QObject* parent = 0 );
|
||||
EpisodeAction( const QUrl& podcastUrl, const QUrl& episodeUrl, const QString& deviceName, EpisodeAction::ActionType action, qulonglong timestamp, QObject* parent = 0 );
|
||||
virtual ~EpisodeAction();
|
||||
|
||||
QUrl podcastUrl() const;
|
||||
|
14
3rdparty/libmygpo-qt/EpisodeActionList.cpp
vendored
14
3rdparty/libmygpo-qt/EpisodeActionList.cpp
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
@ -22,7 +22,7 @@
|
||||
|
||||
#include "EpisodeActionList_p.h"
|
||||
|
||||
#include <qjson/parser.h>
|
||||
#include <parser.h>
|
||||
|
||||
using namespace mygpo;
|
||||
|
||||
@ -72,8 +72,14 @@ bool EpisodeActionListPrivate::parse( const QVariant& data )
|
||||
foreach( QVariant var, varList )
|
||||
{
|
||||
QVariant v;
|
||||
v.setValue<mygpo::EpisodeActionPtr> ( mygpo::EpisodeActionPtr( new EpisodeAction( var ) ) );
|
||||
episodeActionList.append( v );
|
||||
EpisodeAction* episodeActionTmpPtr = new EpisodeAction( var );
|
||||
if ( episodeActionTmpPtr->property("valid").toBool() )
|
||||
{
|
||||
v.setValue<mygpo::EpisodeActionPtr> ( mygpo::EpisodeActionPtr( episodeActionTmpPtr ) );
|
||||
episodeActionList.append( v );
|
||||
}
|
||||
else
|
||||
delete episodeActionTmpPtr;
|
||||
}
|
||||
m_episodeActions = QVariant( episodeActionList );
|
||||
return true;
|
||||
|
2
3rdparty/libmygpo-qt/EpisodeActionList.h
vendored
2
3rdparty/libmygpo-qt/EpisodeActionList.h
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
|
2
3rdparty/libmygpo-qt/EpisodeActionList_p.h
vendored
2
3rdparty/libmygpo-qt/EpisodeActionList_p.h
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
|
2
3rdparty/libmygpo-qt/EpisodeAction_p.h
vendored
2
3rdparty/libmygpo-qt/EpisodeAction_p.h
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
|
4
3rdparty/libmygpo-qt/EpisodeList.cpp
vendored
4
3rdparty/libmygpo-qt/EpisodeList.cpp
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
@ -22,7 +22,7 @@
|
||||
|
||||
#include "EpisodeList_p.h"
|
||||
|
||||
#include <qjson/parser.h>
|
||||
#include <parser.h>
|
||||
|
||||
using namespace mygpo;
|
||||
|
||||
|
2
3rdparty/libmygpo-qt/EpisodeList.h
vendored
2
3rdparty/libmygpo-qt/EpisodeList.h
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
|
2
3rdparty/libmygpo-qt/EpisodeList_p.h
vendored
2
3rdparty/libmygpo-qt/EpisodeList_p.h
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
|
2
3rdparty/libmygpo-qt/Episode_p.h
vendored
2
3rdparty/libmygpo-qt/Episode_p.h
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
|
78
3rdparty/libmygpo-qt/JsonCreator.cpp
vendored
78
3rdparty/libmygpo-qt/JsonCreator.cpp
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
@ -26,12 +26,14 @@
|
||||
#include <QString>
|
||||
#include <QDateTime>
|
||||
|
||||
#include <qjson/serializer.h>
|
||||
#include <serializer.h>
|
||||
|
||||
#include "JsonCreator.h"
|
||||
|
||||
using namespace mygpo;
|
||||
|
||||
static qulonglong c_maxlonglong = (2^64)-1;
|
||||
|
||||
QByteArray JsonCreator::addRemoveSubsToJSON( const QList< QUrl >& add, const QList< QUrl >& remove )
|
||||
{
|
||||
QJson::Serializer serializer;
|
||||
@ -70,7 +72,7 @@ QByteArray JsonCreator::episodeActionListToJSON( const QList<EpisodeActionPtr>&
|
||||
return jsonByteArray;
|
||||
}
|
||||
|
||||
QByteArray mygpo::JsonCreator::renameDeviceStringToJSON( const QString& caption, const QString& type )
|
||||
QByteArray JsonCreator::renameDeviceStringToJSON( const QString& caption, const QString& type )
|
||||
{
|
||||
QJson::Serializer serializer;
|
||||
QVariantMap jsonData;
|
||||
@ -83,6 +85,55 @@ QByteArray mygpo::JsonCreator::renameDeviceStringToJSON( const QString& caption,
|
||||
|
||||
}
|
||||
|
||||
QByteArray JsonCreator::deviceSynchronizationListsToJSON(const QList< QStringList >& synchronize, const QList< QString >& stopSynchronize)
|
||||
{
|
||||
QString syncVar;
|
||||
if (synchronize.size() != 0)
|
||||
{
|
||||
syncVar.append(QLatin1String("["));
|
||||
foreach( const QStringList& syncEntry, synchronize )
|
||||
{
|
||||
QString syncEntryStr;
|
||||
if (syncEntry.size() != 0) {
|
||||
syncEntryStr.append(QLatin1String("["));
|
||||
foreach( const QString& str, syncEntry) {
|
||||
syncEntryStr.append(QString(QLatin1String("\"") + str + QLatin1String("\",")));
|
||||
}
|
||||
syncEntryStr.replace(syncEntryStr.size()-1,1,QLatin1String("]"));
|
||||
}
|
||||
else {
|
||||
syncEntryStr.append(QLatin1String("[ ]"));
|
||||
}
|
||||
syncVar.append(syncEntryStr);
|
||||
syncVar.append(QLatin1String(","));
|
||||
}
|
||||
syncVar.replace(syncVar.size()-1,1,QLatin1String("]"));
|
||||
}
|
||||
else
|
||||
{
|
||||
syncVar.append(QLatin1String("[ ]"));
|
||||
}
|
||||
QString stopVar;
|
||||
if (stopSynchronize.size() != 0)
|
||||
{
|
||||
stopVar.append(QLatin1String("["));
|
||||
foreach( const QString& str, stopSynchronize) {
|
||||
stopVar.append(QString(QLatin1String("\"") + str + QLatin1String("\",")));
|
||||
}
|
||||
stopVar.replace(stopVar.size()-1,1,QLatin1String("]"));
|
||||
}
|
||||
else
|
||||
{
|
||||
stopVar.append(QLatin1String("[ ]"));
|
||||
}
|
||||
QString jsonStr(QLatin1String("{\"synchronize\" : "));
|
||||
jsonStr.append(syncVar);
|
||||
jsonStr.append(QLatin1String(" ,\"stop-synchronize\" : "));
|
||||
jsonStr.append(stopVar);
|
||||
jsonStr.append(QLatin1String(" }\n"));
|
||||
return jsonStr.toLocal8Bit();
|
||||
}
|
||||
|
||||
QVariantList JsonCreator::urlListToQVariantList( const QList< QUrl >& urls )
|
||||
{
|
||||
QVariantList list;
|
||||
@ -133,6 +184,8 @@ QVariantMap JsonCreator::episodeActionToQVariantMap( const EpisodeActionPtr epis
|
||||
map.insert( QLatin1String( "action" ), QLatin1String( "play" ) );
|
||||
else if( actionType == EpisodeAction::Download )
|
||||
map.insert( QLatin1String( "action" ), QLatin1String( "download" ) );
|
||||
else if( actionType == EpisodeAction::Flattr )
|
||||
map.insert( QLatin1String( "action" ), QLatin1String( "flattr" ) );
|
||||
|
||||
if( episodeAction->timestamp() != 0 ) {
|
||||
#if QT_VERSION >= 0x040700
|
||||
@ -145,12 +198,17 @@ QVariantMap JsonCreator::episodeActionToQVariantMap( const EpisodeActionPtr epis
|
||||
#endif
|
||||
map.insert( QLatin1String( "timestamp" ), dateTime.toString(Qt::ISODate) );
|
||||
}
|
||||
if( episodeAction->started() != 0 )
|
||||
map.insert( QLatin1String( "started" ), episodeAction->started() );
|
||||
if( episodeAction->position() != 0 )
|
||||
map.insert( QLatin1String( "position" ), episodeAction->position() );
|
||||
if( episodeAction->total() != 0 )
|
||||
map.insert( QLatin1String( "total" ), episodeAction->total() );
|
||||
|
||||
if( actionType == EpisodeAction::Play )
|
||||
{
|
||||
if ( episodeAction->position() != c_maxlonglong )
|
||||
{
|
||||
map.insert( QLatin1String( "position" ), episodeAction->position() );
|
||||
if ( episodeAction->started() != c_maxlonglong && episodeAction->total() != c_maxlonglong )
|
||||
{
|
||||
map.insert( QLatin1String( "started" ), episodeAction->started() );
|
||||
map.insert( QLatin1String( "total" ), episodeAction->total() );
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
6
3rdparty/libmygpo-qt/JsonCreator.h
vendored
6
3rdparty/libmygpo-qt/JsonCreator.h
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
@ -27,6 +27,8 @@
|
||||
#include <QVariant>
|
||||
#include <QList>
|
||||
#include <QMap>
|
||||
#include <QStringList>
|
||||
|
||||
#include "EpisodeAction.h"
|
||||
|
||||
class QUrl;
|
||||
@ -43,7 +45,7 @@ public:
|
||||
static QByteArray saveSettingsToJSON( const QMap<QString, QVariant >& set, const QList<QString>& remove );
|
||||
static QByteArray episodeActionListToJSON( const QList<EpisodeActionPtr>& episodeActions );
|
||||
static QByteArray renameDeviceStringToJSON( const QString& caption, const QString& type );
|
||||
|
||||
static QByteArray deviceSynchronizationListsToJSON( const QList<QStringList>& synchronize, const QList<QString>& stopSynchronize );
|
||||
private:
|
||||
static QVariantList urlListToQVariantList( const QList<QUrl>& urls );
|
||||
static QVariantList stringListToQVariantList( const QList<QString>& strings );
|
||||
|
4
3rdparty/libmygpo-qt/Podcast.cpp
vendored
4
3rdparty/libmygpo-qt/Podcast.cpp
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
@ -22,7 +22,7 @@
|
||||
|
||||
#include "Podcast_p.h"
|
||||
|
||||
#include <qjson/parser.h>
|
||||
#include <parser.h>
|
||||
|
||||
using namespace mygpo;
|
||||
|
||||
|
2
3rdparty/libmygpo-qt/Podcast.h
vendored
2
3rdparty/libmygpo-qt/Podcast.h
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
|
4
3rdparty/libmygpo-qt/PodcastList.cpp
vendored
4
3rdparty/libmygpo-qt/PodcastList.cpp
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
@ -22,7 +22,7 @@
|
||||
|
||||
#include "PodcastList_p.h"
|
||||
|
||||
#include <qjson/parser.h>
|
||||
#include <parser.h>
|
||||
|
||||
using namespace mygpo;
|
||||
|
||||
|
2
3rdparty/libmygpo-qt/PodcastList.h
vendored
2
3rdparty/libmygpo-qt/PodcastList.h
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
|
2
3rdparty/libmygpo-qt/PodcastList_p.h
vendored
2
3rdparty/libmygpo-qt/PodcastList_p.h
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
|
2
3rdparty/libmygpo-qt/Podcast_p.h
vendored
2
3rdparty/libmygpo-qt/Podcast_p.h
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
|
12
3rdparty/libmygpo-qt/RequestHandler.cpp
vendored
12
3rdparty/libmygpo-qt/RequestHandler.cpp
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
@ -24,6 +24,7 @@
|
||||
#include <QCoreApplication>
|
||||
|
||||
#include "RequestHandler.h"
|
||||
#include "Config.h"
|
||||
|
||||
using namespace mygpo;
|
||||
|
||||
@ -43,6 +44,7 @@ QNetworkReply* RequestHandler::getRequest( const QString& url )
|
||||
{
|
||||
QUrl reqUrl( url );
|
||||
QNetworkRequest request( reqUrl );
|
||||
addUserAgent( request );
|
||||
QNetworkReply* reply = m_nam->get( request );
|
||||
return reply;
|
||||
}
|
||||
@ -50,6 +52,7 @@ QNetworkReply* RequestHandler::getRequest( const QString& url )
|
||||
QNetworkReply* RequestHandler::authGetRequest( const QString& url )
|
||||
{
|
||||
QNetworkRequest request( url );
|
||||
addUserAgent( request );
|
||||
addAuthData( request );
|
||||
QNetworkReply* reply = m_nam->get( request );
|
||||
return reply;
|
||||
@ -59,7 +62,9 @@ QNetworkReply* RequestHandler::authGetRequest( const QString& url )
|
||||
QNetworkReply* RequestHandler::postRequest( const QByteArray data, const QString& url )
|
||||
{
|
||||
QNetworkRequest request( url );
|
||||
addUserAgent( request );
|
||||
addAuthData( request );
|
||||
request.setHeader(QNetworkRequest::ContentTypeHeader, QLatin1String("application/json"));
|
||||
QNetworkReply* reply = m_nam->post( request, data );
|
||||
return reply;
|
||||
}
|
||||
@ -69,3 +74,8 @@ void RequestHandler::addAuthData( QNetworkRequest& request )
|
||||
QByteArray headerData = "Basic " + QString(m_username + QLatin1String(":") + m_password).toLocal8Bit().toBase64();
|
||||
request.setRawHeader("Authorization", headerData );
|
||||
}
|
||||
|
||||
void RequestHandler::addUserAgent( QNetworkRequest &request )
|
||||
{
|
||||
request.setRawHeader("User-Agent", Config::instance()->userAgent().toAscii() );
|
||||
}
|
||||
|
5
3rdparty/libmygpo-qt/RequestHandler.h
vendored
5
3rdparty/libmygpo-qt/RequestHandler.h
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
@ -77,7 +77,8 @@ private:
|
||||
QString m_password;
|
||||
QNetworkAccessManager* m_nam;
|
||||
|
||||
void addAuthData( QNetworkRequest& url );
|
||||
void addAuthData( QNetworkRequest& request );
|
||||
void addUserAgent( QNetworkRequest& request );
|
||||
};
|
||||
|
||||
}
|
||||
|
4
3rdparty/libmygpo-qt/Settings.cpp
vendored
4
3rdparty/libmygpo-qt/Settings.cpp
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
@ -22,7 +22,7 @@
|
||||
|
||||
#include "Settings_p.h"
|
||||
|
||||
#include <qjson/parser.h>
|
||||
#include <parser.h>
|
||||
|
||||
using namespace mygpo;
|
||||
|
||||
|
2
3rdparty/libmygpo-qt/Settings.h
vendored
2
3rdparty/libmygpo-qt/Settings.h
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
|
2
3rdparty/libmygpo-qt/Settings_p.h
vendored
2
3rdparty/libmygpo-qt/Settings_p.h
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
|
2
3rdparty/libmygpo-qt/Tag.cpp
vendored
2
3rdparty/libmygpo-qt/Tag.cpp
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
|
2
3rdparty/libmygpo-qt/Tag.h
vendored
2
3rdparty/libmygpo-qt/Tag.h
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
|
4
3rdparty/libmygpo-qt/TagList.cpp
vendored
4
3rdparty/libmygpo-qt/TagList.cpp
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
@ -22,7 +22,7 @@
|
||||
|
||||
#include "TagList_p.h"
|
||||
|
||||
#include <qjson/parser.h>
|
||||
#include <parser.h>
|
||||
|
||||
using namespace mygpo;
|
||||
|
||||
|
2
3rdparty/libmygpo-qt/TagList.h
vendored
2
3rdparty/libmygpo-qt/TagList.h
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
|
2
3rdparty/libmygpo-qt/TagList_p.h
vendored
2
3rdparty/libmygpo-qt/TagList_p.h
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
|
2
3rdparty/libmygpo-qt/Tag_p.h
vendored
2
3rdparty/libmygpo-qt/Tag_p.h
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
|
5
3rdparty/libmygpo-qt/UrlBuilder.cpp
vendored
5
3rdparty/libmygpo-qt/UrlBuilder.cpp
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
@ -22,6 +22,7 @@
|
||||
|
||||
|
||||
#include "UrlBuilder.h"
|
||||
#include "Config.h"
|
||||
|
||||
#include <QString>
|
||||
#include <QStringBuilder>
|
||||
@ -29,7 +30,7 @@
|
||||
|
||||
using namespace mygpo;
|
||||
|
||||
const QString UrlBuilder::s_server = QLatin1String( "http://gpodder.net" );
|
||||
const QString UrlBuilder::s_server = Config::instance()->mygpoBaseUrl().toString();
|
||||
const QString UrlBuilder::s_api2 = QLatin1String( "/api/2" );
|
||||
const QString UrlBuilder::s_api1 = QLatin1String( "/api/1" );
|
||||
|
||||
|
2
3rdparty/libmygpo-qt/UrlBuilder.h
vendored
2
3rdparty/libmygpo-qt/UrlBuilder.h
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
|
28
3rdparty/libmygpo-qt/Version.h.in
vendored
Normal file
28
3rdparty/libmygpo-qt/Version.h.in
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2012 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Lesser General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2.1 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
* Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with this library; if not, write to the Free Software *
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 *
|
||||
* USA *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef LIBMYGPO_QT_VERSION_H
|
||||
#define LIBMYGPO_QT_VERSION_H
|
||||
|
||||
#define MYGPO_QT_VERSION_MAJOR ${MYGPO_QT_VERSION_MAJOR}
|
||||
#define MYGPO_QT_VERSION_MINOR ${MYGPO_QT_VERSION_MINOR}
|
||||
#define MYGPO_QT_VERSION_PATCH ${MYGPO_QT_VERSION_PATCH}
|
||||
|
||||
#endif // LIBMYGPO_QT_VERSION_H
|
12
3rdparty/libmygpo-qt/mygpo_export.h
vendored
12
3rdparty/libmygpo-qt/mygpo_export.h
vendored
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* This file is part of libmygpo-qt *
|
||||
* Copyright (c) 2010 - 2011 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2013 Stefan Derkits <stefan@derkits.at> *
|
||||
* Copyright (c) 2010 - 2011 Christian Wagner <christian.wagner86@gmx.at> *
|
||||
* Copyright (c) 2010 - 2011 Felix Winter <ixos01@gmail.com> *
|
||||
* *
|
||||
@ -25,6 +25,14 @@
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
|
||||
#define MYGPO_EXPORT
|
||||
#ifndef MYGPO_EXPORT
|
||||
# if defined(MYGPO_MAKEDLL)
|
||||
/* We are building this library */
|
||||
# define MYGPO_EXPORT Q_DECL_EXPORT
|
||||
# else
|
||||
/* We are using this library */
|
||||
# define MYGPO_EXPORT Q_DECL_IMPORT
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif // MYGPO_EXPORT_H
|
||||
|
Loading…
x
Reference in New Issue
Block a user