rename CONTROL to CTRL

This commit is contained in:
arcan1s 2014-08-09 20:55:14 +04:00
parent 558a206a8d
commit 42194295cc
8 changed files with 25 additions and 25 deletions

View File

@ -141,7 +141,7 @@ bool MainWindow::forceStopHelper()
{
if (debug) qDebug() << "[MainWindow]" << "[forceStartHelper]";
QList<QVariant> responce = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CONTROL_PATH,
QList<QVariant> responce = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CTRL_PATH,
DBUS_HELPER_INTERFACE, QString("Close"),
QList<QVariant>(), true, debug);
@ -226,12 +226,12 @@ void MainWindow::connectToUnknownEssid(const QString passwd)
QList<QVariant> args;
args.append(profile);
args.append(settingsList);
sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CONTROL_PATH,
sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CTRL_PATH,
DBUS_HELPER_INTERFACE, QString("Create"),
args, true, debug);
args.clear();
args.append(profile);
sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CONTROL_PATH,
sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CTRL_PATH,
DBUS_HELPER_INTERFACE, QString("Start"),
args, true, debug);
status = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_LIB_PATH,
@ -373,7 +373,7 @@ void MainWindow::mainTabEnableProfile()
if (useHelper) {
QList<QVariant> args;
args.append(profile);
sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CONTROL_PATH,
sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CTRL_PATH,
DBUS_HELPER_INTERFACE, QString("Enable"),
args, true, debug);
current = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_LIB_PATH,
@ -404,7 +404,7 @@ void MainWindow::mainTabRemoveProfile()
if (useHelper) {
QList<QVariant> args;
args.append(profile);
status = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CONTROL_PATH,
status = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CTRL_PATH,
DBUS_HELPER_INTERFACE, QString("Remove"),
args, true, debug)[0].toBool();
}
@ -433,7 +433,7 @@ void MainWindow::mainTabRestartProfile()
if (useHelper) {
QList<QVariant> args;
args.append(profile);
sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CONTROL_PATH,
sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CTRL_PATH,
DBUS_HELPER_INTERFACE, QString("Restart"),
args, true, debug)[0].toBool();
status = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_LIB_PATH,
@ -468,7 +468,7 @@ void MainWindow::mainTabStartProfile()
if (useHelper) {
QList<QVariant> args;
args.append(profile);
sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CONTROL_PATH,
sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CTRL_PATH,
DBUS_HELPER_INTERFACE, QString("Start"),
args, true, debug);
current = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_LIB_PATH,
@ -856,7 +856,7 @@ void MainWindow::profileTabCreateProfile()
QList<QVariant> args;
args.append(profile);
args.append(settingsList);
status = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CONTROL_PATH,
status = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CTRL_PATH,
DBUS_HELPER_INTERFACE, QString("Create"),
args, true, debug)[0].toBool();
}
@ -956,7 +956,7 @@ void MainWindow::profileTabRemoveProfile()
if (useHelper) {
QList<QVariant> args;
args.append(profile);
status = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CONTROL_PATH,
status = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CTRL_PATH,
DBUS_HELPER_INTERFACE, QString("Remove"),
args, true, debug)[0].toBool();
}
@ -1071,7 +1071,7 @@ void MainWindow::wifiTabStart()
args, true, debug)[0].toString();
args.clear();
args.append(profileName);
sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CONTROL_PATH,
sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CTRL_PATH,
DBUS_HELPER_INTERFACE, QString("Start"),
args, true, debug);
current = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_LIB_PATH,

View File

@ -163,7 +163,7 @@ bool MainWindow::isHelperActive()
{
if (debug) qDebug() << "[MainWindow]" << "[isHelperActive]";
QList<QVariant> responce = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CONTROL_PATH,
QList<QVariant> responce = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CTRL_PATH,
DBUS_HELPER_INTERFACE, QString("Active"),
QList<QVariant>(), true, debug);
@ -698,7 +698,7 @@ void MainWindow::updateWifiTab()
ui->tabWidget->setDisabled(true);
QList<netctlWifiInfo> scanResults;
if (useHelper)
scanResults = parseOutputWifi(sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CONTROL_PATH,
scanResults = parseOutputWifi(sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CTRL_PATH,
DBUS_HELPER_INTERFACE, QString("WiFi"),
QList<QVariant>(), true, debug), debug);
else

View File

@ -134,7 +134,7 @@ QString infoMessage()
infoMessage += QString("\tDBUS_OBJECT_PATH=%1\n").arg(QString(DBUS_OBJECT_PATH));
infoMessage += QString("\tDBUS_HELPER_SERVICE=%1\n").arg(QString(DBUS_HELPER_SERVICE));
infoMessage += QString("\tDBUS_HELPER_INTERFACE=%1\n").arg(QString(DBUS_HELPER_INTERFACE));
infoMessage += QString("\tDBUS_CONTROL_PATH=%1\n").arg(QString(DBUS_CONTROL_PATH));
infoMessage += QString("\tDBUS_CTRL_PATH=%1\n").arg(QString(DBUS_CTRL_PATH));
infoMessage += QString("\tDBUS_LIB_PATH=%1\n").arg(QString(DBUS_LIB_PATH));
return infoMessage;

View File

