65 lines
1.6 KiB
C++
65 lines
1.6 KiB
C++
/*
|
|
* File: PendingTestApplication.h
|
|
* Author: jgaebler
|
|
*
|
|
* Created on February 19, 2013, 5:01 PM
|
|
*/
|
|
#pragma once
|
|
|
|
#ifndef PENDINGTESTAPPLICATION_H
|
|
#define PENDINGTESTAPPLICATION_H
|
|
|
|
#include "Application.h"
|
|
|
|
namespace ubeeme {
|
|
namespace moversight {
|
|
|
|
class Dispatcher;
|
|
class Moversight;
|
|
class Invitation;
|
|
|
|
/**
|
|
* @class PendingTestApplication
|
|
* @author Jan Gäbler
|
|
* @brief An test application to test the protocol services related to
|
|
* pending peer issues.
|
|
* @ingroup Moversight
|
|
*/
|
|
class PendingTestApplication : public Application {
|
|
public:
|
|
|
|
PendingTestApplication(Moversight & m);
|
|
virtual ~PendingTestApplication();
|
|
|
|
virtual void initialise();
|
|
virtual void finalise();
|
|
|
|
void startTestCase(unsigned int inv);
|
|
|
|
void receiveGroupData(const GroupData & data, const PeerID sender);
|
|
|
|
// Event handling
|
|
virtual void handleEvent(const JoinRequestEvent & e);
|
|
virtual void handleEvent(const JoinConfirmEvent & e);
|
|
virtual void handleEvent(const JoinRejectedEvent & e);
|
|
virtual void handleEvent(const JoinAbortedEvent & e);
|
|
virtual void handleEvent(const PendingPeersEvent & e);
|
|
virtual void handleEvent(const PeerReconnectedEvent & e);
|
|
virtual void handleEvent(const PeerLeftEvent & e);
|
|
|
|
private:
|
|
|
|
void testCase00();
|
|
|
|
void invitePeer(TransportAddress & ta);
|
|
void leaveGroup();
|
|
void sendData();
|
|
|
|
};
|
|
|
|
}
|
|
}
|
|
|
|
#endif /* PENDINGTESTAPPLICATION_H */
|
|
|