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