|
1 /* |
|
2 * Copyright (c) 2006-2007 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: Object info derived from attachment info. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef C_UNIOBJECTINFO_H |
|
21 #define C_UNIOBJECTINFO_H |
|
22 |
|
23 // ========== INCLUDE FILES ================================ |
|
24 |
|
25 #include <MsgAttachmentInfo.h> |
|
26 #include <MsgAttachmentUtils.h> |
|
27 |
|
28 // ========== CONSTANTS ==================================== |
|
29 |
|
30 // ========== MACROS ======================================= |
|
31 |
|
32 // ========== FUNCTION PROTOTYPES ========================== |
|
33 |
|
34 // ========== FORWARD DECLARATIONS ========================= |
|
35 class CUniObject; |
|
36 |
|
37 // ========== DATA TYPES =================================== |
|
38 |
|
39 // ========== CLASS DECLARATION ============================ |
|
40 |
|
41 /** |
|
42 * Object info class derived from attachment info. |
|
43 * |
|
44 * @lib UniUtils.lib |
|
45 * |
|
46 * @since S60 3.2 |
|
47 */ |
|
48 NONSHARABLE_CLASS( CUniObjectsInfo ) : public CMsgAttachmentInfo |
|
49 { |
|
50 public: |
|
51 |
|
52 enum TUniObjectsInfoFlags |
|
53 { |
|
54 EMmsSlide = 0x0001 |
|
55 }; |
|
56 |
|
57 /** |
|
58 * Factory method that creates this object. |
|
59 * |
|
60 * @since S60 3.2 |
|
61 * |
|
62 * @param aAttachmentModel Reference to attachment model. |
|
63 * @param aObject Object to which info is related. |
|
64 * @param aDRMType DRM type of the object |
|
65 * @param aAttachmentObject ETrue if attachment object, otherwise EFalse. |
|
66 * @param aSlideNumber Slide number where object is located. |
|
67 * |
|
68 * @return New instance |
|
69 */ |
|
70 static CUniObjectsInfo* NewLC( |
|
71 CMsgAttachmentModel& aAttachmentModel, |
|
72 CUniObject& aObject, |
|
73 TInt aDRMType, |
|
74 TBool aAttachmentObject, |
|
75 TInt aSlideNumber ); |
|
76 |
|
77 /** |
|
78 * Factory method that creates this object for empty slide. |
|
79 * |
|
80 * @since S60 3.2 |
|
81 * |
|
82 * @param aAttachmentModel Reference to attachment model. |
|
83 * @param aEmptySlideName Name string of the empty slide |
|
84 * |
|
85 * @return New instance |
|
86 */ |
|
87 static CUniObjectsInfo* NewEmptySlideLC( |
|
88 CMsgAttachmentModel& aAttachmentModel, |
|
89 const TDesC& aEmptySlideName ); |
|
90 |
|
91 /** |
|
92 * Destructor |
|
93 * |
|
94 * @since S60 3.2 |
|
95 * |
|
96 */ |
|
97 virtual ~CUniObjectsInfo(); |
|
98 |
|
99 /** |
|
100 * Sets type of this object. |
|
101 * |
|
102 * @since S60 3.2 |
|
103 * |
|
104 * @param aType New type |
|
105 */ |
|
106 inline void SetType( MsgAttachmentUtils::TMsgAttachmentFetchType aType ); |
|
107 |
|
108 /** |
|
109 * Returns type of this object. |
|
110 * |
|
111 * @since S60 3.2 |
|
112 * |
|
113 * @return object type |
|
114 */ |
|
115 inline MsgAttachmentUtils::TMsgAttachmentFetchType Type() const; |
|
116 |
|
117 /** |
|
118 * Returns current flags. |
|
119 * |
|
120 * @since S60 3.2 |
|
121 * |
|
122 * @return iFlags |
|
123 */ |
|
124 inline TUint32 Flags() const; |
|
125 |
|
126 /** |
|
127 * Sets flags. |
|
128 * |
|
129 * @since S60 3.2 |
|
130 * |
|
131 * @param aFlags New flags |
|
132 */ |
|
133 inline void SetFlags( TUint32 aFlags ); |
|
134 |
|
135 /** |
|
136 * Get pointer to a related object |
|
137 * |
|
138 * @since S60 3.2 |
|
139 */ |
|
140 inline CUniObject* Object() const; |
|
141 |
|
142 /** |
|
143 * Indicates whether object is attachment. |
|
144 * |
|
145 * @since S60 3.2 |
|
146 * |
|
147 * @return ETrue if object is attachment |
|
148 * EFalse otherwise |
|
149 */ |
|
150 inline TBool AttachmentObject() const; |
|
151 |
|
152 /** |
|
153 * Returns the slide number where object is located. |
|
154 * |
|
155 * @since S60 3.2 |
|
156 * |
|
157 * @return Slide number on MMS SMIL. |
|
158 */ |
|
159 inline TInt SlideNumber() const; |
|
160 |
|
161 protected: |
|
162 |
|
163 /** |
|
164 * C++ constructor. |
|
165 * |
|
166 * @since S60 3.2 |
|
167 * |
|
168 * @param aAttachmentModel Reference to attachment model. |
|
169 * @param aObject Object to which info is related. |
|
170 * @param aAttachmentObject ETrue if attachment object, otherwise EFalse. |
|
171 * @param aSlideNumber Slide number where object is located. |
|
172 */ |
|
173 CUniObjectsInfo( CMsgAttachmentModel& aAttachmentModel, |
|
174 CUniObject& aObject, |
|
175 TBool aAttachmentObject, |
|
176 TInt aSlideNumber ); |
|
177 |
|
178 /** |
|
179 * Constructor (for empty slide). |
|
180 * |
|
181 * @since S60 3.2 |
|
182 * |
|
183 * @param aAttachmentModel Reference to attachment model. |
|
184 * @param aEmptySlideName Name string of the empty slide |
|
185 */ |
|
186 CUniObjectsInfo( CMsgAttachmentModel& aAttachmentModel, |
|
187 const TDesC& aEmptySlideName ); |
|
188 |
|
189 /** |
|
190 * Symbian OS constructor. |
|
191 */ |
|
192 void ConstructL( TInt aDRMType ); |
|
193 |
|
194 private: |
|
195 |
|
196 MsgAttachmentUtils::TMsgAttachmentFetchType iType; |
|
197 TUint32 iFlags; |
|
198 CUniObject* iObject; |
|
199 TBool iAttachmentObject; |
|
200 TInt iSlideNumber; |
|
201 }; |
|
202 |
|
203 #include <uniobjectsinfo.inl> |
|
204 |
|
205 #endif // C_UNIOBJECTINFO_H |
|
206 |
|
207 // End of File |