Warning, file /graphics/kphotoalbum/RemoteControl/RemoteInterface.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 // SPDX-FileCopyrightText: 2014-2022 Jesper K. Pedersen <blackie@kde.org> 0002 // 0003 // SPDX-License-Identifier: GPL-2.0-or-later 0004 0005 #ifndef REMOTEINTERFACE_H 0006 #define REMOTEINTERFACE_H 0007 0008 #include "ImageNameStore.h" 0009 #include "RemoteCommand.h" 0010 0011 #include <DB/ImageSearchInfo.h> 0012 #include <ImageManager/ImageClientInterface.h> 0013 0014 #include <QHostAddress> 0015 #include <QObject> 0016 0017 class QHostAddress; 0018 0019 namespace RemoteControl 0020 { 0021 class Server; 0022 0023 class RemoteInterface : public QObject, public ImageManager::ImageClientInterface 0024 { 0025 Q_OBJECT 0026 public: 0027 static RemoteInterface &instance(); 0028 void pixmapLoaded(ImageManager::ImageRequest *request, const QImage &image) override; 0029 bool requestStillNeeded(const DB::FileName &fileName); 0030 void listen(QHostAddress address = QHostAddress::Any); 0031 void stopListening(); 0032 void connectTo(const QHostAddress &address); 0033 0034 private Q_SLOTS: 0035 void handleCommand(const RemoteCommand &); 0036 0037 Q_SIGNALS: 0038 void connected(); 0039 void disConnected(); 0040 void listening(); 0041 void stoppedListening(); 0042 0043 private: 0044 explicit RemoteInterface(QObject *parent = 0); 0045 0046 void sendCategoryNames(const SearchRequest &searchInfo); 0047 void sendCategoryValues(const SearchRequest &search); 0048 void sendImageSearchResult(const SearchInfo &search); 0049 void requestThumbnail(const ThumbnailRequest &command); 0050 void cancelRequest(const ThumbnailCancelRequest &command); 0051 void sendImageDetails(const ImageDetailsRequest &command); 0052 void sendHomePageImages(const StaticImageRequest &command); 0053 void setToken(const ToggleTokenRequest &command); 0054 0055 DB::ImageSearchInfo convert(const RemoteControl::SearchInfo &) const; 0056 Server *m_connection; 0057 QSet<DB::FileName> m_activeReuqest; 0058 ImageNameStore m_imageNameStore; 0059 }; 0060 0061 } 0062 #endif // REMOTEINTERFACE_H