|
1 /* |
|
2 * Copyright (c) 2006 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: Definitions for BTEng client-server interface. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef BTENGCLIENTSERVER_H |
|
21 #define BTENGCLIENTSERVER_H |
|
22 |
|
23 #include <btdevice.h> |
|
24 #include <bttypes.h> |
|
25 #include "btengconstants.h" |
|
26 |
|
27 /** BTEngServer process name */ |
|
28 _LIT( KBTEngServerName, "btengsrv" );// Temp "bteng" ); |
|
29 |
|
30 /** BTEng Uid3 for creating the server process */ |
|
31 const TUid KBTEngServerUid3 = { 0x10005950 }; |
|
32 |
|
33 /** |
|
34 * BTEngServer version numbers; |
|
35 * Major version number is 2 to distinguish from old BTServer architecture. |
|
36 */ |
|
37 const TInt KBTEngServerVersionMajor = 2; |
|
38 const TInt KBTEngServerVersionMinor = 0; |
|
39 const TInt KBTEngServerVersionBuild = 0; |
|
40 |
|
41 /** |
|
42 * Opcodes used in the client-server interface |
|
43 * for identifying the requested function. |
|
44 */ |
|
45 enum TBTEngServerRequest |
|
46 { |
|
47 EBTEngSetPowerState= 0x21, // 33 |
|
48 EBTEngSetVisibilityMode, // 34 |
|
49 EBTEngConnectDevice, // 35 |
|
50 EBTEngCancelConnectDevice, // 36 |
|
51 EBTEngDisconnectDevice, // 37 |
|
52 EBTEngIsDeviceConnected, // 38 |
|
53 EBTEngIsDeviceConnectable, // 39 |
|
54 EBTEngGetConnectedAddresses, // 40 |
|
55 EBTEngNotifyConnectionEvents, // 41 |
|
56 EBTEngCancelEventNotifier, // 42 |
|
57 EBTEngPrepareDiscovery, // 43 |
|
58 EBTEngSetPairingObserver, // 44 |
|
59 EBTEngPairDevice, // 45 |
|
60 EBTEngCancelPairDevice, // 46 |
|
61 }; |
|
62 |
|
63 /** TBTDevAddr class size */ |
|
64 const TInt KTBTDevAddrSize = 8; |
|
65 |
|
66 /** Maximum conflicts array size for client-server interface. */ |
|
67 const TInt KBTEngMaxConflictsArraySize = 3 * KTBTDevAddrSize; |
|
68 |
|
69 /** |
|
70 * Data structure for passing connection status events |
|
71 * from server to client. |
|
72 */ |
|
73 struct TBTEngEventMsg |
|
74 { |
|
75 TBTDevAddr iAddr; |
|
76 TBTEngConnectionStatus iConnEvent; |
|
77 TBuf8<KBTEngMaxConflictsArraySize> iConflictsBuf; |
|
78 }; |
|
79 |
|
80 |
|
81 /** Package buffer for transferring parameters between client and server. */ |
|
82 typedef TPckgBuf<TInt> TBTEngParamPkg; |
|
83 |
|
84 /** Package buffer to pass the device class between client and server. */ |
|
85 typedef TPckgBuf<TUint32> TBTEngDevClassPkg; |
|
86 |
|
87 /** Package buffer for transferring the connection event message. */ |
|
88 typedef TPckgBuf<TBTEngEventMsg> TBTEngEventPkg; |
|
89 |
|
90 |
|
91 #endif // BTENGCLIENTSERVER_H |