30 lines
950 B
C
30 lines
950 B
C
|
#ifndef ISTOMPSUBJECT_H
|
||
|
#define ISTOMPSUBJECT_H
|
||
|
|
||
|
#include "iStompObserver.h"
|
||
|
#include <QString>
|
||
|
|
||
|
namespace interface {
|
||
|
class iStompSubject {
|
||
|
public:
|
||
|
virtual bool subscribe(iStompObserver* obs);
|
||
|
virtual void unsubscribe(iStompObserver* obs);
|
||
|
|
||
|
virtual void connectRequest(QString host, int port, QString vhost, QString username, QString password);
|
||
|
virtual void sendRequest(QString destination, QString body);
|
||
|
virtual void subscribeRequest(QString destination, int id);
|
||
|
virtual void disconnectRequest();
|
||
|
|
||
|
protected:
|
||
|
virtual void notifyConnectConfirmation(bool success, int version);
|
||
|
virtual void notifySendConfirmation(bool success);
|
||
|
virtual void notifySubscribeConfirmation(bool success);
|
||
|
virtual void notifyReceiveIndication(int id, QString destination, QString body);
|
||
|
virtual void notifyDisconnectConfirmation();
|
||
|
virtual void notifyDisconnectIndication();
|
||
|
|
||
|
};
|
||
|
} // namespace
|
||
|
|
||
|
#endif // ISTOMPSUBJECT_H
|