|
1 // Copyright (c) 2007-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 @internalTechnology |
|
19 */ |
|
20 |
|
21 #ifndef CMTPEXTENSIONMAPPING_H |
|
22 #define CMTPEXTENSIONMAPPING_H |
|
23 |
|
24 #include <e32base.h> |
|
25 #include <mtp/mtpprotocolconstants.h> |
|
26 |
|
27 class CMTPExtensionMapping : |
|
28 public CBase |
|
29 { |
|
30 public: |
|
31 static CMTPExtensionMapping* NewL(const TDesC& aExtension, TMTPFormatCode aFormatCode); |
|
32 static CMTPExtensionMapping* NewL(const TDesC& aExtension, TMTPFormatCode aFormatCode,const TDesC& aMIMEType); |
|
33 ~CMTPExtensionMapping(); |
|
34 |
|
35 const TDesC& Extension() const; |
|
36 TMTPFormatCode FormatCode() const; |
|
37 const TDesC& MIMEType() const; |
|
38 TUint32 DpId() const; |
|
39 TUint EnumerationFlag() const; |
|
40 |
|
41 void SetExtensionL(const TDesC& aExtension); |
|
42 void SetMIMETypeL(const TDesC& aMIMEType); |
|
43 void SetDpId(const TUint32 aDpId); |
|
44 void SetFormatCode(const TMTPFormatCode aFormatCode); |
|
45 void SetEnumerationFlag(const TUint aNeedFileDp); |
|
46 |
|
47 static TInt Compare(const CMTPExtensionMapping& aFirst, const CMTPExtensionMapping& aSecond); |
|
48 static TInt ComparewithMIME(const CMTPExtensionMapping& aFirst, const CMTPExtensionMapping& aSecond); |
|
49 |
|
50 private: |
|
51 CMTPExtensionMapping(TMTPFormatCode aFormatCode); |
|
52 void ConstructL(const TDesC& aExtension,const TDesC& aMIMEType); |
|
53 |
|
54 private: |
|
55 HBufC* iExtension; |
|
56 TMTPFormatCode iFormatCode; |
|
57 HBufC* iMIMEType; |
|
58 TUint32 iDpId; |
|
59 TUint iNeedFileDp; |
|
60 }; |
|
61 |
|
62 #endif // CMTPEXTENSIONMAPPING_H |