@ -279,7 +279,7 @@ void NetctlAutoWindow::netctlAutoDisableAllProfiles()
ui->tableWidget->setDisabled(true);
bool status = false;
if (useHelper)
status = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CONTROL_PATH,
status = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CTRL_PATH,
DBUS_HELPER_INTERFACE, QString("autoDisableAll"),
QList<QVariant>(), true, debug)[0].toBool();
else
@ -305,7 +305,7 @@ void NetctlAutoWindow::netctlAutoEnableProfile()
if (useHelper) {
QList<QVariant> args;
args.append(profile);
status = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CONTROL_PATH,
status = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CTRL_PATH,
DBUS_HELPER_INTERFACE, QString("autoEnable"),
args, true, debug)[0].toBool();
}
@ -327,7 +327,7 @@ void NetctlAutoWindow::netctlAutoEnableAllProfiles()
ui->tableWidget->setDisabled(true);
bool status = false;
if (useHelper)
status = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CONTROL_PATH,
status = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CTRL_PATH,
DBUS_HELPER_INTERFACE, QString("autoEnableAll"),
QList<QVariant>(), true, debug)[0].toBool();
else
@ -353,7 +353,7 @@ void NetctlAutoWindow::netctlAutoStartProfile()
if (useHelper) {
QList<QVariant> args;
args.append(profile);
status = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CONTROL_PATH,
status = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CTRL_PATH,
DBUS_HELPER_INTERFACE, QString("autoStart"),
args, true, debug)[0].toBool();
}
@ -374,7 +374,7 @@ void NetctlAutoWindow::netctlAutoEnableService()
bool status = false;
if (useHelper)
status = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CONTROL_PATH,
status = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CTRL_PATH,
DBUS_HELPER_INTERFACE, QString("autoServiceEnable"),
QList<QVariant>(), true, debug)[0].toBool();
else
@ -394,7 +394,7 @@ void NetctlAutoWindow::netctlAutoRestartService()
bool status = false;
if (useHelper)
status = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CONTROL_PATH,
status = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CTRL_PATH,
DBUS_HELPER_INTERFACE, QString("autoServiceRestart"),
QList<QVariant>(), true, debug)[0].toBool();
else
@ -414,7 +414,7 @@ void NetctlAutoWindow::netctlAutoStartService()
bool status = false;
if (useHelper)
status = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CONTROL_PATH,
status = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CTRL_PATH,
DBUS_HELPER_INTERFACE, QString("autoServiceStart"),
QList<QVariant>(), true, debug)[0].toBool();
else

View File

@ -36,7 +36,7 @@ bool checkExistSession()
{
QDBusConnection bus = QDBusConnection::systemBus();
QDBusMessage request = QDBusMessage::createMethodCall(DBUS_HELPER_SERVICE,
DBUS_CONTROL_PATH,
DBUS_CTRL_PATH,
DBUS_HELPER_INTERFACE,
QString("Active"));
QDBusMessage response = bus.call(request);

View File

@ -93,7 +93,7 @@ QString infoMessage()
infoMessage += QString("\tDBUS_OBJECT_PATH=%1\n").arg(QString(DBUS_OBJECT_PATH));
infoMessage += QString("\tDBUS_HELPER_SERVICE=%1\n").arg(QString(DBUS_HELPER_SERVICE));
infoMessage += QString("\tDBUS_HELPER_INTERFACE=%1\n").arg(QString(DBUS_HELPER_INTERFACE));
infoMessage += QString("\tDBUS_CONTROL_PATH=%1\n").arg(QString(DBUS_CONTROL_PATH));
infoMessage += QString("\tDBUS_CTRL_PATH=%1\n").arg(QString(DBUS_CTRL_PATH));
infoMessage += QString("\tDBUS_LIB_PATH=%1\n").arg(QString(DBUS_LIB_PATH));
return infoMessage;

View File

@ -135,7 +135,7 @@ void NetctlHelper::createInterface()
if (debug) qDebug() << "[NetctlHelper]" << "[createInterface]" << ":" << bus.lastError().message();
return quitHelper();
}
if (!bus.registerObject(DBUS_CONTROL_PATH,
if (!bus.registerObject(DBUS_CTRL_PATH,
new ControlAdaptor(this, configuration),
QDBusConnection::ExportAllContents)) {
if (debug) qDebug() << "[NetctlHelper]" << "[createInterface]" << ":" << "Could not register control object";
@ -150,7 +150,7 @@ void NetctlHelper::deleteInterface()
if (debug) qDebug() << "[NetctlHelper]" << "[deleteInterface]";
QDBusConnection::systemBus().unregisterObject(DBUS_LIB_PATH);
QDBusConnection::systemBus().unregisterObject(DBUS_CONTROL_PATH);
QDBusConnection::systemBus().unregisterObject(DBUS_CTRL_PATH);
QDBusConnection::systemBus().unregisterService(DBUS_HELPER_SERVICE);
}

View File

@ -32,7 +32,7 @@
#define DBUS_OBJECT_PATH "/netctlgui"
#define DBUS_HELPER_SERVICE "org.netctlgui.helper"
#define DBUS_HELPER_INTERFACE "org.netctlgui.helper"
#define DBUS_CONTROL_PATH "/ctrl"
#define DBUS_CTRL_PATH "/ctrl"
#define DBUS_LIB_PATH "/netctl"
#endif /* VERSION_H */