atticabasejob.h   atticabasejob.h 
skipping to change at line 58 skipping to change at line 58
void start(); void start();
void abort(); void abort();
Q_SIGNALS: Q_SIGNALS:
void finished(Attica::BaseJob* job); void finished(Attica::BaseJob* job);
protected Q_SLOTS: protected Q_SLOTS:
void dataFinished(); void dataFinished();
protected: protected:
BaseJob(const QSharedPointer<PlatformDependent>& internals);
BaseJob(PlatformDependent* internals); BaseJob(PlatformDependent* internals);
void setMetadata(const Metadata& data) const; void setMetadata(const Metadata& data) const;
virtual QNetworkReply* executeRequest() = 0; virtual QNetworkReply* executeRequest() = 0;
virtual void parse(const QString& xml) = 0; virtual void parse(const QString& xml) = 0;
PlatformDependent* internals(); PlatformDependent* internals();
void setError(int errorCode); void setError(int errorCode);
void setErrorString(const QString& errorString); void setErrorString(const QString& errorString);
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 getjob.h   getjob.h 
skipping to change at line 39 skipping to change at line 39
#include "atticaclient_export.h" #include "atticaclient_export.h"
#include "atticabasejob.h" #include "atticabasejob.h"
namespace Attica { namespace Attica {
class ATTICA_EXPORT GetJob : public Attica::BaseJob class ATTICA_EXPORT GetJob : public Attica::BaseJob
{ {
Q_OBJECT Q_OBJECT
protected: protected:
GetJob(const QSharedPointer<PlatformDependent>& internals, const QNetwo rkRequest& request);
GetJob(PlatformDependent* internals, const QNetworkRequest& request); GetJob(PlatformDependent* internals, const QNetworkRequest& request);
private: private:
virtual QNetworkReply* executeRequest(); virtual QNetworkReply* executeRequest();
const QNetworkRequest m_request; const QNetworkRequest m_request;
}; };
} }
#endif #endif
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 itemjob.h   itemjob.h 
skipping to change at line 40 skipping to change at line 40
namespace Attica { namespace Attica {
class Provider; class Provider;
template <class T> template <class T>
class ATTICA_EXPORT ItemJob : public GetJob class ATTICA_EXPORT ItemJob : public GetJob
{ {
public: public:
T result() const; T result() const;
private: private:
ItemJob(const QSharedPointer<PlatformDependent>& internals, const QNetw orkRequest& request);
ItemJob(PlatformDependent*, const QNetworkRequest& request); ItemJob(PlatformDependent*, const QNetworkRequest& request);
virtual void parse(const QString& xml); virtual void parse(const QString& xml);
T m_item; T m_item;
friend class Attica::Provider; friend class Attica::Provider;
}; };
template <class T> template <class T>
class ATTICA_EXPORT ItemPostJob : public PostJob class ATTICA_EXPORT ItemPostJob : public PostJob
{ {
public: public:
T result() const; T result() const;
private: private:
ItemPostJob(const QSharedPointer<PlatformDependent>& internals, const Q
NetworkRequest& request, QIODevice * data);
ItemPostJob(const QSharedPointer<PlatformDependent>& internals, const Q
NetworkRequest& request, const StringMap& parameters = StringMap());
ItemPostJob(PlatformDependent* internals, const QNetworkRequest& reques t, QIODevice * data); ItemPostJob(PlatformDependent* internals, const QNetworkRequest& reques t, QIODevice * data);
ItemPostJob(PlatformDependent* internals, const QNetworkRequest& reques t, const StringMap& parameters = StringMap()); ItemPostJob(PlatformDependent* internals, const QNetworkRequest& reques t, const StringMap& parameters = StringMap());
virtual void parse(const QString& xml); virtual void parse(const QString& xml);
T m_item; T m_item;
friend class Attica::Provider; friend class Attica::Provider;
}; };
} }
 End of changes. 2 change blocks. 
5 lines changed or deleted 0 lines changed or added


 listjob.h   listjob.h 
