|
1 /* |
|
2 * Copyright (c) 2004-2005 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: Message containing picture |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CCACONTENTMESSAGE_H |
|
20 #define CCACONTENTMESSAGE_H |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 #include "CCAMessageBase.h" |
|
25 |
|
26 // FORWARD CLASS DECLERATIONS |
|
27 class CFbsBitmap; |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 /** |
|
32 * Message containing picture |
|
33 * |
|
34 * @lib CAEngine.dll |
|
35 * @since 3.0 |
|
36 */ |
|
37 class CCAContentMessage : public CCAMessageBase |
|
38 { |
|
39 public: // Construction |
|
40 |
|
41 /** |
|
42 * Construction |
|
43 * @return Pointer to new created instance of CCAContentMessage |
|
44 */ |
|
45 static CCAContentMessage* NewL( TInt aOpCode, |
|
46 const TDesC& aSender, |
|
47 const TDesC& aRecipient, |
|
48 const MDesCArray* aRecipients, |
|
49 const MDesCArray* aScreenNames, |
|
50 const TDesC8& aContentType, |
|
51 const TDesC8& aContentData, |
|
52 const TDesC& aContentAddress ); |
|
53 |
|
54 /** |
|
55 * Construction. This is only skeleton creation. Used with internalize |
|
56 * @return Pointer to new created instance of CCAContentMessage |
|
57 */ |
|
58 static CCAContentMessage* NewL(); |
|
59 |
|
60 /** |
|
61 * Construction |
|
62 * @return Pointer to new created instance of CCAContentMessage |
|
63 */ |
|
64 static CCAContentMessage* NewLC( TInt aOpCode, |
|
65 const TDesC& aSender, |
|
66 const TDesC& aRecipient, |
|
67 const MDesCArray* aRecipients, |
|
68 const MDesCArray* aScreenNames, |
|
69 const TDesC8& aContentType, |
|
70 const TDesC8& aContentData, |
|
71 const TDesC& aContentAddress ); |
|
72 |
|
73 /** |
|
74 * Destruction |
|
75 */ |
|
76 ~CCAContentMessage(); |
|
77 |
|
78 private: // Construction |
|
79 |
|
80 /** |
|
81 * Constructor |
|
82 */ |
|
83 CCAContentMessage(); |
|
84 |
|
85 /** |
|
86 * Constructor |
|
87 */ |
|
88 void ConstructL( const TDesC8& aContentType, |
|
89 const TDesC8& aContentData, |
|
90 const TDesC& aContentAddress ); |
|
91 |
|
92 private: // From MCAMessage |
|
93 |
|
94 /** |
|
95 * @see MCAMessage |
|
96 */ |
|
97 TInt SizeInBytes() const; |
|
98 |
|
99 /** |
|
100 * @see MCAMessage |
|
101 */ |
|
102 TContentType ContentType() const; |
|
103 |
|
104 /** |
|
105 * @see MCAMessage |
|
106 */ |
|
107 void ReleaseTemporaryContentData(); |
|
108 |
|
109 /** |
|
110 * @see MCALoggerMessage |
|
111 */ |
|
112 void InternalizeL( RReadStream& aStream ); |
|
113 |
|
114 public: // New methods |
|
115 |
|
116 /** |
|
117 * Set thumbnail size. Picture is scaled to this one, |
|
118 * when thumbnail created. |
|
119 * @param aSize, Size of thumbnail. |
|
120 */ |
|
121 IMPORT_C void SetThumbnailSize( TSize aSize ); |
|
122 |
|
123 /** |
|
124 * Get thumbnail size. |
|
125 * @return Thumbnail size |
|
126 */ |
|
127 TSize ThumbnailSize() const; |
|
128 |
|
129 /** |
|
130 * Set thumbnail picture for message. Ownership is transferred. |
|
131 * @param aBitmap. New thumbnail bitmap |
|
132 */ |
|
133 void SetThumbnail( CFbsBitmap* aBitmap ); |
|
134 |
|
135 /** |
|
136 * Get thumbnail bitmap |
|
137 * @return Thumbnail. Ownership is not tranferred |
|
138 */ |
|
139 IMPORT_C CFbsBitmap* Thumbnail() const; |
|
140 |
|
141 private: //Member data |
|
142 |
|
143 /// Size of thumbnails |
|
144 TSize iThumbnailSize; |
|
145 |
|
146 /// Thumbnail |
|
147 CFbsBitmap* iThumbnail; |
|
148 |
|
149 /// Type of content |
|
150 TContentType iContentType; |
|
151 |
|
152 }; |
|
153 |
|
154 #endif // CCACONTENTMESSAGE_H |
|
155 |
|
156 // End of File |