29
|
1 |
/*
|
|
2 |
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef BTQTCONSTANTS_H
|
|
19 |
#define BTQTCONSTANTS_H
|
|
20 |
|
|
21 |
#include <btengconstants.h>
|
|
22 |
|
|
23 |
|
31
|
24 |
// RSSI value range: -127dB ~ +20dB
|
|
25 |
const int RssiMinRange = -127;
|
|
26 |
|
|
27 |
//const int RssiMaxRange = 20; // maybe useful in the future
|
|
28 |
|
|
29 |
const int RssiMediumStrength = -75;
|
|
30 |
|
|
31 |
const int RssiHighStrength = -46;
|
|
32 |
|
|
33 |
const int RssiInvalid = RssiMinRange - 1;
|
|
34 |
|
29
|
35 |
enum VisibilityMode {
|
|
36 |
BtHidden = 0x10, // using a different number space than TBTVisibilityMode
|
|
37 |
BtVisible,
|
|
38 |
BtTemporary,
|
|
39 |
BtUnknown
|
|
40 |
|
|
41 |
};
|
|
42 |
|
|
43 |
// used for mapping between UI row and VisibilityMode item
|
|
44 |
enum VisibilityModeUiRowMapping {
|
|
45 |
UiRowBtHidden = 0,
|
|
46 |
UiRowBtVisible,
|
|
47 |
UiRowBtTemporary
|
|
48 |
};
|
|
49 |
|
|
50 |
inline VisibilityMode QtVisibilityMode(TBTVisibilityMode btEngMode)
|
|
51 |
{
|
|
52 |
VisibilityMode mode;
|
|
53 |
switch(btEngMode) {
|
|
54 |
case EBTVisibilityModeHidden:
|
|
55 |
mode = BtHidden;
|
|
56 |
break;
|
|
57 |
case EBTVisibilityModeGeneral:
|
|
58 |
mode = BtVisible;
|
|
59 |
break;
|
|
60 |
case EBTVisibilityModeTemporary:
|
|
61 |
mode = BtTemporary;
|
|
62 |
break;
|
|
63 |
default:
|
|
64 |
mode = BtUnknown;
|
|
65 |
}
|
|
66 |
return mode;
|
|
67 |
}
|
|
68 |
|
|
69 |
inline TBTVisibilityMode BtEngVisibilityMode(VisibilityMode btQtMode)
|
|
70 |
{
|
|
71 |
TBTVisibilityMode mode;
|
|
72 |
switch(btQtMode) {
|
|
73 |
case BtHidden:
|
|
74 |
mode = EBTVisibilityModeHidden;
|
|
75 |
break;
|
|
76 |
case BtVisible:
|
|
77 |
mode = EBTVisibilityModeGeneral;
|
|
78 |
break;
|
|
79 |
case BtTemporary:
|
|
80 |
mode = EBTVisibilityModeTemporary;
|
|
81 |
break;
|
|
82 |
default:
|
|
83 |
mode = (TBTVisibilityMode)KErrUnknown;
|
|
84 |
}
|
|
85 |
return mode;
|
|
86 |
}
|
|
87 |
|
|
88 |
|
|
89 |
#endif // BTQTCONSTANTS_H
|