9#ifndef QEVERCLOUD_THUMBNAIL_H
10#define QEVERCLOUD_THUMBNAIL_H
18#include <QNetworkAccessManager>
26class ThumbnailPrivate;
64 QTextStream & strm,
const ImageType imageType);
95 QString host, QString shardId, QString authenticationToken,
96 int size = 300,
ImageType imageType = ImageType::PNG);
149 Guid guid,
const bool isPublic =
false,
const bool isResourceGuid =
false,
150 const qint64 timeoutMsec = 30000);
154 Guid guid,
const bool isPublic =
false,
const bool isResourceGuid =
false,
155 const qint64 timeoutMsec = 30000);
173 ThumbnailPrivate *
const d_ptr;
#define QEVERCLOUD_EXPORT
Definition Export.h:19
Returned by asynchonous versions of functions.
Definition AsyncResult.h:54
The class is for downloading thumbnails for notes and resources from Evernote servers.
Definition Thumbnail.h:48
Thumbnail & setHost(QString host)
Thumbnail & setAuthenticationToken(QString authenticationToken)
Thumbnail & setImageType(ImageType imageType)
friend QEVERCLOUD_EXPORT QDebug & operator<<(QDebug &dbg, const ImageType imageType)
Thumbnail()
Default constructor.
AsyncResult * downloadAsync(Guid guid, const bool isPublic=false, const bool isResourceGuid=false, const qint64 timeoutMsec=30000)
QByteArray download(Guid guid, const bool isPublic=false, const bool isResourceGuid=false, const qint64 timeoutMsec=30000)
Downloads the thumbnail for a resource or a note.
ImageType
Definition Thumbnail.h:56
std::pair< QNetworkRequest, QByteArray > createPostRequest(qevercloud::Guid guid, bool isPublic=false, bool isResourceGuid=false)
Prepares a POST request for a thumbnail download.
Thumbnail(QString host, QString shardId, QString authenticationToken, int size=300, ImageType imageType=ImageType::PNG)
Constructs Thumbnail.
friend QEVERCLOUD_EXPORT QTextStream & operator<<(QTextStream &strm, const ImageType imageType)
Thumbnail & setSize(int size)
Thumbnail & setShardId(QString shardId)
Definition AsyncResult.h:21
QString Guid
Definition Types.h:62