idlefw/plugins/sapidataplugin/src/sapidata.cpp
branchRCL_3
changeset 15 a0713522ab97
parent 14 15e4dd19031c
child 16 b276298d5729
equal deleted inserted replaced
14:15e4dd19031c 15:a0713522ab97
   120 	delete iContentId;
   120 	delete iContentId;
   121 	delete iStartupReason;
   121 	delete iStartupReason;
   122 	
   122 	
   123 	if(iPubObserver)
   123 	if(iPubObserver)
   124 		{
   124 		{
   125 		TRAP_IGNORE(iPubObserver->ReleaseL() );
       
   126 		delete iPubObserver;
   125 		delete iPubObserver;
   127 		iPubObserver = NULL;
   126 		iPubObserver = NULL;
   128 		}
   127 		}
   129     if(iContentObserver)
   128     if(iContentObserver)
   130         {
   129         {
   131         TRAP_IGNORE(iContentObserver->ReleaseL() );
       
   132         delete iContentObserver;
   130         delete iContentObserver;
   133         iContentObserver = NULL;
   131         iContentObserver = NULL;
   134         }
   132         }
   135     if( iInterface )
   133     if( iInterface )
   136          {
   134          {
       
   135          // This will also release all the registered observers
   137          iInterface->Close();
   136          iInterface->Close();
   138          iInterface = NULL;
   137          iInterface = NULL;
   139          }
   138          }
   140     if( iServiceHandler )
   139     if( iServiceHandler )
   141          {
   140          {
   672 void CSapiData::RegisterPublisherObserverL()
   671 void CSapiData::RegisterPublisherObserverL()
   673     {
   672     {
   674     if ( iItemCount > 0)
   673     if ( iItemCount > 0)
   675     	{
   674     	{
   676 		CLiwDefaultMap* pubRegFilter = CreateFilterLC( KAll(), KAll() );
   675 		CLiwDefaultMap* pubRegFilter = CreateFilterLC( KAll(), KAll() );
   677 		pubRegFilter->InsertL( KOperation, TLiwVariant( KUpdate ) );
   676 		pubRegFilter->InsertL( KOperation, TLiwVariant( KAddUpdate ) );
   678 		iPubObserver->RegisterL( pubRegFilter, KPubData() );
   677 		iPubObserver->RegisterL( pubRegFilter, KPubData() );
   679 		CleanupStack::PopAndDestroy( pubRegFilter );
   678 		CleanupStack::PopAndDestroy( pubRegFilter );
   680 		}
   679 		}
   681     }
   680     }
   682 
   681 
   755         }
   754         }
   756     
   755     
   757     CLiwGenericParamList* inParamList  = &iServiceHandler->InParamListL();
   756     CLiwGenericParamList* inParamList  = &iServiceHandler->InParamListL();
   758     CLiwGenericParamList* outParamList = &iServiceHandler->OutParamListL();
   757     CLiwGenericParamList* outParamList = &iServiceHandler->OutParamListL();
   759     
   758     
   760     TLiwGenericParam pluginId( KPluginId, TLiwVariant( iContentId ) );
       
   761     inParamList->AppendL( pluginId );
       
   762     TLiwGenericParam type( KType, TLiwVariant( KPubData ) );
   759     TLiwGenericParam type( KType, TLiwVariant( KPubData ) );
   763     inParamList->AppendL( type );
   760     inParamList->AppendL( type );
   764      
   761      
   765     CLiwDefaultMap* filter = CreateFilterLC( KWidget() );
   762     CLiwDefaultMap* filter = CreateFilterLC( KWidget() );
   766     // add list of action triggers to execute
   763     // add list of action triggers to execute