skipping to change at line 45 skipping to change at line 45
template <class T> template <class T>
class ATTICA_EXPORT ListJob : public GetJob class ATTICA_EXPORT ListJob : public GetJob
{ {
public: public:
typename T::List itemList() const; typename T::List itemList() const;
protected: protected:
virtual void parse(const QString& xml); virtual void parse(const QString& xml);
private: private:
ListJob(const QSharedPointer<PlatformDependent>& internals, const Q NetworkRequest& request);
ListJob(PlatformDependent* internals, const QNetworkRequest& reques t); ListJob(PlatformDependent* internals, const QNetworkRequest& reques t);
typename T::List m_itemList; typename T::List m_itemList;
friend class Attica::Provider; friend class Attica::Provider;
}; };
} }
#endif #endif
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 platformdependent.h   platformdependent.h 
skipping to change at line 37 skipping to change at line 37
#include <QtCore/QList> #include <QtCore/QList>
#include <QtCore/QtPlugin> #include <QtCore/QtPlugin>
class QByteArray; class QByteArray;
class QIODevice; class QIODevice;
class QNetworkAccessManager; class QNetworkAccessManager;
class QNetworkReply; class QNetworkReply;
class QNetworkRequest; class QNetworkRequest;
class QString; class QString;
class QUrl; class QUrl;
class QStringList;
namespace Attica { namespace Attica {
class PlatformDependent class PlatformDependent
{ {
public: public:
virtual ~PlatformDependent() {} virtual ~PlatformDependent() {}
virtual QList<QUrl> getDefaultProviderFiles() const = 0; virtual QList<QUrl> getDefaultProviderFiles() const = 0;
virtual void addDefaultProviderFile(const QUrl& url) = 0;
virtual void removeDefaultProviderFile(const QUrl& url) = 0;
/**
* Providers are enabled by default. Use this call to disable or enable
them later.
*/
virtual void enableProvider(const QUrl& baseUrl, bool enabled) const =
0;
virtual bool isEnabled(const QUrl& baseUrl) const = 0;
virtual bool hasCredentials(const QUrl& baseUrl) const = 0; virtual bool hasCredentials(const QUrl& baseUrl) const = 0;
virtual bool loadCredentials(const QUrl& baseUrl, QString& user, QStrin g& password) = 0; virtual bool loadCredentials(const QUrl& baseUrl, QString& user, QStrin g& password) = 0;
virtual bool askForCredentials(const QUrl& baseUrl, QString& user, QStr ing& password) = 0; virtual bool askForCredentials(const QUrl& baseUrl, QString& user, QStr ing& password) = 0;
virtual bool saveCredentials(const QUrl& baseUrl, const QString& user, const QString& password) = 0; virtual bool saveCredentials(const QUrl& baseUrl, const QString& user, const QString& password) = 0;
virtual QNetworkReply* get(const QNetworkRequest& request) = 0; virtual QNetworkReply* get(const QNetworkRequest& request) = 0;
virtual QNetworkReply* post(const QNetworkRequest& request, QIODevice* data) = 0; virtual QNetworkReply* post(const QNetworkRequest& request, QIODevice* data) = 0;
virtual QNetworkReply* post(const QNetworkRequest& request, const QByte Array& data) = 0; virtual QNetworkReply* post(const QNetworkRequest& request, const QByte Array& data) = 0;
virtual QNetworkAccessManager* nam() = 0; virtual QNetworkAccessManager* nam() = 0;
}; };
} }
Q_DECLARE_INTERFACE(Attica::PlatformDependent, "org.kde.Attica.Internals/1. 0") Q_DECLARE_INTERFACE(Attica::PlatformDependent, "org.kde.Attica.Internals/1. 2")
#endif #endif
 End of changes. 3 change blocks. 
1 lines changed or deleted 13 lines changed or added


 postjob.h   postjob.h 
