FeedReader: Added shrink of images for board post

This commit is contained in:
thunder2 2023-04-26 21:53:59 +02:00
parent e25c148c27
commit af562cb4ca
13 changed files with 226 additions and 14 deletions

View file

@ -80,6 +80,9 @@ public:
virtual bool getForumGroups(std::vector<RsGxsForumGroup> &groups, bool onlyOwn);
virtual bool getPostedGroups(std::vector<RsPostedGroup> &groups, bool onlyOwn);
virtual FeedReaderShrinkImageTask *getShrinkImageTask();
virtual void setShrinkImageTaskResult(FeedReaderShrinkImageTask *shrinkedImageTask);
virtual RsFeedReaderErrorState processXPath(const std::list<std::string> &xpathsToUse, const std::list<std::string> &xpathsToRemove, std::string &description, std::string &errorString);
virtual RsFeedReaderErrorState processXslt(const std::string &xslt, std::string &description, std::string &errorString);
@ -104,6 +107,7 @@ public:
bool getPostedGroup(const RsGxsGroupId &groupId, RsPostedGroup &postedGroup);
bool updatePostedGroup(const RsPostedGroup &postedGroup, const std::string &groupName, const std::string &groupDescription);
bool waitForToken(RsGxsIfaceHelper *interface, uint32_t token);
bool shrinkImage(FeedReaderShrinkImageTask::Type type, const std::vector<unsigned char> &image, std::vector<unsigned char> &resultImage);
protected:
/****************** p3Config STUFF *******************/
@ -145,6 +149,10 @@ private:
RsMutex mProcessMutex;
std::list<uint32_t> mProcessFeeds;
RsMutex mImageMutex;
std::list<FeedReaderShrinkImageTask*> mImages;
std::list<FeedReaderShrinkImageTask*> mResultImages;
RsMutex mPreviewMutex;
p3FeedReaderThread *mPreviewDownloadThread;
p3FeedReaderThread *mPreviewProcessThread;