|
1 /* |
|
2 * Copyright (c) 2009 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 * Description: Manipulate Interface of Internet Radio Database |
|
13 * |
|
14 */ |
|
15 |
|
16 #ifndef _IRDB_VIEW_STRUCT_H_ |
|
17 #define _IRDB_VIEW_STRUCT_H_ |
|
18 |
|
19 #include <QString> |
|
20 #include <QMap> |
|
21 #include <QByteArray> |
|
22 |
|
23 |
|
24 /* |
|
25 * pair node for column-value; |
|
26 * uint: column enum; |
|
27 * QString: column value; |
|
28 */ |
|
29 typedef QMap<uint, QString> columnMap; |
|
30 typedef QMap<uint, QByteArray> logoMap; |
|
31 |
|
32 enum EColumnLogo{bLogoInsert, sLogoInsert}; |
|
33 const QString colNameLogo[] = {"bIcon", "sIcon"}; |
|
34 const QString strBLogo = ":bIcon"; |
|
35 const QString strSLogo = ":sIcon"; |
|
36 |
|
37 const int IRDB_ALL_COLUMN = 25; |
|
38 const int IRDB_OPT_INSERT = 1; |
|
39 const int IRDB_OPT_UPDATE = 2; |
|
40 const int IRDB_OPT_TRIGGER = 3; |
|
41 const int IRDB_CHANNELINFO_COLUMN = 20; |
|
42 const int IRDB_CHANNELHISTORY_COLUMN = 20; |
|
43 const int IRDB_SEARCHRLT_COLUMN = 20; |
|
44 const int IRDB_SONGHISTORY_COLUMN = 22; |
|
45 const int IRDB_FAVORITES_COLUMN = 20; |
|
46 const int IRDB_IMG_COLUMN = 4; |
|
47 |
|
48 enum EColumnView{channelId, channelName, channelNickName, |
|
49 genreName, genreId, languageName, languageCode, |
|
50 countryName, countryCode, description, shortDesc, |
|
51 lastModified, channelType, musicStoreStatus, |
|
52 imgUrl, bLogoGet, sLogoGet, |
|
53 advertisementUrl, advertisementInUse, expiration, |
|
54 songName, artistName, channelUrl, opt, dataSource}; |
|
55 |
|
56 const QString colNameView[] = {"channelId", "channelName", "channelNickName", |
|
57 "genreName", "genreId", "languageName", "languageCode", |
|
58 "countryName", "countryCode", "description", "shortDesc", |
|
59 "lastModified", "channelType", "musicStoreStatus", |
|
60 "imgUrl", "bIcon", "sIcon", |
|
61 "advertisementUrl", "advertisementInUse", "expiration", |
|
62 "songName", "artistName", "channelUrl", "opt", "dataSource"}; |
|
63 |
|
64 //flag of data belong to channelHistory; |
|
65 const int DATA_OF_CHANNELHISTORY = 1; |
|
66 |
|
67 //flag of data belong to searchRlt; |
|
68 const int DATA_OF_SEARCHRLT = 2; |
|
69 |
|
70 /* |
|
71 * for urlinfo table; |
|
72 */ |
|
73 //columns count of urlinfo; |
|
74 const int IRDB_URLINFO_COLUMN = 3; |
|
75 |
|
76 //urlInfo's column enum; |
|
77 enum EColumnUrlInfo{channelUrl_URL, channelId_URL, bitRate_URL}; |
|
78 |
|
79 //urlInfo's column name; |
|
80 const QString colNameUrlInfo[] = {"channelUrl", "channelId", "bitRate" }; |
|
81 |
|
82 //for urlInfo insert |
|
83 typedef QMap<QString, uint> columnUrlInfoInsertMap; |
|
84 |
|
85 |
|
86 /* |
|
87 * for advertisement table; |
|
88 */ |
|
89 /* |
|
90 * Due to the advertisement wrapper is unavailable, the structure is masked temporarily. |
|
91 */ |
|
92 //columns count of advertisement; |
|
93 //const int IRDB_ADVERTISEMENT_COLUMN = 5; |
|
94 |
|
95 //advertisement's column enum; |
|
96 //enum EColumnAdvertisement{channelId_AD, advertisementUrl_AD, advertisementInUse_AD, expiration_AD}; |
|
97 |
|
98 //advertisement's column name; |
|
99 //const QString colNameAdvertisement[] = {"channelId", "advertisementUrl", "advertisementInUse", "expiration"}; |
|
100 |
|
101 |
|
102 #endif |
|
103 |
|
104 |