Use libmygpo-1.0.7

This commit is contained in:
David Sansome 2013-04-15 21:21:19 +10:00
parent dac22dbd72
commit f777561f4a
57 changed files with 522 additions and 88 deletions

View File

@ -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"

View File

@ -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> *
* *

View File

@ -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> *
* *

View File

@ -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 );
}

View File

@ -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;
};

View File

@ -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;
};

View File

@ -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
View 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
View 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
View 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

View File

@ -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> *
* *

View File

@ -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> *
* *

View File

@ -22,7 +22,7 @@
#include "DeviceList_p.h"
#include <qjson/parser.h>
#include <parser.h>
using namespace mygpo;

View File

@ -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> *
* *

View File

@ -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> *
* *

View File

@ -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;

View File

@ -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 *

View File

@ -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 *

View File

@ -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;

View File

@ -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> *
* *

View File

@ -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> *
* *

View File

@ -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> *
* *

View File

@ -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;

View File

@ -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> *
* *

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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> *
* *

View File

@ -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> *
* *

View File

@ -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> *
* *

View File

@ -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;

View File

@ -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> *
* *

View File

@ -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> *
* *

View File

@ -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> *
* *

View File

@ -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;
}

View File

@ -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 );

View File

@ -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;

View File

@ -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> *
* *

View File

@ -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;

View File

@ -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> *
* *

View File

@ -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> *
* *

View File

@ -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> *
* *

View File

@ -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() );
}

View File

@ -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 );
};
}

View File

@ -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;

View File

@ -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> *
* *

View File

@ -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> *
* *

View File

@ -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> *
* *

View File

@ -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> *
* *

View File

@ -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;

View File

@ -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> *
* *

View File

@ -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> *
* *

View File

@ -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> *
* *

View File

@ -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" );

View File

@ -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
View 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

View File

@ -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