53 QString serverName; |
53 QString serverName; |
54 QString url; |
54 QString url; |
55 int bitrate; |
55 int bitrate; |
56 }; |
56 }; |
57 |
57 |
58 class IRQPreset |
58 class IRQCOMMMON_DLL_EXPORT IRQPreset |
59 { |
59 { |
60 public: |
60 public: |
61 enum IRQPresetType |
61 enum IRQPresetType |
62 { |
62 { |
63 EUser, |
63 EUser, |
64 EIsds |
64 EIsds |
65 }; |
65 }; |
66 |
66 |
67 |
67 |
68 IMPORT_C IRQPreset(); |
68 IRQPreset(); |
69 IMPORT_C ~IRQPreset(); |
69 ~IRQPreset(); |
70 IMPORT_C IRQPreset& operator = (const IRQPreset& aOther); |
70 IRQPreset& operator = (const IRQPreset& aOther); |
71 |
71 |
72 IMPORT_C void internalize(QDataStream &aStream); |
72 void internalize(QDataStream &aStream); |
73 IMPORT_C void externalize(QDataStream &aStream) const; |
73 void externalize(QDataStream &aStream) const; |
74 |
74 |
75 /* get the bitrates of the preset. |
75 /* get the bitrates of the preset. |
76 */ |
76 */ |
77 IMPORT_C void getAvailableBitrates(QList<int>& aBitrates) const; |
77 void getAvailableBitrates(QList<int>& aBitrates) const; |
78 /* get the url for the specify bitrate |
78 /* get the url for the specify bitrate |
79 * the caller should delete the QList */ |
79 * the caller should delete the QList */ |
80 IMPORT_C QList<QString> * getURLsForBitrate(int aBitrate) const; |
80 QList<QString> * getURLsForBitrate(int aBitrate) const; |
81 /* the following functions may be changed in future */ |
81 /* the following functions may be changed in future */ |
82 IMPORT_C int getChannelUrlAt(int aIndex, QString& aURL) const; |
82 int getChannelUrlAt(int aIndex, QString& aURL) const; |
83 IMPORT_C int getChannelBitrate(unsigned int aIndex, unsigned int &aBitrate) const; |
83 int getChannelBitrate(unsigned int aIndex, unsigned int &aBitrate) const; |
84 |
84 |
85 /* sort the urlArray with bitrates by ascending. for |
85 /* sort the urlArray with bitrates by ascending. for |
86 * there are not many items, here we use bubble sorting. |
86 * there are not many items, here we use bubble sorting. |
87 */ |
87 */ |
88 IMPORT_C void sortURLArray(); |
88 void sortURLArray(); |
89 /* check wether the internal list is sorted |
89 /* check wether the internal list is sorted |
90 */ |
90 */ |
91 IMPORT_C bool isSorted() const; |
91 bool isSorted() const; |
92 /* append a channel server into a internal list |
92 /* append a channel server into a internal list |
93 */ |
93 */ |
94 IMPORT_C void insertChannelServer(const IRQChannelServerURL& aURL); |
94 void insertChannelServer(const IRQChannelServerURL& aURL); |
95 /* clear the internal list |
95 /* clear the internal list |
96 */ |
96 */ |
97 IMPORT_C void clearChannelServerList(); |
97 void clearChannelServerList(); |
98 |
98 |
99 IMPORT_C int getChannelURLCount() const; |
99 int getChannelURLCount() const; |
100 |
100 |
101 IMPORT_C bool setUrlBitrate(const unsigned int aUrlIndex, const unsigned int aBitrate); |
101 bool setUrlBitrate(const unsigned int aUrlIndex, const unsigned int aBitrate); |
102 |
102 |
103 int uniqID; //unique id generated for the preset saved at favourite |
103 int uniqID; //unique id generated for the preset saved at favourite |
104 |
104 |
105 int type; //0 for user defined 1 for isds type. |
105 int type; //0 for user defined 1 for isds type. |
106 int presetId;//isds generated preset id |
106 int presetId;//isds generated preset id |