idlefw/plugins/sapidataplugin/src/sapidataobserver.cpp
branchRCL_3
changeset 64 b276298d5729
parent 59 a0713522ab97
child 74 edd621764147
equal deleted inserted replaced
59:a0713522ab97 64:b276298d5729
    36 // Destructor
    36 // Destructor
    37 // ---------------------------------------------------------------------------
    37 // ---------------------------------------------------------------------------
    38 //
    38 //
    39 CSapiDataObserver ::~CSapiDataObserver ()
    39 CSapiDataObserver ::~CSapiDataObserver ()
    40     {
    40     {
       
    41     TRAP_IGNORE( ReleaseL() );
    41     iInterface = NULL;
    42     iInterface = NULL;
    42     iData = NULL;
    43     iData = NULL;
    43     }
    44     }
    44 
    45 
    45 // ---------------------------------------------------------------------------
    46 // ---------------------------------------------------------------------------
    63                 0,
    64                 0,
    64                 this ) );
    65                 this ) );
    65     
    66     
    66     CleanupStack::PopAndDestroy( outParamList );
    67     CleanupStack::PopAndDestroy( outParamList );
    67     CleanupStack::PopAndDestroy( inParamList ); 
    68     CleanupStack::PopAndDestroy( inParamList ); 
       
    69     }
       
    70 
       
    71 // ---------------------------------------------------------------------------
       
    72 // Sing off to notification
       
    73 // ---------------------------------------------------------------------------
       
    74 //
       
    75 void CSapiDataObserver::ReleaseL()
       
    76     {
       
    77     if( iInterface )
       
    78         {
       
    79         CLiwGenericParamList* inParamList = CLiwGenericParamList::NewL();
       
    80         CleanupStack::PushL( inParamList );
       
    81         CLiwGenericParamList* outParamList = CLiwGenericParamList::NewL();
       
    82         CleanupStack::PushL( outParamList );
       
    83         
       
    84         TRAP_IGNORE( iInterface->ExecuteCmdL( KRequestNotification,
       
    85                 *inParamList,
       
    86                 *outParamList,
       
    87                 KLiwOptCancel,
       
    88                 this ));
       
    89         
       
    90         CleanupStack::PopAndDestroy( outParamList );
       
    91         CleanupStack::PopAndDestroy( inParamList );
       
    92         }
    68     }
    93     }
    69 
    94 
    70 // ---------------------------------------------------------------------------
    95 // ---------------------------------------------------------------------------
    71 // Factory method construction
    96 // Factory method construction
    72 // ---------------------------------------------------------------------------
    97 // ---------------------------------------------------------------------------