3#include <fineftp/server.h>
6#include <condition_variable>
35 const std::string&
password =
"opensrx");
ImageServer(const ImageServer &)=delete
std::unique_ptr< fineftp::FtpServer > ftpServer
Definition ImageServer.hpp:100
bool tryGetImage(Image &image)
Return the next image if one is available, without blocking.
uint16_t port
Definition ImageServer.hpp:95
std::deque< Image > imageQueue
Definition ImageServer.hpp:107
std::string getRootPath() const
Definition ImageServer.hpp:62
std::string rootPath
Definition ImageServer.hpp:98
std::string getUsername() const
Definition ImageServer.hpp:56
std::string username
Definition ImageServer.hpp:96
std::condition_variable queueCV
Definition ImageServer.hpp:106
Image waitForImage()
Block until an image is available, then return it.
bool isRunning() const
Definition ImageServer.hpp:50
ImageServer & operator=(const ImageServer &)=delete
ImageServer(uint16_t port=0, const std::string &username="opensrx", const std::string &password="opensrx")
Construct (but do not start) the image server.
std::thread watcherThread
Definition ImageServer.hpp:103
std::atomic< bool > running
Definition ImageServer.hpp:102
std::function< void(const Image &)> imageCallback
Definition ImageServer.hpp:109
std::deque< Image > getImages()
Return all images currently queued.
std::string password
Definition ImageServer.hpp:97
void setImageCallback(std::function< void(const Image &)> cb)
Set a callback invoked each time a new image is decoded.
std::string getPassword() const
Definition ImageServer.hpp:59
std::mutex queueMutex
Definition ImageServer.hpp:105
Definition AsioInterface.hpp:5
Raw decoded image data.
Definition Image.hpp:18