phonebookengines/VirtualPhonebook/VPbkSimStore/src/CRemoteView.cpp
changeset 0 e686773b3f54
child 23 5586b4d2ec3e
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  The remote sim view implementation
       
    15 *  Version     : %version: he1s60#21.1.3 %
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 // INCLUDE FILES
       
    22 #include "CRemoteView.h"
       
    23 
       
    24 // From Virtual Phonebook
       
    25 #include "CRemoteStore.h"
       
    26 #include "VPbkSimStoreError.h"
       
    27 #include <MVPbkSimViewObserver.h>
       
    28 #include <VPbkSimServerOpCodes.h>
       
    29 #include <CVPbkSimContactBuf.h>
       
    30 #include <CVPbkAsyncOperation.h>
       
    31 #include <CVPbkAsyncCallback.h>
       
    32 #include <CVPbkSimFieldTypeFilter.h>
       
    33 #include <MVPbkSimViewFindObserver.h>
       
    34 #include <VPbkSimStoreTemplateFunctions.h>
       
    35 
       
    36 #include <s32mem.h>
       
    37 
       
    38 namespace VPbkSimStore {
       
    39 
       
    40 inline void SendEvent(
       
    41     RPointerArray<MVPbkSimViewObserver>& aObservers,
       
    42     void ( MVPbkSimViewObserver::*aEvent )( MVPbkSimCntView& ),
       
    43     CRemoteView& aThis )
       
    44     {
       
    45     for ( TInt i = aObservers.Count() - 1; i >= 0; --i )
       
    46         {
       
    47         ( aObservers[i]->*aEvent )( aThis );
       
    48         }    
       
    49     }
       
    50     
       
    51 inline void SendEvent(
       
    52     RPointerArray<MVPbkSimViewObserver>& aObservers,
       
    53     void ( MVPbkSimViewObserver::*aEvent )( MVPbkSimCntView&, TInt ),
       
    54     CRemoteView& aThis,
       
    55     TInt aParam )
       
    56     {
       
    57     for ( TInt i = aObservers.Count() - 1; i >= 0; --i )
       
    58         {
       
    59         ( aObservers[i]->*aEvent )( aThis, aParam );
       
    60         }    
       
    61     }
       
    62     
       
    63 inline void SendEvent(
       
    64     RPointerArray<MVPbkSimViewObserver>& aObservers,
       
    65     void ( MVPbkSimViewObserver::*aEvent )
       
    66         ( MVPbkSimViewObserver::TEvent, TInt, TInt ),
       
    67     MVPbkSimViewObserver::TEvent aEventType,
       
    68     TInt aParam1,
       
    69     TInt aParam2 )
       
    70     {
       
    71     for ( TInt i = aObservers.Count() - 1; i >= 0; --i )
       
    72         {
       
    73         ( aObservers[i]->*aEvent )( aEventType, aParam1, aParam2 );
       
    74         }    
       
    75     }
       
    76 
       
    77 
       
    78 // ============================ MEMBER FUNCTIONS ============================
       
    79 // --------------------------------------------------------------------------
       
    80 // CRemoteView::CViewFindOperation::CViewFindOperation
       
    81 // C++ default constructor can NOT contain any code, that
       
    82 // might leave.
       
    83 // --------------------------------------------------------------------------
       
    84 //
       
    85 CRemoteView::CViewFindOperation::CViewFindOperation( 
       
    86 	    const MDesCArray& aFindStrings,             
       
    87         MVPbkSimViewFindObserver& aObserver,
       
    88         RVPbkSimCntView& aSimCntViewSession,
       
    89         MVPbkSimCntView& aSimCntView ):
       
    90     CActive( EPriorityStandard ),
       
    91     iFindStrings( aFindStrings ),
       
    92     iObserver( aObserver ),
       
    93     iSimCntViewSession( aSimCntViewSession ),
       
    94     iSimCntView(aSimCntView),
       
    95     iSimMatchResultBufPtr( NULL, 0 )
       
    96     {
       
    97     }
       
    98 
       
    99 // --------------------------------------------------------------------------
       
   100 // CRemoteView::CViewFindOperation::ConstructL
       
   101 // Symbian 2nd phase constructor can leave.
       
   102 // --------------------------------------------------------------------------
       
   103 //
       
   104 void CRemoteView::CViewFindOperation::ConstructL()
       
   105     {
       
   106     CActiveScheduler::Add( this );           
       
   107     }
       
   108 
       
   109 // --------------------------------------------------------------------------
       
   110 // CRemoteView::CViewFindOperation::NewL
       
   111 // Two-phased constructor.
       
   112 // --------------------------------------------------------------------------
       
   113 //
       
   114 CRemoteView::CViewFindOperation* CRemoteView::CViewFindOperation::NewL( 
       
   115         const MDesCArray& aFindStrings, 
       
   116         MVPbkSimViewFindObserver& aObserver,
       
   117         RVPbkSimCntView& aSimCntViewSession,
       
   118         MVPbkSimCntView& aSimCntView )
       
   119     {
       
   120     CViewFindOperation* self = 
       
   121         new( ELeave ) CViewFindOperation( aFindStrings, aObserver, 
       
   122                                           aSimCntViewSession, aSimCntView );
       
   123     CleanupStack::PushL( self );
       
   124     self->ConstructL();
       
   125     CleanupStack::Pop( self );
       
   126     return self;
       
   127     }
       
   128 
       
   129 // Destructor
       
   130 CRemoteView::CViewFindOperation::~CViewFindOperation()
       
   131     {
       
   132     Cancel();    
       
   133     delete iSimMatchResultBuf;
       
   134     }
       
   135 
       
   136 // --------------------------------------------------------------------------
       
   137 // CRemoteView::CViewFindOperation::ActivateL
       
   138 // --------------------------------------------------------------------------
       
   139 //
       
   140 void CRemoteView::CViewFindOperation::ActivateL()
       
   141     {
       
   142     SetActive();
       
   143     iSimCntViewSession.ContactMatchingPrefixL( iFindStrings, 
       
   144                                                iResultBufferSize, 
       
   145                                                iStatus );    
       
   146     }
       
   147 
       
   148 // --------------------------------------------------------------------------
       
   149 // CRemoteView::CViewFindOperation::RunL
       
   150 // --------------------------------------------------------------------------
       
   151 //
       
   152 void CRemoteView::CViewFindOperation::RunL()
       
   153     {
       
   154     RVPbkStreamedIntArray matchedIndexes;
       
   155     CleanupClosePushL( matchedIndexes );
       
   156 
       
   157     TInt result = iStatus.Int();
       
   158     switch ( result )
       
   159         {
       
   160         case KErrNone:
       
   161             {    
       
   162             //Delete old buffer        
       
   163             if ( iSimMatchResultBuf )
       
   164                 {
       
   165                 delete iSimMatchResultBuf;
       
   166                 iSimMatchResultBuf = NULL;
       
   167                 }
       
   168             
       
   169             //Create buffer
       
   170             iSimMatchResultBuf = HBufC8::NewL( iResultBufferSize );
       
   171             iSimMatchResultBufPtr.Set( iSimMatchResultBuf->Des() );                
       
   172               
       
   173             //Get contact matching results
       
   174             iSimCntViewSession.ContactMatchingResultL( iSimMatchResultBufPtr );
       
   175                             
       
   176             //Unpack results
       
   177             RDesReadStream stream( iSimMatchResultBufPtr );
       
   178             CleanupClosePushL( stream );
       
   179             matchedIndexes.InternalizeL( stream );
       
   180             CleanupStack::PopAndDestroy(); // stream
       
   181                         
       
   182             iObserver.ViewFindCompleted( iSimCntView, matchedIndexes );            
       
   183             break;
       
   184             }            
       
   185         default:
       
   186             {
       
   187             iObserver.ViewFindError( iSimCntView, result );
       
   188             break;
       
   189             }
       
   190         }
       
   191     CleanupStack::PopAndDestroy(); // matchedIndexes
       
   192     }
       
   193   
       
   194 // --------------------------------------------------------------------------
       
   195 // CRemoteView::CViewFindOperation::DoCancel
       
   196 // --------------------------------------------------------------------------
       
   197 //
       
   198 void CRemoteView::CViewFindOperation::DoCancel()
       
   199     {
       
   200     iSimCntViewSession.CancelAsyncRequest( EVPbkSimSrvContactMatchingPrefix );
       
   201     }
       
   202 
       
   203 // --------------------------------------------------------------------------
       
   204 // CRemoteView::CViewFindOperation::RunError
       
   205 // --------------------------------------------------------------------------
       
   206 //
       
   207 TInt CRemoteView::CViewFindOperation::RunError( TInt aError )
       
   208     {
       
   209     iObserver.ViewFindError( iSimCntView, aError );
       
   210     return KErrNone;
       
   211     }    
       
   212 
       
   213 // --------------------------------------------------------------------------
       
   214 // CRemoteView::CRemoteView
       
   215 // C++ default constructor can NOT contain any code, that
       
   216 // might leave.
       
   217 // --------------------------------------------------------------------------
       
   218 //
       
   219 CRemoteView::CRemoteView( CRemoteStore& aStore,
       
   220         TVPbkSimViewConstructionPolicy aConstructionPolicy,
       
   221         CVPbkSimFieldTypeFilter* aFilter ) :
       
   222             CActive( EPriorityStandard ),
       
   223             iStore( aStore ),
       
   224             iConstructionPolicy( aConstructionPolicy ),
       
   225             iFilter( aFilter )
       
   226     {
       
   227     }
       
   228 
       
   229 // --------------------------------------------------------------------------
       
   230 // CRemoteView::~CRemoteView
       
   231 // Destructor
       
   232 // --------------------------------------------------------------------------
       
   233 // 
       
   234 CRemoteView::~CRemoteView()
       
   235     {
       
   236     delete iObserverOp;
       
   237     iObservers.Reset();
       
   238     iSortOrder.Close();
       
   239     iStore.RemoveObserver( *this );
       
   240     Cancel();
       
   241     delete iCurrentContact;
       
   242     iSimView.Close();
       
   243     delete iViewName;
       
   244     delete iFilter;
       
   245     }
       
   246 
       
   247 // --------------------------------------------------------------------------
       
   248 // CRemoteView::NewLC
       
   249 // Two-phased constructor.
       
   250 // --------------------------------------------------------------------------
       
   251 //
       
   252 CRemoteView* CRemoteView::NewL( CRemoteStore& aStore,
       
   253         const RVPbkSimFieldTypeArray& aSortOrder, 
       
   254         TVPbkSimViewConstructionPolicy aConstructionPolicy,
       
   255         const TDesC& aViewName,
       
   256         CVPbkSimFieldTypeFilter* aFilter )
       
   257     {
       
   258     CRemoteView* self = 
       
   259         new( ELeave ) CRemoteView( aStore, aConstructionPolicy, aFilter );
       
   260     CleanupStack::PushL( self );
       
   261     self->ConstructL( aSortOrder, aViewName );
       
   262     CleanupStack::Pop( self );
       
   263     return self;
       
   264     }
       
   265 
       
   266 // --------------------------------------------------------------------------
       
   267 // CRemoteView::ConstructL
       
   268 // Symbian 2nd phase constructor can leave.
       
   269 // --------------------------------------------------------------------------
       
   270 //
       
   271 void CRemoteView::ConstructL( const RVPbkSimFieldTypeArray& aSortOrder,
       
   272     const TDesC& aViewName )
       
   273     {
       
   274     CActiveScheduler::Add( this );
       
   275     SetSortOrderL( aSortOrder );
       
   276     iViewName = aViewName.AllocL();
       
   277     iCurrentContact = CVPbkSimContactBuf::NewL( iStore );
       
   278     iStore.AddObserverL( *this );
       
   279     iObserverOp = CVPbkAsyncObjectOperation<MVPbkSimViewObserver>::NewL();
       
   280     }
       
   281 
       
   282 
       
   283 // --------------------------------------------------------------------------
       
   284 // CRemoteView::RunL
       
   285 // --------------------------------------------------------------------------
       
   286 //
       
   287 void CRemoteView::RunL()
       
   288     {
       
   289     if ( iStatus == KErrNone )
       
   290         {
       
   291         switch ( iEventData.iEvent )
       
   292             {   
       
   293             case EVPbkSimViewOpen:
       
   294                 {
       
   295                 SendEvent(iObservers, &MVPbkSimViewObserver::ViewReady, *this);
       
   296                 break;
       
   297                 }
       
   298             case EVPbkSimViewNotAvailable:
       
   299                 {
       
   300                 SendEvent(iObservers, &MVPbkSimViewObserver::ViewNotAvailable, *this);
       
   301                 break;
       
   302                 }
       
   303             case EVPbkSimContactAdded:
       
   304                 {
       
   305                 SendEvent(iObservers, &MVPbkSimViewObserver::ViewContactEvent, 
       
   306                           MVPbkSimViewObserver::EContactAdded, 
       
   307                           iEventData.iData, iEventData.iOpData );
       
   308                 break;
       
   309                 }
       
   310             case EVPbkSimContactDeleted:
       
   311                 {
       
   312                 SendEvent(iObservers, &MVPbkSimViewObserver::ViewContactEvent, 
       
   313                           MVPbkSimViewObserver::EContactDeleted, 
       
   314                           iEventData.iData, iEventData.iOpData );
       
   315                 break;
       
   316                 }
       
   317             case EVPbkSimViewError:
       
   318                 {
       
   319                 SendEvent(iObservers, &MVPbkSimViewObserver::ViewError, 
       
   320                           *this, iEventData.iOpData );
       
   321                 break;
       
   322                 }
       
   323             case EVPbkSimUnknown: // FALLTHROUGH
       
   324             default:
       
   325                 {
       
   326                 __ASSERT_DEBUG( EFalse, VPbkSimStore::Panic( 
       
   327                     VPbkSimStore::EUnknownViewEventFromServer ) );
       
   328                 SendEvent(iObservers, &MVPbkSimViewObserver::ViewError, 
       
   329                           *this, KErrUnknown );
       
   330                 break;
       
   331                 }
       
   332             }
       
   333         }
       
   334     else
       
   335         {
       
   336         SendEvent(iObservers, &MVPbkSimViewObserver::ViewError, 
       
   337                   *this, iStatus.Int() );
       
   338         }
       
   339 
       
   340     ActivateViewNotification();
       
   341     }
       
   342 
       
   343 // --------------------------------------------------------------------------
       
   344 // CRemoteView::DoCancel
       
   345 // --------------------------------------------------------------------------
       
   346 //
       
   347 void CRemoteView::DoCancel()
       
   348     {
       
   349     iSimView.CancelAsyncRequest( EVPbkSimSrvViewEventNotification );
       
   350     }
       
   351 
       
   352 // --------------------------------------------------------------------------
       
   353 // CRemoteView::Name
       
   354 // --------------------------------------------------------------------------
       
   355 //
       
   356 const TDesC& CRemoteView::Name() const
       
   357     {
       
   358     return *iViewName;
       
   359     }
       
   360     
       
   361 // --------------------------------------------------------------------------
       
   362 // CRemoteView::ParentStore
       
   363 // --------------------------------------------------------------------------
       
   364 //
       
   365 MVPbkSimCntStore& CRemoteView::ParentStore() const
       
   366     {
       
   367     return iStore;
       
   368     }
       
   369 
       
   370 // --------------------------------------------------------------------------
       
   371 // CRemoteView::OpenL
       
   372 // --------------------------------------------------------------------------
       
   373 //
       
   374 void CRemoteView::OpenL( MVPbkSimViewObserver& aObserver )
       
   375     {
       
   376     TInt index = iObservers.Find(&aObserver);
       
   377     __ASSERT_DEBUG( index == KErrNotFound, 
       
   378         Panic( ERemoteViewObserverAlreadySet ) );
       
   379     iObservers.AppendL(&aObserver);
       
   380     
       
   381     // Open view subsession only if the store has been opened
       
   382     // This is actually called only from CContactView::ConstructL so
       
   383     // it's called only once -> not need to make else-clause for async
       
   384     if ( iStore.IsOpen() && !iSimView.SubSessionHandle())
       
   385         {
       
   386         iSimView.OpenL( iStore.StoreSession(), iSortOrder, iConstructionPolicy, 
       
   387             *iViewName, iFilter );
       
   388         ActivateViewNotification();
       
   389         }
       
   390     else
       
   391         {
       
   392         // Complete with "View unavailable" event
       
   393         CVPbkAsyncObjectCallback<MVPbkSimViewObserver>* callback =
       
   394             VPbkEngUtils::CreateAsyncObjectCallbackLC(
       
   395                 *this, 
       
   396                 &CRemoteView::DoViewUnavailableL,
       
   397                 &CRemoteView::DoViewUnavailableError,
       
   398                 aObserver );
       
   399         
       
   400         iObserverOp->CallbackL( callback );
       
   401         CleanupStack::Pop( callback ); // openCallback
       
   402         }
       
   403     }
       
   404 
       
   405 // --------------------------------------------------------------------------
       
   406 // CRemoteView::Close
       
   407 // --------------------------------------------------------------------------
       
   408 //
       
   409 void CRemoteView::Close( MVPbkSimViewObserver& aObserver )
       
   410     {
       
   411     // Cancel the possible call back
       
   412     iObserverOp->CancelCallback( &aObserver );
       
   413     
       
   414     // Remove from the observer list
       
   415     TInt index = iObservers.Find(&aObserver);
       
   416     if (index != KErrNotFound)
       
   417         {
       
   418         iObservers.Remove(index);
       
   419         }
       
   420     
       
   421     // If it was the last user then close the connection to the server.
       
   422     if (iObservers.Count() == 0)
       
   423         {
       
   424         Cancel();
       
   425         iSimView.Close();
       
   426         }
       
   427     }
       
   428         
       
   429 // --------------------------------------------------------------------------
       
   430 // CRemoteView::CountL
       
   431 // --------------------------------------------------------------------------
       
   432 // 
       
   433 TInt CRemoteView::CountL() const
       
   434     {
       
   435     return iSimView.CountL();
       
   436     }
       
   437 
       
   438 // --------------------------------------------------------------------------
       
   439 // CRemoteView::ContactAtL
       
   440 // --------------------------------------------------------------------------
       
   441 // 
       
   442 MVPbkSimContact& CRemoteView::ContactAtL( TInt aIndex )
       
   443     {
       
   444     iCurrentContact->SetL( iSimView.ContactAtL( aIndex ) );
       
   445     return *iCurrentContact;
       
   446     }
       
   447 
       
   448 // --------------------------------------------------------------------------
       
   449 // CRemoteView::ChangeSortOrderL
       
   450 // --------------------------------------------------------------------------
       
   451 // 
       
   452 void CRemoteView::ChangeSortOrderL( const RVPbkSimFieldTypeArray& aSortOrder )
       
   453     {
       
   454     if ( iSimView.SubSessionHandle() ) 
       
   455         {
       
   456         SetSortOrderL( aSortOrder );
       
   457         iSimView.ChangeSortOrderL( aSortOrder );        
       
   458         }
       
   459     }
       
   460 
       
   461 // --------------------------------------------------------------------------
       
   462 // CRemoteView::MapSimIndexToViewIndexL
       
   463 // --------------------------------------------------------------------------
       
   464 // 
       
   465 TInt CRemoteView::MapSimIndexToViewIndexL( TInt aSimIndex )
       
   466     {
       
   467     return iSimView.FindViewIndexL( aSimIndex );
       
   468     }
       
   469 
       
   470 // --------------------------------------------------------------------------
       
   471 // CRemoteView::ContactMatchingPrefixL
       
   472 // --------------------------------------------------------------------------
       
   473 //     
       
   474 MVPbkSimStoreOperation* CRemoteView::ContactMatchingPrefixL(
       
   475         const MDesCArray& aFindStrings, 
       
   476         MVPbkSimViewFindObserver& aObserver )
       
   477     {    
       
   478     CViewFindOperation* operation = CViewFindOperation::NewL(
       
   479         aFindStrings, aObserver, iSimView, *this );
       
   480     operation->ActivateL();
       
   481     return operation;
       
   482     }
       
   483 
       
   484 // --------------------------------------------------------------------------
       
   485 // CRemoteView::SortOrderL
       
   486 // --------------------------------------------------------------------------
       
   487 //
       
   488 const RVPbkSimFieldTypeArray& CRemoteView::SortOrderL() const
       
   489     {
       
   490     HBufC8* sortOrder = iSimView.SortOrderL();
       
   491     CleanupStack::PushL( sortOrder );
       
   492     RDesReadStream readStream( *sortOrder );
       
   493     readStream.PushL();
       
   494     iSortOrder.Reset();
       
   495     readStream >> iSortOrder;
       
   496     CleanupStack::PopAndDestroy( &readStream );
       
   497     CleanupStack::PopAndDestroy( sortOrder );
       
   498     return iSortOrder;
       
   499     }
       
   500     
       
   501 // --------------------------------------------------------------------------
       
   502 // CRemoteView::MapSimIndexToViewIndexL
       
   503 // --------------------------------------------------------------------------
       
   504 //
       
   505 void CRemoteView::StoreReady( MVPbkSimCntStore& /*aStore*/ )
       
   506     {
       
   507     if ( !iSimView.SubSessionHandle() )
       
   508         {
       
   509         TRAPD( result, iSimView.OpenL( iStore.StoreSession(), iSortOrder, 
       
   510             iConstructionPolicy, *iViewName, iFilter ) );
       
   511         if (result != KErrNone)
       
   512             {
       
   513             SendEvent(iObservers, &MVPbkSimViewObserver::ViewError, 
       
   514                       *this, result );
       
   515             }
       
   516         ActivateViewNotification();
       
   517         // Cancel any ongoing "View unavailable" events
       
   518         iObserverOp->Purge();
       
   519         }
       
   520     }
       
   521 
       
   522 // --------------------------------------------------------------------------
       
   523 // CRemoteView::StoreError
       
   524 // --------------------------------------------------------------------------
       
   525 //
       
   526 void CRemoteView::StoreError( MVPbkSimCntStore& /*aStore*/, TInt aError )
       
   527     {
       
   528     // Cancel any ongoing view events
       
   529     iObserverOp->Purge();
       
   530     SendEvent(iObservers, &MVPbkSimViewObserver::ViewError, 
       
   531               *this, aError );
       
   532     }
       
   533 
       
   534 // --------------------------------------------------------------------------
       
   535 // CRemoteView::StoreNotAvailable
       
   536 // --------------------------------------------------------------------------
       
   537 //
       
   538 void CRemoteView::StoreNotAvailable( MVPbkSimCntStore& /*aStore*/ )
       
   539     {
       
   540     // Cancel any ongoing view events
       
   541     iObserverOp->Purge();
       
   542     SendEvent(iObservers, &MVPbkSimViewObserver::ViewNotAvailable, *this);
       
   543     }
       
   544 
       
   545 // --------------------------------------------------------------------------
       
   546 // CRemoteView::StoreNotAvailable
       
   547 // --------------------------------------------------------------------------
       
   548 //
       
   549 void CRemoteView::StoreContactEvent( TEvent /*aEvent*/, TInt /*aSimIndex*/ )
       
   550     {
       
   551     
       
   552     }
       
   553 
       
   554 // --------------------------------------------------------------------------
       
   555 // CRemoteView::ActivateViewNotification
       
   556 // --------------------------------------------------------------------------
       
   557 // 
       
   558 void CRemoteView::ActivateViewNotification()
       
   559     {
       
   560     if ( !IsActive() && iSimView.SubSessionHandle() )
       
   561         {
       
   562         iSimView.ListenToViewEvents( iStatus, iEventData );
       
   563         SetActive();
       
   564         }
       
   565     }
       
   566 
       
   567 // --------------------------------------------------------------------------
       
   568 // CRemoteView::SetSortOrderL
       
   569 // --------------------------------------------------------------------------
       
   570 // 
       
   571 void CRemoteView::SetSortOrderL( const RVPbkSimFieldTypeArray& aSortOrder )
       
   572     {
       
   573     iSortOrder.Reset();
       
   574     const TInt count = aSortOrder.Count();
       
   575     for ( TInt i = 0; i < count; ++i )
       
   576         {
       
   577         iSortOrder.AppendL( aSortOrder[i] );
       
   578         }
       
   579     }
       
   580 
       
   581 // --------------------------------------------------------------------------
       
   582 // CRemoteView::IssueRequest
       
   583 // --------------------------------------------------------------------------
       
   584 // 
       
   585 void CRemoteView::IssueRequest( TInt aError )
       
   586     {
       
   587     TRequestStatus* status = &iStatus;
       
   588     User::RequestComplete(status, aError);
       
   589     SetActive();
       
   590     }
       
   591 
       
   592 // --------------------------------------------------------------------------
       
   593 // CRemoteView::DoViewUnavailableL
       
   594 // --------------------------------------------------------------------------
       
   595 // 
       
   596 void CRemoteView::DoViewUnavailableL( MVPbkSimViewObserver& aObserver )
       
   597     {
       
   598     aObserver.ViewNotAvailable( *this );
       
   599     }
       
   600 
       
   601 // --------------------------------------------------------------------------
       
   602 // CRemoteView::DoViewUnavailableError
       
   603 // --------------------------------------------------------------------------
       
   604 // 
       
   605 void CRemoteView::DoViewUnavailableError( MVPbkSimViewObserver& aObserver, 
       
   606         TInt aError )
       
   607     {
       
   608     aObserver.ViewError( *this, aError );
       
   609     }
       
   610 } // namespace VPbkSimStore
       
   611 
       
   612 //  End of File