32
|
1 |
/*
|
|
2 |
* Copyright (c) 2002-2007 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: This class handles bt obex settings.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef _OBEXSMBTCONNECTION_H
|
|
20 |
#define _OBEXSMBTCONNECTION_H
|
|
21 |
|
|
22 |
// INCLUDES
|
|
23 |
#include <e32base.h>
|
|
24 |
|
|
25 |
#include <obex.h>
|
|
26 |
#include "SrcsTransport.h"
|
|
27 |
#include "obexsmpasskey.h"
|
|
28 |
#include "SrcsInterface.h"
|
|
29 |
#include "btengdiscovery.h"
|
|
30 |
#include "obexutilsopaquedata.h"
|
|
31 |
|
|
32 |
// CLASS DECLARATION
|
|
33 |
/**
|
|
34 |
* Class to handle Bluetooth connection
|
|
35 |
*/
|
|
36 |
class CObexSMBtConnection: public CSrcsTransport
|
|
37 |
{
|
|
38 |
public:
|
|
39 |
|
|
40 |
/**
|
|
41 |
* Two-phased constructor.
|
|
42 |
*
|
|
43 |
* @param aInitParams initial parameters
|
|
44 |
*/
|
|
45 |
static CObexSMBtConnection* NewL(TAny* aInitParams);
|
|
46 |
|
|
47 |
/**
|
|
48 |
* Destructor.
|
|
49 |
*
|
|
50 |
*/
|
|
51 |
virtual ~CObexSMBtConnection();
|
|
52 |
|
|
53 |
/**
|
|
54 |
* Check if OBEX service is still active.
|
|
55 |
*
|
|
56 |
* @return ETrue: OBEX service is still active.
|
|
57 |
* EFalse: OBEX service is inactive.
|
|
58 |
*/
|
|
59 |
TBool IsOBEXActive();
|
|
60 |
|
|
61 |
private:
|
|
62 |
|
|
63 |
/**
|
|
64 |
* C++ default constructor.
|
|
65 |
*/
|
|
66 |
CObexSMBtConnection();
|
|
67 |
|
|
68 |
/**
|
|
69 |
* Constructor.
|
|
70 |
*
|
|
71 |
* @param aInitParams initial parameters
|
|
72 |
*/
|
|
73 |
CObexSMBtConnection(TAny* aInitParams);
|
|
74 |
|
|
75 |
/**
|
|
76 |
* Constructor
|
|
77 |
* registers to sdp and btmanager
|
|
78 |
* sets up the protocol stack
|
|
79 |
* creates new messagehandler
|
|
80 |
*/
|
|
81 |
void ConstructL();
|
|
82 |
|
|
83 |
/**
|
|
84 |
* MObexAuthChallengeHandler implementation
|
|
85 |
*/
|
|
86 |
|
|
87 |
/**
|
|
88 |
* Password for authenticated connection
|
|
89 |
*
|
|
90 |
* @param aUserID User ID.
|
|
91 |
*/
|
|
92 |
void GetUserPasswordL( const TDesC& aUserID );
|
|
93 |
|
|
94 |
private:
|
|
95 |
CObexServer* iServer; // Obex Server
|
|
96 |
TSdpServRecordHandle iSDPHandle; // SDP handle for registrations
|
|
97 |
CObexSMPasskey* iPasskey; // Class to handle Obex passkey
|
|
98 |
|
|
99 |
CSrcsInterface* iController; // Service Controller callback
|
|
100 |
CImplementationInformation* iImplementationInfo; // Implementation Info
|
|
101 |
|
|
102 |
TUint iServiceUid; // short form service id, so we can unregister later
|
|
103 |
TUUID iServiceUUID; // 128-bit UUID for Nokia proprietory service
|
|
104 |
CBTEngDiscovery* iBtDiscovery; // Bteng discovery
|
|
105 |
};
|
|
106 |
|
|
107 |
|
|
108 |
|
|
109 |
#endif // SRCSBTCONNECTION_H
|
|
110 |
|
|
111 |
// End of File
|