This repository has been archived on 2024-10-30. You can view files and clone it, but cannot push or open issues or pull requests.
SDi-STOMP/interface/iStompSubject.h

37 lines
1.1 KiB
C
Raw Permalink Normal View History

2023-11-29 10:53:20 +00:00
#ifndef ISTOMPSUBJECT_H
#define ISTOMPSUBJECT_H
#include "iStompObserver.h"
#include <QString>
namespace interface {
class iStompSubject {
2023-11-30 08:53:53 +00:00
public:
virtual ~iStompSubject() {}
protected:
iStompSubject() {}
2023-11-29 10:53:20 +00:00
public:
2023-11-30 08:53:53 +00:00
virtual bool subscribe(iStompObserver* obs) = 0;
virtual void unsubscribe(iStompObserver* obs) = 0;
2023-11-29 10:53:20 +00:00
2023-11-30 08:53:53 +00:00
virtual int connectRequest(QString host, int port, QString vhost, QString username, QString password) = 0;
2023-12-06 11:00:27 +00:00
virtual void sendRequest(QString destination, const QByteArray& body) = 0;
2023-11-30 08:53:53 +00:00
virtual void subscribeRequest(QString destination, int id) = 0;
virtual void disconnectRequest() = 0;
2023-11-29 10:53:20 +00:00
protected:
2023-11-30 08:53:53 +00:00
virtual void notifyConnectConfirmation(bool success, QString version) = 0;
virtual void notifySendConfirmation(bool success) = 0;
virtual void notifySubscribeConfirmation(bool success) = 0;
virtual void notifyReceiveIndication(int id, QString destination, QString body) = 0;
virtual void notifyDisconnectConfirmation() = 0;
virtual void notifyDisconnectIndication() = 0;
2023-11-29 10:53:20 +00:00
};
} // namespace
#endif // ISTOMPSUBJECT_H