blob: 1b7daec6101486a7087cd26dd84f49042ee5c211 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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;
}
|