Esempio n. 1
0
void MultipleBotConnection::connectTheExternalSocket(CatchChallengerClient * client)
{
    client->api->setDatapackPath(QCoreApplication::applicationDirPath()+QLatin1Literal("/datapack/"));
    if(!connect(client->api,&CatchChallenger::Api_client_real::insert_player,            this,&MultipleBotConnection::insert_player))
        abort();
    if(!connect(client->api,&CatchChallenger::Api_client_real::haveCharacter,            this,&MultipleBotConnection::haveCharacter))
        abort();
    if(!connect(client->api,&CatchChallenger::Api_client_real::logged,                   this,&MultipleBotConnection::logged))
        abort();
    if(!connect(client->api,&CatchChallenger::Api_client_real::have_current_player_info, this,&MultipleBotConnection::have_current_player_info))
        abort();
    if(!connect(client->api,&CatchChallenger::Api_client_real::newError,                 this,&MultipleBotConnection::newError))
        abort();
    if(!connect(client->api,&CatchChallenger::Api_client_real::newCharacterId,           this,&MultipleBotConnection::newCharacterId))
        abort();
    if(!connect(client->api,&CatchChallenger::Api_client_real::lastReplyTime,            this,&MultipleBotConnection::lastReplyTime))
        abort();
    if(!connect(client->api,&CatchChallenger::Api_client_real::notLogged,                this,&MultipleBotConnection::notLogged))
        abort();
    if(!connect(client->socket,&CatchChallenger::ConnectedSocket::disconnected,          this,&MultipleBotConnection::disconnected))
        abort();
    if(apiToCatchChallengerClient.isEmpty())
    {
        if(!connect(client->api,&CatchChallenger::Api_client_real::haveTheDatapack,         this,&MultipleBotConnection::haveTheDatapack))
            abort();
        if(!connect(client->api,&CatchChallenger::Api_client_real::haveTheDatapackMainSub,  this,&MultipleBotConnection::haveTheDatapackMainSub))
            abort();
        if(!connect(client->api,&CatchChallenger::Api_client_real::haveDatapackMainSubCode,  this,&MultipleBotConnection::haveTheDatapackMainSubCode))
            abort();
    }
    client->haveShowDisconnectionReason=false;
    client->haveBeenDiscounted=false;
    client->have_informations=false;
    client->number=numberToChangeLoginForMultipleConnexion;
    client->selectedCharacter=false;
    numberToChangeLoginForMultipleConnexion++;
    apiToCatchChallengerClient[client->api]=client;
    connectedSocketToCatchChallengerClient[client->socket]=client;
    tryLink(client);
}
Esempio n. 2
0
void gstlinkable::link(GstElement *src, GstElement *sink)
{
    tryLink(src, sink);
}