|
1 /* |
|
2 * Copyright (c) 2006 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: Encapsulates the supported types for the collection |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CMPXCOLLECTIONTYPE_H |
|
20 #define CMPXCOLLECTIONTYPE_H |
|
21 |
|
22 #include <s32strm.h> |
|
23 #include <badesca.h> |
|
24 // CONSTANTS |
|
25 |
|
26 /** |
|
27 * Class to encapsulate supported collection type. |
|
28 * |
|
29 * @lib mpxcommon.lib |
|
30 */ |
|
31 class CMPXCollectionType : public CBase |
|
32 { |
|
33 |
|
34 public: |
|
35 /** |
|
36 * C++ constructor. |
|
37 * |
|
38 * @since S60 3.2.3 |
|
39 */ |
|
40 IMPORT_C CMPXCollectionType(); |
|
41 |
|
42 /** |
|
43 * C++ constructor. |
|
44 * |
|
45 * @since S60 3.2.3 |
|
46 * @param aUid uid of the collection plugin |
|
47 * @param aMimeTypes mime types supported by plugin, take over the ownership |
|
48 * @param aExtensions extensions supported by plugin, take over the ownership |
|
49 */ |
|
50 IMPORT_C CMPXCollectionType(const TUid& aUid, |
|
51 CDesCArray* aMimeTypes, |
|
52 CDesCArray* aExtensions); |
|
53 |
|
54 /** |
|
55 * virtual destructor. |
|
56 * |
|
57 * @since S60 3.2.3 |
|
58 */ |
|
59 virtual ~CMPXCollectionType(); |
|
60 |
|
61 /** |
|
62 * Externalize a object of this class to stream. |
|
63 * |
|
64 * @since S60 3.2.3 |
|
65 * @param aStream write stream |
|
66 */ |
|
67 IMPORT_C void ExternalizeL(RWriteStream& aStream) const; |
|
68 |
|
69 /** |
|
70 * Internalize a object of this class from stream. |
|
71 * |
|
72 * @since S60 3.2.3 |
|
73 * @param aStream read stream |
|
74 */ |
|
75 IMPORT_C void InternalizeL(RReadStream& aStream); |
|
76 |
|
77 /** |
|
78 * Returns the extension. |
|
79 * |
|
80 * @since S60 3.2.3 |
|
81 */ |
|
82 inline const CDesCArray& Extensions() const; |
|
83 |
|
84 /** |
|
85 * Returns the UID. |
|
86 * |
|
87 * @since S60 3.2.3 |
|
88 */ |
|
89 inline const TUid& Uid() const; |
|
90 |
|
91 /** |
|
92 * Returns the mime type. |
|
93 * |
|
94 * @since S60 3.2.3 |
|
95 */ |
|
96 inline const CDesCArray& Mimetypes() const; |
|
97 |
|
98 private: // data |
|
99 TUid iUid; |
|
100 CDesCArray* iMimeTypes; |
|
101 CDesCArray* iExtensions; |
|
102 }; |
|
103 |
|
104 #include "mpxcollectiontype.inl" |
|
105 |
|
106 #endif // CMPXCOLLECTIONTYPE_H |