skipping to change at line 43 skipping to change at line 43
typedef QMap<QString, QString> StringMap; typedef QMap<QString, QString> StringMap;
namespace Attica { namespace Attica {
class Provider; class Provider;
class ATTICA_EXPORT PostJob : public BaseJob class ATTICA_EXPORT PostJob : public BaseJob
{ {
Q_OBJECT Q_OBJECT
protected: protected:
PostJob(const QSharedPointer<PlatformDependent>& internals, const QNetw
orkRequest& request, QIODevice* data);
PostJob(const QSharedPointer<PlatformDependent>& internals, const QNetw
orkRequest& request, const StringMap& parameters = StringMap());
PostJob(const QSharedPointer<PlatformDependent>& internals, const QNetw
orkRequest& request, const QByteArray& byteArray);
PostJob(PlatformDependent* internals, const QNetworkRequest& request, Q IODevice* data); PostJob(PlatformDependent* internals, const QNetworkRequest& request, Q IODevice* data);
PostJob(PlatformDependent* internals, const QNetworkRequest& request, c onst StringMap& parameters = StringMap()); PostJob(PlatformDependent* internals, const QNetworkRequest& request, c onst StringMap& parameters = StringMap());
PostJob(PlatformDependent* internals, const QNetworkRequest& request, c onst QByteArray& byteArray); PostJob(PlatformDependent* internals, const QNetworkRequest& request, c onst QByteArray& byteArray);
private: private:
virtual QNetworkReply* executeRequest(); virtual QNetworkReply* executeRequest();
virtual void parse(const QString&); virtual void parse(const QString&);
QIODevice* m_ioDevice; QIODevice* m_ioDevice;
QByteArray m_byteArray; QByteArray m_byteArray;
 End of changes. 1 change blocks. 
7 lines changed or deleted 0 lines changed or added


 provider.h   provider.h 
skipping to change at line 66 skipping to change at line 66
class PostJob; class PostJob;
class Provider; class Provider;
class AccountBalance; class AccountBalance;
/** /**
* The Provider class represents one Open Collaboration Service provider. * The Provider class represents one Open Collaboration Service provider.
* Use the ProviderManager to instanciate a Provider. * Use the ProviderManager to instanciate a Provider.
* *
* Accessing functions of the Provider returns a Job class that * Accessing functions of the Provider returns a Job class that
* takes care of accessing the server and parsing the result. * takes care of accessing the server and parsing the result.
*
* Provider files are xml of the form:
<pre>
<provider>
<id>opendesktop</id>
<location>https://api.opendesktop.org/v1/</location>
<name>openDesktop.org</name>
<icon></icon>
<termsofuse>https://opendesktop.org/terms/</termsofuse>
<register>https://opendesktop.org/usermanager/new.php</register>
<services>
<person ocsversion="1.3" />
<friend ocsversion="1.3" />
<message ocsversion="1.3" />
<activity ocsversion="1.3" />
<content ocsversion="1.3" />
<fan ocsversion="1.3" />
<knowledgebase ocsversion="1.3" />
<event ocsversion="1.3" />
<comment ocsversion="1.2" />
</services>
</provider>
</pre>
* The server provides the services specified in the services section, not
necessarily all of them.
*/ */
class ATTICA_EXPORT Provider class ATTICA_EXPORT Provider
{ {
public: public:
Provider(); Provider();
Provider(const Provider& other); Provider(const Provider& other);
Provider& operator=(const Provider& other); Provider& operator=(const Provider& other);
~Provider(); ~Provider();
/**
Returns true if the provider has been set up and can be used.
*/
bool isValid() const; bool isValid() const;
/**
Test if the provider is enabled by the settings.
The application can choose to ignore this, but the user settings should
be respected.
*/
bool isEnabled() const;
void setEnabled(bool enabled);
/**
A url that identifies this provider.
This should be used as identifier when refering to this provider but yo
u don't want to use the full provider object.
*/
QUrl baseUrl() const; QUrl baseUrl() const;
/**
A name for the provider that can be displayed to the user
*/
QString name() const; QString name() const;
enum SortMode { enum SortMode {
Newest, Newest,
Alphabetical, Alphabetical,
Rating, Rating,
Downloads Downloads
}; };
bool hasCredentials(); /**
Test if the server supports the person part of the API
*/
bool hasPersonService() const;
/**
Version of the person part of the API
*/
QString personServiceVersion() const;
/**
Test if the server supports the friend part of the API
*/
bool hasFriendService() const;
/**
Version of the friend part of the API
*/
QString friendServiceVersion() const;
/**
Test if the server supports the message part of the API
*/
bool hasMessageService() const;
/**
Version of the message part of the API
*/
QString messageServiceVersion() const;
/**
Test if the server supports the activity part of the API
*/
bool hasActivityService() const;
/**
Version of the activity part of the API
*/
QString activityServiceVersion() const;
/**
Test if the server supports the content part of the API
*/
bool hasContentService() const;
/**
Version of the content part of the API
*/
QString contentServiceVersion() const;
/**
Test if the server supports the fan part of the API
*/
bool hasFanService() const;
/**
Version of the fan part of the API
*/
QString fanServiceVersion() const;
/**
Test if the server supports the knowledgebase part of the API
*/
bool hasKnowledgebaseService() const;
/**
Version of the knowledgebase part of the API
*/
QString knowledgebaseServiceVersion() const;
/**
Test if the server supports the comments part of the API
*/
bool hasCommentService() const;
/**
Version of the comments part of the API
*/
QString commentServiceVersion() const;
/**
Test if the provider has user name/password available.
This does not yet open kwallet in case the KDE plugin is used.
@return true if the provider has login information
*/
bool hasCredentials() const; bool hasCredentials() const;
bool hasCredentials();
/**
Load user name and password from the store.
Attica will remember the loaded values and use them from this point o
n.
@param user reference that returns the user name
@param password reference that returns the password
@return if credentials could be loaded
*/
bool loadCredentials(QString& user, QString& password); bool loadCredentials(QString& user, QString& password);
/**
Sets (and remembers) user name and password for this provider.
To remove the data an empty username should be passed.
@param user the user (login) name
@param password the password
@return if credentials could be saved
*/
bool saveCredentials(const QString& user, const QString& password); bool saveCredentials(const QString& user, const QString& password);
/**
Test if the server accepts the login/password.
This function does not actually set the credentials. Use saveCredenti
als for that purpose.
@param user the user (login) name
@param password the password
@return the job that will contain the success of the login as metadat
a
*/
PostJob* checkLogin(const QString& user, const QString& password); PostJob* checkLogin(const QString& user, const QString& password);
// Person part of OCS // Person part of OCS
PostJob* registerAccount(const QString& id, const QString& password, co nst QString& mail, const QString& firstName, const QString& lastName); PostJob* registerAccount(const QString& id, const QString& password, co nst QString& mail, const QString& firstName, const QString& lastName);
ItemJob<Person>* requestPerson(const QString& id); ItemJob<Person>* requestPerson(const QString& id);
ItemJob<Person>* requestPersonSelf(); ItemJob<Person>* requestPersonSelf();
ItemJob<AccountBalance>* requestAccountBalance(); ItemJob<AccountBalance>* requestAccountBalance();
ListJob<Person>* requestPersonSearchByName(const QString& name); ListJob<Person>* requestPersonSearchByName(const QString& name);
ListJob<Person>* requestPersonSearchByLocation(qreal latitude, qreal lo ngitude, qreal distance = 0.0, int page = 0, int pageSize = 20); ListJob<Person>* requestPersonSearchByLocation(qreal latitude, qreal lo ngitude, qreal distance = 0.0, int page = 0, int pageSize = 20);
skipping to change at line 221 skipping to change at line 365
ItemJob<AccountBalance>* doRequestAccountBalance(const QUrl& url); ItemJob<AccountBalance>* doRequestAccountBalance(const QUrl& url);
ListJob<Person>* doRequestPersonList(const QUrl& url); ListJob<Person>* doRequestPersonList(const QUrl& url);
ListJob<Activity>* doRequestActivityList(const QUrl& url); ListJob<Activity>* doRequestActivityList(const QUrl& url);
ListJob<Folder>* doRequestFolderList(const QUrl& url); ListJob<Folder>* doRequestFolderList(const QUrl& url);
ListJob<Message>* doRequestMessageList(const QUrl& url); ListJob<Message>* doRequestMessageList(const QUrl& url);
private: private:
class Private; class Private;
QExplicitlySharedDataPointer<Private> d; QExplicitlySharedDataPointer<Private> d;
// old constructor: used to pass internals as QSharedPointer, but chang
ed to pointer
// deleting the root objects of plugins is evil (see QPluginLoaded docs
)
Provider(const QSharedPointer<PlatformDependent>& internals, const QUrl
& baseUrl, const QString& name, const QUrl& icon = QUrl());
// FIXME use baseUrl as id
Provider(PlatformDependent* internals, const QUrl& baseUrl, const QStri ng& name, const QUrl& icon = QUrl()); Provider(PlatformDependent* internals, const QUrl& baseUrl, const QStri ng& name, const QUrl& icon = QUrl());
Provider(PlatformDependent* internals, const QUrl& baseUrl, const QStri
ng& name, const QUrl& icon,
const QString& person, const QString& friendV, const QString&
message,
const QString& activity, const QString& content, const QString
& fan,
const QString& knowledgebase, const QString& event, const QStr
ing& comment);
// TODO remove friend class ProviderManager;
friend class ProviderManager;
}; };
} }
#endif #endif
 End of changes. 11 change blocks. 
10 lines changed or deleted 160 lines changed or added


