int ClientNetwork::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QObject::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: packetReceived(); break; case 1: packetCorrupted(); break; case 2: pingUpdated((*reinterpret_cast< quint32(*)>(_a[1]))); break; case 3: chatReceived((*reinterpret_cast< CLID(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2])),(*reinterpret_cast< QString(*)>(_a[3])),(*reinterpret_cast< ENUM_TYPE(*)>(_a[4]))); break; case 4: serverInformationsChanged((*reinterpret_cast< ServerInformations(*)>(_a[1]))); break; case 5: clientIDChanged((*reinterpret_cast< CLID(*)>(_a[1]))); break; case 6: nicknameChanged((*reinterpret_cast< CLID(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2]))); break; case 7: error((*reinterpret_cast< ENUM_TYPE(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2]))); break; case 8: clientVoted((*reinterpret_cast< CLID(*)>(_a[1])),(*reinterpret_cast< CLID(*)>(_a[2]))); break; case 9: newGameMaster((*reinterpret_cast< CLID(*)>(_a[1]))); break; case 10: serverName((*reinterpret_cast< QString(*)>(_a[1]))); break; case 11: motdChanged((*reinterpret_cast< QString(*)>(_a[1]))); break; case 12: gameLaunched(); break; case 13: narrationChanged((*reinterpret_cast< QString(*)>(_a[1]))); break; case 14: mapChanged((*reinterpret_cast< MapPtr(*)>(_a[1]))); break; case 15: mapFlare((*reinterpret_cast< QPoint(*)>(_a[1])),(*reinterpret_cast< CLID(*)>(_a[2]))); break; case 16: scriptToGMMsg((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2]))); break; case 17: scriptToOwnerMsg((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2]))); break; case 18: scriptActionMsg((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2]))); break; case 19: scriptToPlayerMsg((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2]))); break; case 20: scriptMsg((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2]))); break; case 21: scriptError((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2]))); break; case 22: updateEntities((*reinterpret_cast< const QList<EntityInformations>(*)>(_a[1]))); break; case 23: updateEntity((*reinterpret_cast< const EntityInformations(*)>(_a[1]))); break; case 24: entityDeleted((*reinterpret_cast< const QString(*)>(_a[1]))); break; case 25: scriptReceived((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2]))); break; case 26: ressourcesUpdated((*reinterpret_cast< const QMap<QString,RSID>(*)>(_a[1]))); break; case 27: connectionEtablished(); break; case 28: connectionLost(); break; case 29: diceRolled((*reinterpret_cast< CLID(*)>(_a[1])),(*reinterpret_cast< quint16(*)>(_a[2])),(*reinterpret_cast< quint16(*)>(_a[3]))); break; case 30: sanctionned((*reinterpret_cast< CLID(*)>(_a[1])),(*reinterpret_cast< ENUM_TYPE(*)>(_a[2])),(*reinterpret_cast< QString(*)>(_a[3]))); break; case 31: clientJoined((*reinterpret_cast< CLID(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2]))); break; case 32: clientLeft((*reinterpret_cast< CLID(*)>(_a[1]))); break; case 33: playSound((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2]))); break; case 34: syncLibs((*reinterpret_cast< QList<SoundLibInformations>(*)>(_a[1]))); break; case 35: syncLanguagesList((*reinterpret_cast< QList<QPair<QString,QString> >(*)>(_a[1]))); break; case 36: syncDictionariesList((*reinterpret_cast< QStringList(*)>(_a[1]))); break; case 37: syncScriptList((*reinterpret_cast< QStringList(*)>(_a[1]))); break; case 38: updateCharacterList((*reinterpret_cast< const QStringList(*)>(_a[1]))); break; case 39: send((*reinterpret_cast< Packet*(*)>(_a[1])),(*reinterpret_cast< bool(*)>(_a[2]))); break; case 40: send((*reinterpret_cast< Packet*(*)>(_a[1]))); break; case 41: send((*reinterpret_cast< Packet(*)>(_a[1]))); break; case 42: send((*reinterpret_cast< qint32(*)>(_a[1])),(*reinterpret_cast< const QByteArray(*)>(_a[2]))); break; case 43: ping(); break; case 44: { qint32 _r = getPing(); if (_a[0]) *reinterpret_cast< qint32*>(_a[0]) = _r; } break; case 45: { QString _r = serverIP(); if (_a[0]) *reinterpret_cast< QString*>(_a[0]) = _r; } break; case 46: { quint16 _r = serverPort(); if (_a[0]) *reinterpret_cast< quint16*>(_a[0]) = _r; } break; case 47: flush(); break; case 48: connection(); break; case 49: disconnection(); break; case 50: { bool _r = setServer((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< quint16(*)>(_a[2]))); if (_a[0]) *reinterpret_cast< bool*>(_a[0]) = _r; } break; case 51: connected(); break; case 52: disconnected(); break; case 53: dataReceived(); break; case 54: socketError((*reinterpret_cast< QAbstractSocket::SocketError(*)>(_a[1]))); break; case 55: operatePacket((*reinterpret_cast< Packet*(*)>(_a[1]))); break; default: ; } _id -= 56; } return _id; }
int ClientInterface::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QMainWindow::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: sendMessage(); break; case 1: chat((*reinterpret_cast< CLID(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2])),(*reinterpret_cast< QString(*)>(_a[3])),(*reinterpret_cast< ENUM_TYPE(*)>(_a[4]))); break; case 2: changeServerInformations((*reinterpret_cast< ServerInformations(*)>(_a[1]))); break; case 3: changeClientID((*reinterpret_cast< CLID(*)>(_a[1]))); break; case 4: changeClientNickname((*reinterpret_cast< CLID(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2]))); break; case 5: showError((*reinterpret_cast< ENUM_TYPE(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2]))); break; case 6: changeGameMaster((*reinterpret_cast< CLID(*)>(_a[1]))); break; case 7: clientVoted((*reinterpret_cast< CLID(*)>(_a[1])),(*reinterpret_cast< CLID(*)>(_a[2]))); break; case 8: connectionEtablished(); break; case 9: connectionLost(); break; case 10: diceRolled((*reinterpret_cast< CLID(*)>(_a[1])),(*reinterpret_cast< quint16(*)>(_a[2])),(*reinterpret_cast< quint16(*)>(_a[3]))); break; case 11: sanctionned((*reinterpret_cast< CLID(*)>(_a[1])),(*reinterpret_cast< ENUM_TYPE(*)>(_a[2])),(*reinterpret_cast< QString(*)>(_a[3]))); break; case 12: rollDice(); break; case 13: rollSpecialDice(); break; case 14: serverName((*reinterpret_cast< QString(*)>(_a[1]))); break; case 15: motdChanged((*reinterpret_cast< QString(*)>(_a[1]))); break; case 16: gameLaunched(); break; case 17: setTitle(); break; case 18: playSound((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2]))); break; case 19: updatePlayerList(); break; case 20: clientJoined((*reinterpret_cast< CLID(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2]))); break; case 21: clientLeft((*reinterpret_cast< CLID(*)>(_a[1]))); break; case 22: updateGMLabel(); break; case 23: updateGMPanel(); break; case 24: { bool _r = addLanguage(); if (_a[0]) *reinterpret_cast< bool*>(_a[0]) = _r; } break; case 25: { bool _r = addLanguage((*reinterpret_cast< const QString(*)>(_a[1])),(*reinterpret_cast< const QString(*)>(_a[2]))); if (_a[0]) *reinterpret_cast< bool*>(_a[0]) = _r; } break; case 26: languageListMenu((*reinterpret_cast< const QPoint(*)>(_a[1]))); break; case 27: { bool _r = removeLanguage((*reinterpret_cast< const QString(*)>(_a[1]))); if (_a[0]) *reinterpret_cast< bool*>(_a[0]) = _r; } break; case 28: removeLanguageMenu(); break; case 29: importLanguageList(); break; case 30: sendLanguageList(); break; case 31: { CLID _r = CLIDFromString((*reinterpret_cast< const QString(*)>(_a[1]))); if (_a[0]) *reinterpret_cast< CLID*>(_a[0]) = _r; } break; case 32: switchConnectionState(); break; case 33: openSettings(); break; case 34: openSoundsGUI(); break; case 35: aboutUs(); break; case 36: aboutServer(); break; case 37: openMapEditor(); break; case 38: clearMapEditor(); break; case 39: mapFlare(); break; case 40: resetData(); break; case 41: setCSS((*reinterpret_cast< const QString(*)>(_a[1]))); break; case 42: setCSS(); break; case 43: setInterface((*reinterpret_cast< const QString(*)>(_a[1]))); break; case 44: setInterface(); break; case 45: playerListMenu((*reinterpret_cast< const QPoint(*)>(_a[1]))); break; case 46: actionKick(); break; case 47: actionBan(); break; case 48: actionVoteGM(); break; case 49: actionChangeGM(); break; case 50: refresh(); break; case 51: textChanged(); break; case 52: narrationChanged((*reinterpret_cast< QString(*)>(_a[1]))); break; case 53: syncSoundLibs((*reinterpret_cast< QList<SoundLibInformations>(*)>(_a[1]))); break; case 54: syncLanguagesList((*reinterpret_cast< QList<QPair<QString,QString> >(*)>(_a[1]))); break; case 55: syncDictionariesList((*reinterpret_cast< QStringList(*)>(_a[1]))); break; case 56: requestScriptDownload((*reinterpret_cast< QString(*)>(_a[1]))); break; case 57: sendScriptToServer((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2]))); break; case 58: deleteScript((*reinterpret_cast< QString(*)>(_a[1]))); break; case 59: renameScript((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2]))); break; case 60: makeEntity((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2]))); break; case 61: deleteEntity((*reinterpret_cast< const QString(*)>(_a[1]))); break; case 62: injectCode((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2]))); break; case 63: scriptToGMMsg((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2]))); break; case 64: scriptToOwnerMsg((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2]))); break; case 65: scriptActionMsg((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2]))); break; case 66: scriptToPlayerMsg((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2]))); break; case 67: scriptMsg((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2]))); break; case 68: scriptError((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2]))); break; case 69: sendMapToServer((*reinterpret_cast< const MapInformations*const(*)>(_a[1])),(*reinterpret_cast< const QMap<QString,RSID>(*)>(_a[2]))); break; case 70: addDictionnary(); break; case 71: saveGame(); break; case 72: loadGame(); break; case 73: VOIPRemoveClient(); break; case 74: VOIPAddClient(); break; case 75: VOIPClientVolume(); break; case 76: dataPerSecond((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2]))); break; default: ; } _id -= 77; } return _id; }
int numFilesToDisplay(int argc, char **argv) { register int numsg=0, i; struct stat motdstat; messageptr newmsg, currentmsg = msgslist; /* i starts at 1 since argv[0] is the program name*/ for(i=1; i<argc; i++) { stat(argv[i], &motdstat); if(motdstat.st_mode & S_IFDIR) /* it's a directory */ { DIR *dir; struct dirent *dp; char name[BUFSIZ]; if ((dir = opendir(argv[i]))) { while (dp = readdir(dir)) { if (dp->d_ino == 0) continue; if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, "..")) continue; strcpy(name, argv[i]); if (name[strlen(name) - 1] != '/') strcat(name, "/"); strcat(name, dp->d_name); if (access(name, 0) < 0) continue; if(motdChanged(name, timeStamp) || app_res.always) { newmsg = newMessage(name); if (!currentmsg) /* first in list */ msgslist = newmsg; else currentmsg->next = newmsg; currentmsg = newmsg; numsg++; } /*if motdchanged*/ } /*while*/ closedir(dir); } /*if opendir*/ } else if(motdChanged(argv[i], timeStamp) || app_res.always) { newmsg = newMessage(argv[i]); if (!currentmsg) /* first in list */ msgslist = newmsg; else currentmsg->next = newmsg; currentmsg = newmsg; numsg++; } } if((numsg || app_res.paranoid || app_res.always) && app_res.warnfile) { newmsg = newMessage(app_res.warnfile); newmsg->next = msgslist; msgslist = newmsg; numsg++; } /*if*/ return numsg; }/* numFilesToDisplay*/