mirror of
https://github.com/mumble-voip/mumble.git
synced 2025-10-26 11:19:16 +00:00
Indenting
git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@1221 05730e5d-ab1b-0410-a4ac-84af385074fa
This commit is contained in:
parent
11eea44343
commit
00fa259e2a
@ -517,7 +517,7 @@ void AudioInput::encodeAudioFrame() {
|
||||
dPeakMic = -96.0f;
|
||||
|
||||
max = 1;
|
||||
for(i=0;i<iFrameSize;i++)
|
||||
for (i=0;i<iFrameSize;i++)
|
||||
max = static_cast<short>(abs(psMic[i]) > max ? abs(psMic[i]) : max);
|
||||
dMaxMic = max;
|
||||
|
||||
|
||||
@ -318,7 +318,7 @@ float AudioOutput::calcGain(float dotproduct, float distance) {
|
||||
|
||||
void AudioOutput::wipe() {
|
||||
foreach(AudioOutputPlayer *aop, qmOutputs)
|
||||
removeBuffer(aop);
|
||||
removeBuffer(aop);
|
||||
}
|
||||
|
||||
const float *AudioOutput::getSpeakerPos(unsigned int &speakers) {
|
||||
@ -366,7 +366,7 @@ void AudioOutput::removeBuffer(const ClientPlayer *player) {
|
||||
void AudioOutput::removeBuffer(AudioOutputPlayer *aop) {
|
||||
QWriteLocker locker(&qrwlOutputs);
|
||||
QMultiHash<const ClientPlayer *, AudioOutputPlayer *>::iterator i;
|
||||
for(i=qmOutputs.begin(); i != qmOutputs.end(); ++i) {
|
||||
for (i=qmOutputs.begin(); i != qmOutputs.end(); ++i) {
|
||||
if (i.value() == aop) {
|
||||
qmOutputs.erase(i);
|
||||
delete aop;
|
||||
|
||||
@ -303,16 +303,15 @@ void ConnectDialog::on_qpbAdd_clicked() {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
qlwServers->setCurrentIndex(QModelIndex());
|
||||
|
||||
|
||||
QString host, user, pw;
|
||||
unsigned short port = 64738;
|
||||
|
||||
|
||||
if (g.sh && g.sh->isRunning()) {
|
||||
g.sh->getConnectionInfo(host, port, user, pw);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
user = g.s.qsUsername;
|
||||
pw = QString();
|
||||
host = QLatin1String("host");
|
||||
|
||||
@ -153,8 +153,8 @@ GlobalShortcutConfig::GlobalShortcutConfig(Settings &st) : ConfigWidget(st) {
|
||||
|
||||
qcb->setToolTip(tr("Suppress keys from other applications"));
|
||||
qcb->setWhatsThis(tr("<b>This hides the button presses from other applications.</b><br />"
|
||||
"Enabling this will hide the button (or the last button of a multi-button combo) "
|
||||
"from other applications. Note that not all buttons can be suppressed."));
|
||||
"Enabling this will hide the button (or the last button of a multi-button combo) "
|
||||
"from other applications. Note that not all buttons can be suppressed."));
|
||||
qcb->setVisible(canSuppress);
|
||||
qhSuppress[gs]=qcb;
|
||||
|
||||
|
||||
@ -88,7 +88,7 @@ LRESULT CALLBACK GlobalShortcutWin::HookKeyboard(int nCode, WPARAM wParam, LPARA
|
||||
QList<QVariant> ql;
|
||||
ql << static_cast<unsigned int>((key->scanCode << 8) | 0x4);
|
||||
ql << QVariant(QUuid(GUID_SysKeyboard));
|
||||
if (gsw->handleButton(ql, ! (key->flags & LLKHF_UP)))
|
||||
if (gsw->handleButton(ql, !(key->flags & LLKHF_UP)))
|
||||
return 1;
|
||||
}
|
||||
return CallNextHookEx(gsw->hhKeyboard, nCode, wParam, lParam);
|
||||
|
||||
@ -61,7 +61,7 @@ LookConfig::LookConfig(Settings &st) : ConfigWidget(st) {
|
||||
qcbExpand->addItem(tr("None"), Settings::NoChannels);
|
||||
qcbExpand->addItem(tr("Only with players"), Settings::ChannelsWithPlayers);
|
||||
qcbExpand->addItem(tr("All"), Settings::AllChannels);
|
||||
|
||||
|
||||
qcbChannelDrag->insertItem(Settings::Ask, tr("Ask"), Settings::Ask);
|
||||
qcbChannelDrag->insertItem(Settings::DoNothing, tr("Do Nothing"), Settings::DoNothing);
|
||||
qcbChannelDrag->insertItem(Settings::Move, tr("Move"), Settings::Move);
|
||||
|
||||
@ -463,7 +463,7 @@ void PlayerModel::recursiveClone(const ModelItem *old, ModelItem *item, QModelIn
|
||||
|
||||
beginInsertRows(index(item), 0, old->qlChildren.count());
|
||||
|
||||
for(int i=0;i<old->qlChildren.count();++i) {
|
||||
for (int i=0;i<old->qlChildren.count();++i) {
|
||||
ModelItem *o = old->qlChildren.at(i);
|
||||
ModelItem *mi = new ModelItem(o);
|
||||
mi->parent = item;
|
||||
@ -478,7 +478,7 @@ void PlayerModel::recursiveClone(const ModelItem *old, ModelItem *item, QModelIn
|
||||
|
||||
endInsertRows();
|
||||
|
||||
for(int i=0;i<old->qlChildren.count();++i)
|
||||
for (int i=0;i<old->qlChildren.count();++i)
|
||||
recursiveClone(old->qlChildren.at(i), item->qlChildren.at(i), from, to);
|
||||
}
|
||||
|
||||
@ -970,7 +970,7 @@ bool PlayerModel::dropMimeData(const QMimeData *md, Qt::DropAction, int, int, co
|
||||
g.sh->sendMessage(&mpm);
|
||||
} else {
|
||||
int ret;
|
||||
switch(g.s.ceChannelDrag){
|
||||
switch (g.s.ceChannelDrag) {
|
||||
case Settings::Ask:
|
||||
ret=QMessageBox::question(g.mw, tr("Mumble"), tr("Are you sure you want to drag this channel?"), QMessageBox::Yes, QMessageBox::No);
|
||||
|
||||
|
||||
@ -45,7 +45,7 @@ static FILE *fConsole = NULL;
|
||||
static OSErr urlCallback(const AppleEvent *ae, AppleEvent *, long) {
|
||||
OSErr err;
|
||||
DescType type;
|
||||
Size dataSize, size;
|
||||
Size dataSize, size;
|
||||
static char url[1024];
|
||||
|
||||
err = AESizeOfParam(ae, keyDirectObject, &type, &dataSize);
|
||||
@ -56,7 +56,7 @@ static OSErr urlCallback(const AppleEvent *ae, AppleEvent *, long) {
|
||||
if (dataSize > 1023)
|
||||
dataSize = 1023;
|
||||
|
||||
err = AEGetParamPtr(ae, keyDirectObject, typeChar, &type, url, dataSize, &size);
|
||||
err = AEGetParamPtr(ae, keyDirectObject, typeChar, &type, url, dataSize, &size);
|
||||
if (err != noErr)
|
||||
return err;
|
||||
|
||||
@ -89,7 +89,7 @@ static void mumbleMessageOutput(QtMsgType type, const char *msg) {
|
||||
c='X';
|
||||
}
|
||||
|
||||
#define LOG(f, msg) fprintf(f, "<%c>%s %s\n", c, \
|
||||
#define LOG(f, msg) fprintf(f, "<%c>%s %s\n", c, \
|
||||
qPrintable(QDateTime::currentDateTime().toString(QLatin1String("yyyy-MM-dd hh:mm:ss.zzz"))), msg)
|
||||
|
||||
LOG(stderr, msg);
|
||||
|
||||
@ -161,7 +161,7 @@ void MetaParams::read(QString fname) {
|
||||
|
||||
QString qsSSLCert = qs.value("sslCert").toString();
|
||||
QString qsSSLKey = qs.value("sslKey").toString();
|
||||
|
||||
|
||||
qbaPassPhrase = qs.value("sslPassPhrase").toByteArray();
|
||||
|
||||
QByteArray crt, key;
|
||||
|
||||
@ -3,134 +3,131 @@
|
||||
|
||||
#include <Murmur.h>
|
||||
|
||||
namespace Murmur
|
||||
{
|
||||
namespace Murmur {
|
||||
|
||||
class ServerI : virtual public Server
|
||||
{
|
||||
public:
|
||||
class ServerI : virtual public Server {
|
||||
public:
|
||||
|
||||
virtual bool isRunning(const Ice::Current&);
|
||||
virtual bool isRunning(const Ice::Current&);
|
||||
|
||||
virtual void start(const Ice::Current&);
|
||||
virtual void start(const Ice::Current&);
|
||||
|
||||
virtual void stop(const Ice::Current&);
|
||||
virtual void stop(const Ice::Current&);
|
||||
|
||||
virtual void _cpp_delete(const Ice::Current&);
|
||||
virtual void _cpp_delete(const Ice::Current&);
|
||||
|
||||
virtual ::Ice::Int id(const Ice::Current&);
|
||||
virtual ::Ice::Int id(const Ice::Current&);
|
||||
|
||||
virtual ::std::string getConf(const ::std::string&,
|
||||
const Ice::Current&);
|
||||
virtual ::std::string getConf(const ::std::string&,
|
||||
const Ice::Current&);
|
||||
|
||||
virtual ::Murmur::ConfigMap getAllConf(const Ice::Current&);
|
||||
virtual ::Murmur::ConfigMap getAllConf(const Ice::Current&);
|
||||
|
||||
virtual void setConf(const ::std::string&,
|
||||
const ::std::string&,
|
||||
const Ice::Current&);
|
||||
virtual void setConf(const ::std::string&,
|
||||
const ::std::string&,
|
||||
const Ice::Current&);
|
||||
|
||||
virtual void setSuperuserPasssword(const ::std::string&,
|
||||
const Ice::Current&);
|
||||
virtual void setSuperuserPasssword(const ::std::string&,
|
||||
const Ice::Current&);
|
||||
|
||||
virtual ::Murmur::LogList getLog(::Ice::Int,
|
||||
::Ice::Int,
|
||||
const Ice::Current&);
|
||||
virtual ::Murmur::LogList getLog(::Ice::Int,
|
||||
::Ice::Int,
|
||||
const Ice::Current&);
|
||||
|
||||
virtual ::Murmur::PlayerMap getPlayers(const Ice::Current&);
|
||||
virtual ::Murmur::PlayerMap getPlayers(const Ice::Current&);
|
||||
|
||||
virtual ::Murmur::ChannelMap getChannels(const Ice::Current&);
|
||||
virtual ::Murmur::ChannelMap getChannels(const Ice::Current&);
|
||||
|
||||
virtual ::Murmur::TreePtr getTree(const Ice::Current&);
|
||||
virtual ::Murmur::TreePtr getTree(const Ice::Current&);
|
||||
|
||||
virtual ::Murmur::BanList getBans(const Ice::Current&);
|
||||
virtual ::Murmur::BanList getBans(const Ice::Current&);
|
||||
|
||||
virtual void setBans(const ::Murmur::BanList&,
|
||||
const Ice::Current&);
|
||||
virtual void setBans(const ::Murmur::BanList&,
|
||||
const Ice::Current&);
|
||||
|
||||
virtual void kickPlayer(::Ice::Int,
|
||||
const ::std::string&,
|
||||
const Ice::Current&);
|
||||
virtual void kickPlayer(::Ice::Int,
|
||||
const ::std::string&,
|
||||
const Ice::Current&);
|
||||
|
||||
virtual ::Murmur::Player getState(::Ice::Int,
|
||||
const Ice::Current&);
|
||||
virtual ::Murmur::Player getState(::Ice::Int,
|
||||
const Ice::Current&);
|
||||
|
||||
virtual void setState(const ::Murmur::Player&,
|
||||
const Ice::Current&);
|
||||
virtual void setState(const ::Murmur::Player&,
|
||||
const Ice::Current&);
|
||||
|
||||
virtual ::Murmur::Channel getChannelState(::Ice::Int,
|
||||
const Ice::Current&);
|
||||
virtual ::Murmur::Channel getChannelState(::Ice::Int,
|
||||
const Ice::Current&);
|
||||
|
||||
virtual void setChannelState(const ::Murmur::Channel&,
|
||||
const Ice::Current&);
|
||||
virtual void setChannelState(const ::Murmur::Channel&,
|
||||
const Ice::Current&);
|
||||
|
||||
virtual void removeChannel(::Ice::Int,
|
||||
const Ice::Current&);
|
||||
virtual void removeChannel(::Ice::Int,
|
||||
const Ice::Current&);
|
||||
|
||||
virtual ::Ice::Int addChannel(const ::std::string&,
|
||||
::Ice::Int,
|
||||
const Ice::Current&);
|
||||
virtual ::Ice::Int addChannel(const ::std::string&,
|
||||
::Ice::Int,
|
||||
const Ice::Current&);
|
||||
|
||||
virtual void getACL(::Ice::Int,
|
||||
::Murmur::ACLList&,
|
||||
::Murmur::GroupList&,
|
||||
bool&,
|
||||
const Ice::Current&);
|
||||
virtual void getACL(::Ice::Int,
|
||||
::Murmur::ACLList&,
|
||||
::Murmur::GroupList&,
|
||||
bool&,
|
||||
const Ice::Current&);
|
||||
|
||||
virtual void setACL(::Ice::Int,
|
||||
const ::Murmur::ACLList&,
|
||||
const ::Murmur::GroupList&,
|
||||
bool,
|
||||
const Ice::Current&);
|
||||
virtual void setACL(::Ice::Int,
|
||||
const ::Murmur::ACLList&,
|
||||
const ::Murmur::GroupList&,
|
||||
bool,
|
||||
const Ice::Current&);
|
||||
|
||||
virtual ::Murmur::NameMap getPlayerNames(const ::Murmur::IdList&,
|
||||
const Ice::Current&);
|
||||
virtual ::Murmur::NameMap getPlayerNames(const ::Murmur::IdList&,
|
||||
const Ice::Current&);
|
||||
|
||||
virtual ::Murmur::IdMap getPlayerIds(const ::Murmur::NameList&,
|
||||
const Ice::Current&);
|
||||
virtual ::Murmur::IdMap getPlayerIds(const ::Murmur::NameList&,
|
||||
const Ice::Current&);
|
||||
|
||||
virtual ::Ice::Int registerPlayer(const ::std::string&,
|
||||
const Ice::Current&);
|
||||
virtual ::Ice::Int registerPlayer(const ::std::string&,
|
||||
const Ice::Current&);
|
||||
|
||||
virtual void unregisterPlayer(::Ice::Int,
|
||||
const Ice::Current&);
|
||||
virtual void unregisterPlayer(::Ice::Int,
|
||||
const Ice::Current&);
|
||||
|
||||
virtual void updateregistration(const ::Murmur::RegisteredPlayer&,
|
||||
const Ice::Current&);
|
||||
virtual void updateregistration(const ::Murmur::RegisteredPlayer&,
|
||||
const Ice::Current&);
|
||||
|
||||
virtual ::Murmur::RegisteredPlayer getRegistration(::Ice::Int,
|
||||
const Ice::Current&);
|
||||
virtual ::Murmur::RegisteredPlayer getRegistration(::Ice::Int,
|
||||
const Ice::Current&);
|
||||
|
||||
virtual ::Murmur::RegisteredPlayerList getRegisteredPlayers(const ::std::string&,
|
||||
const Ice::Current&);
|
||||
virtual ::Murmur::RegisteredPlayerList getRegisteredPlayers(const ::std::string&,
|
||||
const Ice::Current&);
|
||||
|
||||
virtual int verifyPassword(const ::std::string&,
|
||||
const ::std::string&,
|
||||
const Ice::Current&);
|
||||
virtual int verifyPassword(const ::std::string&,
|
||||
const ::std::string&,
|
||||
const Ice::Current&);
|
||||
|
||||
virtual ::Murmur::Texture getTexture(::Ice::Int,
|
||||
const Ice::Current&);
|
||||
virtual ::Murmur::Texture getTexture(::Ice::Int,
|
||||
const Ice::Current&);
|
||||
|
||||
virtual void setTexture(::Ice::Int,
|
||||
const ::Murmur::Texture&,
|
||||
const Ice::Current&);
|
||||
|
||||
virtual void ice_ping(const Ice::Current&) const;
|
||||
virtual void setTexture(::Ice::Int,
|
||||
const ::Murmur::Texture&,
|
||||
const Ice::Current&);
|
||||
|
||||
virtual void ice_ping(const Ice::Current&) const;
|
||||
};
|
||||
|
||||
class MetaI : virtual public Meta
|
||||
{
|
||||
public:
|
||||
class MetaI : virtual public Meta {
|
||||
public:
|
||||
|
||||
virtual ::Murmur::ServerPrx getServer(::Ice::Int,
|
||||
const Ice::Current&);
|
||||
virtual ::Murmur::ServerPrx getServer(::Ice::Int,
|
||||
const Ice::Current&);
|
||||
|
||||
virtual ::Murmur::ServerPrx newServer(const Ice::Current&);
|
||||
virtual ::Murmur::ServerPrx newServer(const Ice::Current&);
|
||||
|
||||
virtual ::Murmur::ServerList getBootedServers(const Ice::Current&);
|
||||
virtual ::Murmur::ServerList getBootedServers(const Ice::Current&);
|
||||
|
||||
virtual ::Murmur::ServerList getAllServers(const Ice::Current&);
|
||||
virtual ::Murmur::ServerList getAllServers(const Ice::Current&);
|
||||
|
||||
virtual ::Murmur::ConfigMap getDefaultConf(const Ice::Current&);
|
||||
virtual ::Murmur::ConfigMap getDefaultConf(const Ice::Current&);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -534,7 +534,7 @@ void ServerI::setACL(int channelid, const ::Murmur::ACLList& acls, const ::Murmu
|
||||
delete g;
|
||||
}
|
||||
foreach(acl, channel->qlACL)
|
||||
delete acl;
|
||||
delete acl;
|
||||
|
||||
channel->qhGroups.clear();
|
||||
channel->qlACL.clear();
|
||||
@ -648,7 +648,7 @@ void ServerI::updateregistration(const ::Murmur::RegisteredPlayer& registration,
|
||||
|
||||
const QMap<int, QPair<QString, QString> > l = server->getRegisteredPlayers(QString::fromStdString(filter));
|
||||
QMap<int, QPair<QString, QString > >::const_iterator i;
|
||||
for(i = l.constBegin(); i != l.constEnd(); ++i) {
|
||||
for (i = l.constBegin(); i != l.constEnd(); ++i) {
|
||||
reg.playerid = i.key();
|
||||
reg.name = i.value().first.toStdString();
|
||||
reg.email = i.value().second.toStdString();
|
||||
@ -671,7 +671,7 @@ int ServerI::verifyPassword(const string &name, const string& pw, const Ice::Cur
|
||||
::Murmur::Texture tex;
|
||||
tex.resize(qba.size());
|
||||
const char *ptr = qba.constData();
|
||||
for(int i=0;i<qba.size();++i)
|
||||
for (int i=0;i<qba.size();++i)
|
||||
tex[i] = ptr[i];
|
||||
|
||||
return tex;
|
||||
@ -681,7 +681,7 @@ void ServerI::setTexture(int playerid, const ::Murmur::Texture& tex, const Ice::
|
||||
NEED_SERVER;
|
||||
QByteArray qba(tex.size(), 0);
|
||||
char *ptr = qba.data();
|
||||
for(unsigned int i=0;i<tex.size();++i)
|
||||
for (unsigned int i=0;i<tex.size();++i)
|
||||
ptr[i] = tex[i];
|
||||
if (! server->setTexture(playerid, qba))
|
||||
throw InvalidPlayerException();
|
||||
|
||||
@ -39,16 +39,16 @@
|
||||
#define ICE_QEVENT (QEvent::User + 959)
|
||||
|
||||
class MurmurIce : public QObject {
|
||||
friend class MurmurLocker;
|
||||
Q_OBJECT;
|
||||
protected:
|
||||
int count;
|
||||
QMutex qmEvent;
|
||||
QWaitCondition qwcEvent;
|
||||
Ice::CommunicatorPtr communicator;
|
||||
void customEvent(QEvent *evt);
|
||||
public:
|
||||
MurmurIce();
|
||||
~MurmurIce();
|
||||
friend class MurmurLocker;
|
||||
Q_OBJECT;
|
||||
protected:
|
||||
int count;
|
||||
QMutex qmEvent;
|
||||
QWaitCondition qwcEvent;
|
||||
Ice::CommunicatorPtr communicator;
|
||||
void customEvent(QEvent *evt);
|
||||
public:
|
||||
MurmurIce();
|
||||
~MurmurIce();
|
||||
};
|
||||
#endif
|
||||
|
||||
@ -264,9 +264,9 @@ int BandwidthRecord::bandwidth() const {
|
||||
int todo = N_BANDWIDTH_SLOTS - sincelast;
|
||||
if (todo < 0)
|
||||
return 0;
|
||||
|
||||
|
||||
int sum = 0;
|
||||
for(int i=0;i<todo;i++)
|
||||
for (int i=0;i<todo;i++)
|
||||
sum += a_iBW[(iRecNum+N_BANDWIDTH_SLOTS - i) % N_BANDWIDTH_SLOTS];
|
||||
return (sum*50)/sincelast;
|
||||
}
|
||||
|
||||
@ -96,7 +96,7 @@ class User : public Connection, public Player {
|
||||
|
||||
class DBus;
|
||||
namespace Murmur {
|
||||
class ServerI;
|
||||
class ServerI;
|
||||
};
|
||||
|
||||
class Server : public QThread, public MessageHandler {
|
||||
|
||||
@ -376,7 +376,7 @@ int main(int argc, char **argv) {
|
||||
#endif
|
||||
|
||||
meta->bootAll();
|
||||
|
||||
|
||||
QList<QSslCertificate> certs = QSslSocket::systemCaCertificates();
|
||||
foreach(const QSslCertificate &c, certs) {
|
||||
qWarning("Cert %s", qPrintable(c.subjectInfo(QSslCertificate::Organization)));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user