|
1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @publishedPartner |
|
19 @released |
|
20 */ |
|
21 |
|
22 #ifndef MMTPCONNECTION_H |
|
23 #define MMTPCONNECTION_H |
|
24 |
|
25 #include <e32cmn.h> |
|
26 #include <e32def.h> |
|
27 #include <mtp/mtpdataproviderapitypes.h> |
|
28 |
|
29 class MMTPSession; |
|
30 |
|
31 /** |
|
32 Defines the MTP data provider framework MTP connection interface. |
|
33 |
|
34 @publishedPartner |
|
35 @released |
|
36 */ |
|
37 class MMTPConnection |
|
38 { |
|
39 public: |
|
40 |
|
41 /** |
|
42 Provides the unique MTP data provider framework assigned identifier of the |
|
43 connection. |
|
44 @return The MTP data provider framework assigned connection identifier. |
|
45 */ |
|
46 virtual TUint ConnectionId() const = 0; |
|
47 |
|
48 /** |
|
49 Provides a count of the number of sessions currently active on the |
|
50 connection. |
|
51 @return The number of sessions currently active on the connection. |
|
52 */ |
|
53 virtual TUint SessionCount() const = 0; |
|
54 |
|
55 /** |
|
56 Indicates if a session with the specified MTP connection assigned |
|
57 identifier is currently active on the connection. |
|
58 @param aMTPId The MTP connection assigned identifier of the session. |
|
59 @return ETrue, if a session with the specified session identifier is |
|
60 currently active on the connection, otherwise EFalse. |
|
61 */ |
|
62 virtual TBool SessionWithMTPIdExists(TUint32 aMTPId) const = 0; |
|
63 |
|
64 /** |
|
65 Provides a reference to the session with the specified MTP connection |
|
66 assigned identifier. |
|
67 @param aMTPId The MTP connection assigned identifier of the |
|
68 requested session. |
|
69 @return The reference of the session with the specified MTP connection |
|
70 assigned identifier. |
|
71 @leave KErrNotFound, if the specified session identifier is not currently |
|
72 active on the connection. |
|
73 @see SessionWithMTPIdExists |
|
74 */ |
|
75 virtual MMTPSession& SessionWithMTPIdL(TUint32 aMTPId) const = 0; |
|
76 |
|
77 /** |
|
78 Indicates if a session with the specified MTP connection assigned |
|
79 identifier is currently active on the connection. |
|
80 @param aUniqueId The MTP connection assigned identifier of the session. |
|
81 @return ETrue, if a session with the specified session identifier is |
|
82 currently active on the connection, otherwise EFalse. |
|
83 */ |
|
84 virtual TBool SessionWithUniqueIdExists(TUint32 aUniqueId) const = 0; |
|
85 |
|
86 /** |
|
87 Provides a reference to the session with the specified MTP connection |
|
88 assigned identifier. |
|
89 @param aUniqueId The MTP connection assigned identifier of the |
|
90 requested session. |
|
91 @return The reference of the session with the specified MTP connection |
|
92 assigned identifier. |
|
93 @leave KErrNotFound, if the specified session identifier is not currently |
|
94 active on the connection. |
|
95 @see SessionWithMTPIdExists |
|
96 */ |
|
97 virtual MMTPSession& SessionWithUniqueIdL(TUint32 aUniqueId) const = 0; |
|
98 }; |
|
99 |
|
100 #endif // MMTPCONNECTION_H |