internetradio2.0/songhistoryinc/irsonghistorydb.h
changeset 5 0930554dc389
parent 0 09774dfdd46b
child 8 3b03c28289e6
equal deleted inserted replaced
3:ee64f059b8e1 5:0930554dc389
    79 	*/
    79 	*/
    80 		~CIRSongHistoryDb();
    80 		~CIRSongHistoryDb();
    81 
    81 
    82 
    82 
    83 
    83 
    84 	/**
    84     /**
    85 	* Function : AddToSongHistoryDbL()
    85     * Function : AddToSongHistoryDbL()
    86 	* adds the song history entry into data base
    86     * adds the song history entry into data base
    87 	* @param various channel information 
    87     * @param various channel information 
    88 	*/
    88     */
    89 	TBool AddToSongHistoryDbL( const TDesC& aSongName,
    89     TBool AddToSongHistoryDbL( const TDesC& aSongName,
    90 								const TDesC& aArtistName, 
    90                                 const TDesC& aArtistName, 
    91 								const TDesC& aChannelName, 
    91                                 const TDesC& aChannelName, 
    92 								const TDesC& aChannelUrl,
    92                                 const TDesC& aChannelUrl,
    93 								RBuf& aDelSongName, 
    93                                 RBuf& aDelSongName, 
    94 								RBuf& aDelArtistname, 
    94                                 RBuf& aDelArtistname, 
    95 								RBuf& aDelChannelName, 
    95                                 RBuf& aDelChannelName, 
    96 								RBuf& aDelChannelUrl,
    96                                 RBuf& aDelChannelUrl,
    97 								TInt  aChannelType,
    97                                 TInt  aChannelType,
    98 								TInt aChannelId,
    98                                 TInt aChannelId,
    99 								TInt aBitrate,
    99                                 TInt aBitrate,
   100 								const TDesC& aChannelDesc,
   100                                 const TDesC& aChannelDesc,
   101 								const TDesC& aImageUrl,
   101                                 const TDesC& aImageUrl,
   102 								const TDesC& aMusicFlag);
   102                                 const TDesC& aGenreName,
       
   103                                 const TDesC& aCountryName,
       
   104                                 const TDesC& aLanguageName,
       
   105                                 const TDesC& aMusicFlag);
   103 	 /**
   106 	 /**
   104 	 * Function : AddToSongHistoryDb2L()
   107 	 * Function : AddToSongHistoryDb2L()
   105 	 * adds the song history entry into data base
   108 	 * adds the song history entry into data base
   106 	 * @param various song information 
   109 	 * @param various song information 
   107 	 */
   110 	 */
   181 	*/
   184 	*/
   182     TInt UpdateSongHistoryDbL( TInt aChannelId,
   185     TInt UpdateSongHistoryDbL( TInt aChannelId,
   183     	                      const TDesC& aChannelName, 
   186     	                      const TDesC& aChannelName, 
   184 						      const TDesC& aChannelUrl,
   187 						      const TDesC& aChannelUrl,
   185 						      const TDesC& aImageUrl,
   188 						      const TDesC& aImageUrl,
       
   189                               const TDesC& aGenreName,
       
   190                               const TDesC& aCountryName,
       
   191                               const TDesC& aLanguageName,						      
   186 							  const TDesC& aMusicFlag);
   192 							  const TDesC& aMusicFlag);
   187 
   193 
   188     /*
   194     /*
   189      * search if a record already exists in database. If yes, delete it.
   195      * search if a record already exists in database. If yes, delete it.
   190      */
   196      */
   191     void SearchAndDeleteRecordL(const TDesC& aChannelName, const TDesC& aChannelUrl,
   197     void SearchAndDeleteRecordL(const TDesC& aChannelName, const TDesC& aChannelUrl,
   192                                 TInt aChannelType);
   198                                 TInt aChannelType);
   193     
   199     
   194     /*
   200     /*
   195      * delete a recorder by the index
   201      * delete a recorder by the index, for station history database
   196      * */
   202      * */
   197     TInt DeleteOneHistory(TInt aIndex);
   203     TInt DeleteOneHistory(TInt aIndex);
   198     
   204     
       
   205     /*
       
   206      * delete a recorder by the index, for songhistory database
       
   207      * */
       
   208     TInt DeleteOneSongHistory(TInt aIndex);
   199 
   209 
   200 private:
   210 private:
   201 
   211 
   202 	/**
   212 	/**
   203 	* Function : ConstructL()
   213 	* Function : ConstructL()
   216 	* creates songhistory table with three columns
   226 	* creates songhistory table with three columns
   217 	* log data
   227 	* log data
   218 	* ---------------------------------------------------------------------------
   228 	* ---------------------------------------------------------------------------
   219 	* SongHistoryTable
   229 	* SongHistoryTable
   220 	*---------------------------
   230 	*---------------------------
   221 	*| SongName | ArtistName | ChannelName | ChannelUrl | ChannelType | ChannelId | Bitrate | ChannelDesc | ImageUrl
   231 	*| SongName | ArtistName | ChannelName | ChannelUrl | ChannelType | ChannelId    | Bitrate      | ChannelDesc | ImageUrl   | GenreName  | CountryName | LanguageName | MusicStatus
   222 	*---------------------------
   232 	*---------------------------
   223 	*|EDbColText| EDbColText | EDbColText | EDbColText | EDbColUint8 | EDbColUint16 | EDbColUint16 | EDbColText | EDbColText
   233 	*|EDbColText| EDbColText | EDbColText  | EDbColText | EDbColUint8 | EDbColUint16 | EDbColUint16 | EDbColText  | EDbColText | EDbColText | EDbColText  | EDbColText   | EDbColText 
   224 	*----------------------------------------------------------------------------
   234 	*----------------------------------------------------------------------------
   225 	*/
   235 	*/
   226 	void CreateSongHistoryTablesL();
   236 	void CreateSongHistoryTablesL();
   227 	
   237 	
   228     /**
   238     /**
   263 	
   273 	
   264 	/**
   274 	/**
   265 	 * to wrapper the delete leaving
   275 	 * to wrapper the delete leaving
   266 	 */
   276 	 */
   267 	TInt DeleteOneHistoryL(TInt aIndex);
   277 	TInt DeleteOneHistoryL(TInt aIndex);
       
   278 
       
   279     /**
       
   280      * to wrapper the delete leaving
       
   281      */
       
   282     TInt DeleteOneSongHistoryL(TInt aIndex);
   268 
   283 
   269 	/**
   284 	/**
   270 	* Data-structure to hold unique channel info
   285 	* Data-structure to hold unique channel info
   271 	*/
   286 	*/
   272 	class CIRChannelInfo : public CBase
   287 	class CIRChannelInfo : public CBase