59 lines
1.4 KiB
C++
59 lines
1.4 KiB
C++
/*
|
|
* File: NFDTestApplication.h
|
|
* Author: jgaebler
|
|
*
|
|
* Created on April 20, 2011, 11:32 AM
|
|
*/
|
|
|
|
#ifndef NFDTESTAPPLICATION_H
|
|
#define NFDTESTAPPLICATION_H
|
|
|
|
#include "Application.h"
|
|
|
|
#include "common/Defines.h"
|
|
#include "ms/PeerState.h"
|
|
|
|
namespace ubeeme {
|
|
namespace moversight {
|
|
|
|
class Dispatcher;
|
|
class Moversight;
|
|
|
|
class NFDTestApplication : public Application {
|
|
public:
|
|
|
|
NFDTestApplication(Moversight & m);
|
|
|
|
virtual ~NFDTestApplication();
|
|
|
|
virtual void initialise();
|
|
virtual void finalise();
|
|
|
|
void startTestCase(unsigned int i);
|
|
|
|
void receiveGroupData(GroupData & data, PeerID sender);
|
|
|
|
// Event handling
|
|
virtual void handleEvent(const PeerJoinedEvent & e);
|
|
virtual void handleEvent(const PeerReconnectedEvent & e);
|
|
virtual void handleEvent(const PendingPeersEvent & e);
|
|
virtual void handleEvent(const JoinRequestEvent & e);
|
|
virtual void handleEvent(const JoinConfirmEvent & e);
|
|
virtual void handleEvent(const JoinRejectedEvent & e);
|
|
virtual void handleEvent(const JoinAbortedEvent & e);
|
|
|
|
private:
|
|
void invitePeer(TransportAddress & ta);
|
|
void leaveGroup();
|
|
void sendData();
|
|
|
|
PeerState state;
|
|
};
|
|
}
|
|
}
|
|
|
|
|
|
|
|
#endif /* NFDTESTAPPLICATION_H */
|
|
|