qtinternetradio/irqisdsclient/src/irqisdsclient.cpp
changeset 3 ee64f059b8e1
parent 0 09774dfdd46b
child 5 0930554dc389
equal deleted inserted replaced
2:2e1adbfc62af 3:ee64f059b8e1
    18 #include "irqisdsclientimpl.h"   
    18 #include "irqisdsclientimpl.h"   
    19  
    19  
    20 //Static function
    20 //Static function
    21 //to get an instance of the IRQIsdsClient
    21 //to get an instance of the IRQIsdsClient
    22 //@return IRQIsdsClient *
    22 //@return IRQIsdsClient *
    23 EXPORT_C IRQIsdsClient *IRQIsdsClient::openInstance(IRQFavoritesDB *aFavPresets)
    23 EXPORT_C IRQIsdsClient *IRQIsdsClient::openInstance()
    24 {
    24 {
    25     if (NULL == aFavPresets)
       
    26         return NULL;
       
    27 
       
    28     IRQIsdsClient* irqisdsclient =
    25     IRQIsdsClient* irqisdsclient =
    29             reinterpret_cast<IRQIsdsClient*> (Dll::Tls());
    26             reinterpret_cast<IRQIsdsClient*> (Dll::Tls());
    30 
    27 
    31     if (NULL == irqisdsclient)
    28     if (NULL == irqisdsclient)
    32     {
    29     {
    33         irqisdsclient = new IRQIsdsClient(aFavPresets);
    30         irqisdsclient = new IRQIsdsClient();
    34         int result = 0;
    31         int result = 0;
    35         result = Dll::SetTls(irqisdsclient); 
    32         result = Dll::SetTls(irqisdsclient); 
    36         
    33         
    37         if( KErrNone != result )
    34         if( KErrNone != result )
    38         {
    35         {
   122 
   119 
   123 //to syncronize presets
   120 //to syncronize presets
   124 //@param int,QString, the preset id and the last modified tag for the preset   
   121 //@param int,QString, the preset id and the last modified tag for the preset   
   125 //
   122 //
   126 EXPORT_C int IRQIsdsClient::isdsSyncPreset(int aPresetId,
   123 EXPORT_C int IRQIsdsClient::isdsSyncPreset(int aPresetId,
   127         const QString& aIfModifySince)
   124         const QString& aIfModifySince, IRQFavoritesDB *aFavPresets)
   128 {     
   125 {     
   129     TInt result = 0;
   126     TInt result = 0;
   130     result = iImpl->isdsSyncPresetImpl(aPresetId, aIfModifySince);
   127     result = iImpl->isdsSyncPresetImpl(aPresetId, aIfModifySince, aFavPresets);
   131     return result;
   128     return result;
   132 } 
   129 } 
   133 
   130 
   134 //Cacel the request sent by the UI.
   131 //Cacel the request sent by the UI.
   135 //@param None
   132 //@param None
   236 {    
   233 {    
   237     delete iImpl;
   234     delete iImpl;
   238 }
   235 }
   239 
   236 
   240 
   237 
   241 IRQIsdsClient::IRQIsdsClient(IRQFavoritesDB *aFavPresets)
   238 IRQIsdsClient::IRQIsdsClient()
   242 {    
   239 {    
   243     iImpl = new IRQIsdsClientImpl(aFavPresets); 
   240     iImpl = new IRQIsdsClientImpl(); 
   244     Q_ASSERT(iImpl);
   241     Q_ASSERT(iImpl);
   245     
   242     
   246     connect(iImpl, SIGNAL(categoryItemsChangedImpl(QList<IRQBrowseCategoryItem *> *)),
   243     connect(iImpl, SIGNAL(categoryItemsChangedImpl(QList<IRQBrowseCategoryItem *> *)),
   247                 this, SIGNAL(categoryItemsChanged(QList<IRQBrowseCategoryItem *> *)));
   244                 this, SIGNAL(categoryItemsChanged(QList<IRQBrowseCategoryItem *> *)));
   248     
   245