summaryrefslogtreecommitdiffstats
path: root/src/tdebluezauth/authorize.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tdebluezauth/authorize.cpp')
-rw-r--r--src/tdebluezauth/authorize.cpp52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/tdebluezauth/authorize.cpp b/src/tdebluezauth/authorize.cpp
new file mode 100644
index 0000000..26aa813
--- /dev/null
+++ b/src/tdebluezauth/authorize.cpp
@@ -0,0 +1,52 @@
+/*
+ *
+ * Authorization dialog for kbluetooth
+ *
+ * Copyright (C) 2006 Daniel Gollub <dgollub@suse.de>
+ *
+ *
+ * This file is part of kbluetooth.
+ *
+ * kbluetooth is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * libkbluetooth is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with libkbluetooth; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "authorize.h"
+#include "authdialog.h"
+
+AuthorizeDialog::AuthorizeDialog(const TQString &addr, const TQString &devName, const TQString &service) :
+ KDialogBase(NULL, "authrequest", true, "Bluetooth Authorization Request",
+ (Ok | Cancel), Ok, false,
+ KGuiItem(i18n("Accept"), "accept"),
+ KGuiItem(i18n("Reject"), "reject"))
+{
+ TQString action(i18n("wants to act as Input Device"));
+
+ if (!service.isEmpty())
+ action.append(" for " + service);
+
+ authDlg = new AuthDialog(this);
+ authDlg->messageLabel->setText(authDlg->messageLabel->text().arg(devName).arg(addr).arg(action));
+ connect(this, SIGNAL(okClicked()), SLOT(close()));
+
+ setMainWidget(authDlg);
+}
+
+AuthorizeDialog::~AuthorizeDialog()
+{
+ delete authDlg;
+}
+
+#include "authorize.moc"