Ejemplo n.º 1
0
int main()
{
    {
        new Eris::TransferInfo("", 0, "", "");
    }

    {
        Eris::TransferInfo * ti = new Eris::TransferInfo("", 0, "", "");
        delete ti;
    }

    {
        Eris::TransferInfo * ti = new Eris::TransferInfo(TEST_HOST, 0, "", "");
        const std::string & host = ti->getHost();
        assert(host == TEST_HOST);
    }

    {
        Eris::TransferInfo * ti = new Eris::TransferInfo("", TEST_PORT, "", "");
        int port = ti->getPort();
        assert(port == TEST_PORT);
    }

    {
        Eris::TransferInfo * ti = new Eris::TransferInfo("", 0, TEST_KEY, "");
        const std::string & key = ti->getPossessKey();
        assert(key == TEST_KEY);
    }

    {
        Eris::TransferInfo * ti = new Eris::TransferInfo("", 0, "", TEST_ID);
        const std::string & id = ti->getPossessEntityId();
        assert(id == TEST_ID);
    }

    return 0;
}
Ejemplo n.º 2
0
void NonConnectedState::transfer(const Eris::TransferInfo& transferInfo)
{
	//Start by disconnecting from current server, and reconnecting to new server.
	destroyChildState();
	connect(transferInfo.getHost(), transferInfo.getPort());
}
Ejemplo n.º 3
0
void LoggedInState::takeTransferredCharacter(const Eris::TransferInfo& transferInfo)
{
	S_LOG_INFO("Trying to take transferred character with id " << transferInfo.getPossessEntityId() << ".");
	mAccount.takeTransferredCharacter(transferInfo.getPossessEntityId(), transferInfo.getPossessKey());
}