 providermanager.h   providermanager.h 
skipping to change at line 66 skipping to change at line 66
public: public:
ProviderManager(); ProviderManager();
~ProviderManager(); ~ProviderManager();
/** /**
* Load available providers from configuration * Load available providers from configuration
*/ */
void loadDefaultProviders(); void loadDefaultProviders();
/** /**
* The list of provider files that get loaded by loadDefaultProviders.
* Each of these files can contain multiple providers.
* @return list of provider file urls
*/
QList<QUrl> defaultProviderFiles();
/**
* Add a provider file to the default providers (xml that contains provi
der descriptions).
Provider files contain information about each provider:
<pre>
<providers>
<provider>
<id>opendesktop</id>
<location>https://api.opendesktop.org/v1/</location>
<name>openDesktop.org</name>
<icon></icon>
<termsofuse>https://opendesktop.org/terms/</termsofuse>
<register>https://opendesktop.org/usermanager/new.php</register>
<services>
<person ocsversion="1.3" />
<friend ocsversion="1.3" />
<message ocsversion="1.3" />
<activity ocsversion="1.3" />
<content ocsversion="1.3" />
<fan ocsversion="1.3" />
<knowledgebase ocsversion="1.3" />
<event ocsversion="1.3" />
</services>
</provider>
</providers>
</pre>
* @param url the url of the provider file
*/
void addProviderFileToDefaultProviders(const QUrl& url);
void removeProviderFileFromDefaultProviders(const QUrl& url);
/**
* Suppresses the authentication, so that the application can take care of authenticating itself * Suppresses the authentication, so that the application can take care of authenticating itself
*/ */
void setAuthenticationSuppressed(bool suppressed); void setAuthenticationSuppressed(bool suppressed);
/** /**
* Remove all providers that have been loaded * Remove all providers and provider files that have been loaded
*/ */
void clear(); void clear();
/** /**
* Parse a xml file containing a provider description * Parse a xml file containing a provider description
*/ */
void addProviderFromXml(const QString& providerXml); void addProviderFromXml(const QString& providerXml);
void addProviderFile(const QUrl& file); void addProviderFile(const QUrl& file);
QList<QUrl> providerFiles() const; QList<QUrl> providerFiles() const;
 End of changes. 2 change blocks. 
1 lines changed or deleted 40 lines changed or added


 version.h   version.h 
skipping to change at line 27 skipping to change at line 27
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA. * Boston, MA 02110-1301, USA.
*/ */
#ifndef _ATTICA_VERSION_H_ #ifndef _ATTICA_VERSION_H_
#define _ATTICA_VERSION_H_ #define _ATTICA_VERSION_H_
#include "atticaclient_export.h" #include "atticaclient_export.h"
/// @brief Attica version as string at compile time. /// @brief Attica version as string at compile time.
#define LIBATTICA_VERSION_STRING "0.1.3" #define LIBATTICA_VERSION_STRING "0.1.4"
/// @brief The major Attica version number at compile time /// @brief The major Attica version number at compile time
#define LIBATTICA_VERSION_MAJOR 0 #define LIBATTICA_VERSION_MAJOR 0
/// @brief The minor Attica version number at compile time /// @brief The minor Attica version number at compile time
#define LIBATTICA_VERSION_MINOR 1 #define LIBATTICA_VERSION_MINOR 1
/// @brief The Attica release version number at compile time /// @brief The Attica release version number at compile time
#define LIBATTICA_VERSION_RELEASE #define LIBATTICA_VERSION_RELEASE
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/