author | zecke <zecke> | 2002-06-18 16:41:18 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-06-18 16:41:18 (UTC) |
commit | 46543a909fc88017998ede20ed25cd85992938e4 (patch) (side-by-side diff) | |
tree | 1afafb1b96dadd2d9d320ae81820578245f74f98 /noncore/net/opietooth/blue-pin/main.cc | |
parent | eacd774d0bf520d17dac5eea092197174b43c9f9 (diff) | |
download | opie-46543a909fc88017998ede20ed25cd85992938e4.zip opie-46543a909fc88017998ede20ed25cd85992938e4.tar.gz opie-46543a909fc88017998ede20ed25cd85992938e4.tar.bz2 |
add the inital version of blue-pin for Opie
Diffstat (limited to 'noncore/net/opietooth/blue-pin/main.cc') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/opietooth/blue-pin/main.cc | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/noncore/net/opietooth/blue-pin/main.cc b/noncore/net/opietooth/blue-pin/main.cc new file mode 100644 index 0000000..1b7daec --- a/dev/null +++ b/noncore/net/opietooth/blue-pin/main.cc @@ -0,0 +1,39 @@ +#include <stdio.h> +#include <stdlib.h> + + +#include <qpe/qpeapplication.h> +#include <qpe/config.h> + +#include "pindlg.h" + + +int main( int argc, char* argv[] ) +{ + if (argc < 2 ) { + printf("ERR\n"); + exit(0); + } + QCString dir(argv[1] ); + QCString bdaddr( argv[2] ); + QCString name; + if ( argc > 3 ) { + name = argv[3]; + } + QPEApplication a(argc, argv ); + QString status; + if (dir == "out" ) { + status = QObject::tr("Outgoing connection to "); + }else + status = QObject::tr("Incoming connection from "); + status += name; + status += "<br>"; + status += "[" + bdaddr + "]"; + OpieTooth::PinDlg dlg( status, bdaddr ); + if ( dlg.exec() ) { + printf("PIN:%s\n", dlg.pin().stripWhiteSpace().latin1() ); + }else + printf("ERR\n"); + return 0; +} + |