|
1 /* |
|
2 * Copyright (c) 2009 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: Dummy test connection channel for test module |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CTESTCONNECTIONCHANNEL_H |
|
20 #define CTESTCONNECTIONCHANNEL_H |
|
21 |
|
22 #include <mtp/mmtpconnection.h> |
|
23 |
|
24 class MMTPSession; |
|
25 |
|
26 class CTestConnectionChannel : public MMTPConnection |
|
27 { |
|
28 // from MMTPConnection |
|
29 /** |
|
30 Provides the unique MTP data provider framework assigned identifier of the |
|
31 connection. |
|
32 @return The MTP data provider framework assigned connection identifier. |
|
33 */ |
|
34 TUint ConnectionId() const; |
|
35 |
|
36 /** |
|
37 Provides a count of the number of sessions currently active on the |
|
38 connection. |
|
39 @return The number of sessions currently active on the connection. |
|
40 */ |
|
41 TUint SessionCount() const; |
|
42 |
|
43 /** |
|
44 Indicates if a session with the specified MTP connection assigned |
|
45 identifier is currently active on the connection. |
|
46 @param aMTPId The MTP connection assigned identifier of the session. |
|
47 @return ETrue, if a session with the specified session identifier is |
|
48 currently active on the connection, otherwise EFalse. |
|
49 */ |
|
50 TBool SessionWithMTPIdExists(TUint32 aMTPId) const; |
|
51 |
|
52 /** |
|
53 Provides a reference to the session with the specified MTP connection |
|
54 assigned identifier. |
|
55 @param aMTPId The MTP connection assigned identifier of the |
|
56 requested session. |
|
57 @return The reference of the session with the specified MTP connection |
|
58 assigned identifier. |
|
59 @leave KErrNotFound, if the specified session identifier is not currently |
|
60 active on the connection. |
|
61 @see SessionWithMTPIdExists |
|
62 */ |
|
63 MMTPSession& SessionWithMTPIdL(TUint32 aMTPId) const; |
|
64 |
|
65 /** |
|
66 Indicates if a session with the specified MTP connection assigned |
|
67 identifier is currently active on the connection. |
|
68 @param aUniqueId The MTP connection assigned identifier of the session. |
|
69 @return ETrue, if a session with the specified session identifier is |
|
70 currently active on the connection, otherwise EFalse. |
|
71 */ |
|
72 TBool SessionWithUniqueIdExists(TUint32 aUniqueId) const; |
|
73 |
|
74 /** |
|
75 Provides a reference to the session with the specified MTP connection |
|
76 assigned identifier. |
|
77 @param aUniqueId The MTP connection assigned identifier of the |
|
78 requested session. |
|
79 @return The reference of the session with the specified MTP connection |
|
80 assigned identifier. |
|
81 @leave KErrNotFound, if the specified session identifier is not currently |
|
82 active on the connection. |
|
83 @see SessionWithMTPIdExists |
|
84 */ |
|
85 MMTPSession& SessionWithUniqueIdL(TUint32 aUniqueId) const; |
|
86 |
|
87 |
|
88 }; |
|
89 |
|
90 #endif // CTESTCONNECTIONCHANNEL_H |