|
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 the License "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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef CIPTVEPGVODCALLBACKIMPL_H |
|
22 #define CIPTVEPGVODCALLBACKIMPL_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32std.h> |
|
26 #include "CIptvUtil.h" |
|
27 #include "MIptvEpgVodCallback.h" |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 class CIptvEpgDb; |
|
31 class CIptvEpgSession; |
|
32 class CIptvMediaContent; |
|
33 class CIptvEpgVodMsqQueue; |
|
34 |
|
35 // CLASS DECLARATION |
|
36 class CIptvEpgVodCallbackImpl : public CBase, public MIptvEpgVodCallback |
|
37 { |
|
38 public: |
|
39 |
|
40 /** |
|
41 * Two-phased constructor. |
|
42 * @param |
|
43 */ |
|
44 static CIptvEpgVodCallbackImpl* NewL(CIptvEpgDb& aVodEpgDb, CIptvEpgVodMsqQueue* aMsgQueue, CIptvEpgSession& aSession); |
|
45 |
|
46 /** |
|
47 * Destructor. |
|
48 */ |
|
49 ~CIptvEpgVodCallbackImpl(); |
|
50 |
|
51 /** |
|
52 * Is plugin running. |
|
53 */ |
|
54 TBool IsPluginRunning() { return iPluginRunning; }; |
|
55 |
|
56 public: // From MIptvEpgVodCallback interface |
|
57 |
|
58 /** |
|
59 * Plugin started. |
|
60 * |
|
61 * @param none |
|
62 */ |
|
63 void StartedL(); |
|
64 |
|
65 /** |
|
66 * ECG content update from XML completed. Thumbnails are not downloaded yet. |
|
67 * |
|
68 * @param |
|
69 */ |
|
70 void ContentUpdateCompletedL(); |
|
71 |
|
72 /** |
|
73 * Plugin finished. |
|
74 * |
|
75 * @param aUpdateInterval Update interval defines how long EPG data is valid. |
|
76 */ |
|
77 TInt FinishedL(TTime& aUpdateInterval); |
|
78 |
|
79 /** |
|
80 * Add new category to database. |
|
81 * |
|
82 * @param aCategory Reference to CIptvEpgCategory object. |
|
83 * @param aCategoryKey New category key value is inserted to aCategoryKey |
|
84 * @return KErrNone if successful, otherwise another of the system-wide error codes. |
|
85 */ |
|
86 TInt AddCategoryL(CIptvEpgCategory& aCategory, TUint32& aCategoryKey); |
|
87 |
|
88 /** |
|
89 * Add new content to given category. |
|
90 * |
|
91 * @param aContent Reference to CIptvEpgContent object. |
|
92 * @param aMediaContents Pointer array containing media content objects. There can be n media content's for one |
|
93 * content. |
|
94 * @param aContentKey New content key value is inserted to aContentKey |
|
95 * @return KErrNone if successful, otherwise another of the system-wide error codes. |
|
96 */ |
|
97 TInt AddContentL(CIptvEpgContent& aContent, RPointerArray<CIptvMediaContent> aMediaContents, TUint32& aContentKey); |
|
98 |
|
99 /** |
|
100 * Update service thumbnail. |
|
101 * |
|
102 * @param aIconFilePath Full path to service thumbnail in local filesystem. |
|
103 * @param aGrouped if true updates also grouped item, otherwise not. |
|
104 * @return KErrNone if successful, otherwise another of the system-wide error codes. |
|
105 */ |
|
106 TInt UpdateServiceThumbnailL( TDesC& aIconFilePath, const TBool aGrouped ); |
|
107 |
|
108 /** |
|
109 * Add content to category. |
|
110 * |
|
111 * @param aCategoryKey Category key. |
|
112 * @param aContentKey Content key. |
|
113 */ |
|
114 TInt AddRelationL(TUint32& aCategoryKey, TUint32& aContentKey); |
|
115 |
|
116 /** |
|
117 * Error |
|
118 * |
|
119 * @param aError Error code. |
|
120 */ |
|
121 void ErrorL(TInt aError, TInt aInfo); |
|
122 |
|
123 /** |
|
124 * Update category icon. |
|
125 * |
|
126 * @param aCategoryKey Category key. |
|
127 * @param aIconFileId Icon file id to search from the database. |
|
128 * @param aIconFilePath Full path to icon file or URL + filename. |
|
129 * @param aIsUrl If aIconFilePath is URL aIsUrl == ETrue, if aIconFilePath is path |
|
130 * to local filesystem aIsUrl == EFalse. |
|
131 * @return KErrNone if successful, otherwise another of the system-wide error codes. |
|
132 */ |
|
133 TInt UpdateCategoryIconL(TUint32& aCategoryKey, TUint32& aIconFileId, TDesC& aIconFilePath, TBool aIsUrl); |
|
134 |
|
135 /** |
|
136 * Update content icon. |
|
137 * |
|
138 * @param aCategoryKey Content key. |
|
139 * @param aIconFileId Icon file id to search from the database. |
|
140 * @param aIconFilePath Full path to icon file or URL + filename. |
|
141 * @param aIsUrl If aIconFilePath is URL aIsUrl == ETrue, if aIconFilePath is path |
|
142 * to local filesystem aIsUrl == EFalse. |
|
143 * @return KErrNone if successful, otherwise another of the system-wide error codes. |
|
144 */ |
|
145 TInt UpdateContentIconL(TUint32& aContentKey, TUint32& aIconFileId, TDesC& aIconFilePath, TBool aIsUrl); |
|
146 |
|
147 private: // New functions |
|
148 /** |
|
149 * C++ default constructor. |
|
150 */ |
|
151 CIptvEpgVodCallbackImpl(CIptvEpgDb& aVodEpgDb, CIptvEpgVodMsqQueue* aMsgQueue, CIptvEpgSession& aSession); |
|
152 |
|
153 /** |
|
154 * By default Symbian 2nd phase constructor is private. |
|
155 * @param |
|
156 */ |
|
157 void ConstructL(); |
|
158 |
|
159 private: // Data members |
|
160 CIptvEpgDb& iVodEpgDb; |
|
161 CIptvEpgVodMsqQueue* iMsgQueue; |
|
162 TBool iPluginRunning; |
|
163 CIptvEpgSession& iSession; |
|
164 }; |
|
165 |
|
166 #endif // CIPTVEPGVODCALLBACKIMPL_H |
|
167 |
|
168 // End of File |