|
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 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 |
|
61 private: |
|
62 |
|
63 /** |
|
64 * C++ default constructor. |
|
65 */ |
|
66 CObexSMUsbConnection(); |
|
67 |
|
68 /** |
|
69 * Constructor. |
|
70 * |
|
71 * @param aInitParams initial parameters |
|
72 */ |
|
73 CObexSMUsbConnection(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 |
|
95 |
|
96 private: |
|
97 CObexServer* iServer; // Obex Server |
|
98 CSrcsInterface* iController; // Service Controller callback |
|
99 CImplementationInformation* iImplementationInfo; // Implementation Info |
|
100 }; |
|
101 |
|
102 #endif // OBEXSMUSBCONNECTION_H |
|
103 |
|
104 // End of File |