author | korovkin <korovkin> | 2006-04-15 16:03:19 (UTC) |
---|---|---|
committer | korovkin <korovkin> | 2006-04-15 16:03:19 (UTC) |
commit | 6d3a8eaf3b92f8eec9908eed91568342fac5de1d (patch) (unidiff) | |
tree | deb2f977342b99f72ddcbbaec4066c81278cd65f /noncore/net/opietooth/manager/bluebase.cpp | |
parent | a1bcbe41d45924713c4ead9b25ac5518473c9ca9 (diff) | |
download | opie-6d3a8eaf3b92f8eec9908eed91568342fac5de1d.zip opie-6d3a8eaf3b92f8eec9908eed91568342fac5de1d.tar.gz opie-6d3a8eaf3b92f8eec9908eed91568342fac5de1d.tar.bz2 |
Added default passkey writing to /etc/bluetooth/pin file.
Added encrypt default passkey in edit line button.
Diffstat (limited to 'noncore/net/opietooth/manager/bluebase.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/opietooth/manager/bluebase.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/noncore/net/opietooth/manager/bluebase.cpp b/noncore/net/opietooth/manager/bluebase.cpp index 9ec5bf8..924d191 100644 --- a/noncore/net/opietooth/manager/bluebase.cpp +++ b/noncore/net/opietooth/manager/bluebase.cpp | |||
@@ -55,2 +55,3 @@ using namespace Opie::Core; | |||
55 | #include <qlist.h> | 55 | #include <qlist.h> |
56 | #include <qfile.h> | ||
56 | 57 | ||
@@ -96,2 +97,3 @@ BlueBase::BlueBase( QWidget* parent, const char* name, WFlags fl ) | |||
96 | connect(runButton, SIGNAL(clicked()), this, SLOT(doForward())); | 97 | connect(runButton, SIGNAL(clicked()), this, SLOT(doForward())); |
98 | connect(encCheckBox, SIGNAL(toggled(bool)), this, SLOT(doEncrypt(bool))); | ||
97 | 99 | ||
@@ -132,2 +134,3 @@ BlueBase::BlueBase( QWidget* parent, const char* name, WFlags fl ) | |||
132 | serSpeed->setCurrentItem((sizeof(speeds) / sizeof(speeds[0])) - 1); | 134 | serSpeed->setCurrentItem((sizeof(speeds) / sizeof(speeds[0])) - 1); |
135 | encCheckBox->setChecked(true); | ||
133 | } | 136 | } |
@@ -175,3 +178,5 @@ void BlueBase::writeToHciConfig() | |||
175 | { | 178 | { |
179 | QFile pinFile("/etc/bluetooth/pin"); // /etc/bluetooth/pin file | ||
176 | owarn << "writeToHciConfig" << oendl; | 180 | owarn << "writeToHciConfig" << oendl; |
181 | //Write /etc/bluetooth/hcid.conf file | ||
177 | HciConfWrapper hciconf ( "/etc/bluetooth/hcid.conf" ); | 182 | HciConfWrapper hciconf ( "/etc/bluetooth/hcid.conf" ); |
@@ -185,2 +190,8 @@ void BlueBase::writeToHciConfig() | |||
185 | hciconf.save(); | 190 | hciconf.save(); |
191 | // Write /etc/bluetooth/pin (default PIN file) | ||
192 | pinFile.open(IO_WriteOnly | IO_Truncate); | ||
193 | pinFile.writeBlock(m_defaultPasskey, m_defaultPasskey.length()); | ||
194 | pinFile.writeBlock("\n", sizeof("\n")); | ||
195 | pinFile.flush(); | ||
196 | pinFile.close(); | ||
186 | } | 197 | } |
@@ -742,2 +753,11 @@ void BlueBase::forwardExit(Opie::Core::OProcess* proc) | |||
742 | 753 | ||
754 | /** | ||
755 | * Encrypt entered passkey | ||
756 | * doit - do encryption of the key | ||
757 | */ | ||
758 | void BlueBase::doEncrypt(bool doit) | ||
759 | { | ||
760 | passkeyLine->setEchoMode((doit)? QLineEdit::Password: QLineEdit::Normal); | ||
761 | } | ||
762 | |||
743 | //eof | 763 | //eof |