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++

#ifndef ISTOMPSUBJECT_H
#define ISTOMPSUBJECT_H
#include "iStompObserver.h"
#include <QString>
namespace interface {
class iStompSubject {
public:
virtual ~iStompSubject() {}
protected:
iStompSubject() {}
public:
virtual bool subscribe(iStompObserver* obs) = 0;
virtual void unsubscribe(iStompObserver* obs) = 0;
virtual int connectRequest(QString host, int port, QString vhost, QString username, QString password) = 0;
virtual void sendRequest(QString destination, const QByteArray& body) = 0;
virtual void subscribeRequest(QString destination, int id) = 0;
virtual void disconnectRequest() = 0;
protected:
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;
};
} // namespace
#endif // ISTOMPSUBJECT_H