locationsystemui/locationsysui/privacyverifiernotifierui/locverifier/src/lpdverifierplugin.cpp
branchRCL_3
changeset 44 2b4ea9893b66
equal deleted inserted replaced
42:02ba3f1733c6 44:2b4ea9893b66
       
     1 /*
       
     2  * Copyright (c) 2010 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:  Verifier plug-in which derives from CPosPrivacyNotifier.
       
    15  *
       
    16  */
       
    17 
       
    18 // INCLUDE FILES
       
    19 
       
    20 #include "lpdverifierplugin.h"
       
    21 
       
    22 #include "lpdrequestao.h"
       
    23 #include "lpdrequestorprocessor.h"
       
    24 #include "lpdverifierquerylauncher.h"
       
    25 #include "lpdnotifierquerylauncher.h"
       
    26 #include "locverifierdlgdebug.h"
       
    27 #include "locutilsdebug.h"
       
    28 
       
    29 #include <eiknotapi.h>
       
    30 #include <lbs/epos_rposrequestorstack.h>
       
    31 #include <epos_csuplsettingsconstants.h>
       
    32 
       
    33 // INCLUDE FILES
       
    34 #include <s32mem.h>
       
    35 
       
    36 
       
    37 
       
    38 const TInt KPrivSrvSecureId = 0x10281D45;
       
    39 // CONSTANTS
       
    40 
       
    41 // Unnamed namespace for local definitions
       
    42 
       
    43 const MEikSrvNotifierBase2::TNotifierPriority KNotifierPriority =
       
    44         MEikSrvNotifierBase2::ENotifierPriorityHigh;
       
    45 const TUid KNotifierChannel =
       
    46     {
       
    47     0x100065ac
       
    48     };
       
    49 #ifdef _DEBUG
       
    50 _LIT( KPanicText, "CLpdVerifierPlugin" );
       
    51 enum TPanicCode
       
    52     {
       
    53     KLpdErrGeneral = 1
       
    54     };
       
    55 #endif
       
    56 
       
    57 // ============================ MEMBER FUNCTIONS ===============================
       
    58 
       
    59 // -----------------------------------------------------------------------------
       
    60 // CLpdVerifierPlugin::CLpdVerifierPlugin
       
    61 // C++ default constructor can NOT contain any code, that
       
    62 // might leave.
       
    63 // -----------------------------------------------------------------------------
       
    64 //
       
    65 CLpdVerifierPlugin::CLpdVerifierPlugin() :
       
    66     iCurrentRequest(KPosNullQNRequestId)
       
    67 
       
    68     {
       
    69     
       
    70     }
       
    71 
       
    72 // -----------------------------------------------------------------------------
       
    73 // CLpdVerifierPlugin::ConstructL
       
    74 // Symbian 2nd phase constructor can leave.
       
    75 // -----------------------------------------------------------------------------
       
    76 //
       
    77 void CLpdVerifierPlugin::ConstructL()
       
    78     {
       
    79     LOCVERIFIERDLGDEBUG( "+CLpdVerifierPlugin::ConstructL" );
       
    80     BaseConstructL(KNotifierChannel, KNotifierPriority);
       
    81   
       
    82     iRtorProcessor = CLpdRequestorProcessor::NewL();
       
    83     LOCVERIFIERDLGDEBUG( "-CLpdVerifierPlugin::ConstructL" );    	
       
    84     }
       
    85 
       
    86 // -----------------------------------------------------------------------------
       
    87 // CLpdVerifierPlugin::NewL
       
    88 // Two-phased constructor.
       
    89 // -----------------------------------------------------------------------------
       
    90 //
       
    91 CLpdVerifierPlugin* CLpdVerifierPlugin::NewL()
       
    92     {
       
    93      LOCVERIFIERDLGDEBUG( "+CLpdVerifierPlugin::NewL" );
       
    94     CLpdVerifierPlugin* self = new (ELeave) CLpdVerifierPlugin;
       
    95 
       
    96     CleanupStack::PushL(self);
       
    97     self->ConstructL();
       
    98     CleanupStack::Pop(self);
       
    99      LOCVERIFIERDLGDEBUG( "-CLpdVerifierPlugin::NewL" );
       
   100     return self;
       
   101     }
       
   102 
       
   103 // Destructor
       
   104 CLpdVerifierPlugin::~CLpdVerifierPlugin()
       
   105     {
       
   106     LOCVERIFIERDLGDEBUG( "+CLpdVerifierPlugin::~CLpdVerifierPlugin" );
       
   107     // Destruction of this plugin should only occur only in shutdown
       
   108     // or in severe problem situation.
       
   109 
       
   110     // A very special scenario is that base class construction leaves and
       
   111     // this destructor is called. In that case CompleteAllRequests() causes
       
   112     // access violation (noticed this by checking source code of base class).
       
   113     if (NotifierBase())
       
   114         { // base class has been fully constructed, method call is safe
       
   115         CompleteAllRequests(KErrGeneral);
       
   116         }
       
   117 
       
   118     // It is enough to delete queries so when don't get callbacks.
       
   119     FreeQueryResources();
       
   120     
       
   121     delete iRequestActiveObject;
       
   122     iRequestActiveObject = NULL; 
       
   123     delete iRtorProcessor;
       
   124     iRtorProcessor = NULL; 
       
   125     LOCVERIFIERDLGDEBUG( "-CLpdVerifierPlugin::~CLpdVerifierPlugin" );
       
   126     
       
   127     }
       
   128 
       
   129 // -----------------------------------------------------------------------------
       
   130 // CLpdVerifierPlugin::HandleNewRequestL
       
   131 // (other items were commented in a header).
       
   132 // -----------------------------------------------------------------------------
       
   133 //
       
   134 void CLpdVerifierPlugin::HandleNewRequestL(TPosQNRequestId /*aRequestId */ )
       
   135     {
       
   136     LOCVERIFIERDLGDEBUG( "+CLpdVerifierPlugin::HandleNewRequestL" );
       
   137     
       
   138     // Check whether the notifier is already handling a request
       
   139     // If yes, do nothing for now.
       
   140     if (iRequestActiveObject)
       
   141         {
       
   142         return;
       
   143         }
       
   144     else
       
   145         {
       
   146         iRequestActiveObject = CLpdRequestAO::NewL(*this);
       
   147         iRequestActiveObject->ScheduleRequest();
       
   148         }
       
   149     LOCVERIFIERDLGDEBUG( "-CLpdVerifierPlugin::HandleNewRequestL" );
       
   150     }
       
   151 
       
   152 
       
   153 // -----------------------------------------------------------------------------
       
   154 // CLpdVerifierPlugin::HandleRequestCancelled
       
   155 // (other items were commented in a header).
       
   156 // -----------------------------------------------------------------------------
       
   157 //
       
   158 void CLpdVerifierPlugin::HandleRequestCancelled(TPosQNRequestId aRequestId)
       
   159     {
       
   160     LOCVERIFIERDLGDEBUG( "+CLpdVerifierPlugin::HandleRequestCancelled" );
       
   161     // Check whether the request is coming from Uikon Server. 
       
   162     // If not reject this request.
       
   163     if (!CheckClientSecureId(KPrivSrvSecureId))
       
   164         {
       
   165         return;
       
   166         }
       
   167 
       
   168     
       
   169     if (aRequestId != iCurrentRequest)
       
   170         {
       
   171         return;
       
   172         }
       
   173 
       
   174    
       
   175     if (iCurrentRequestType == EQuery)
       
   176         { // Verification was cancelled
       
   177         __ASSERT_DEBUG( iVerifierQuery, HandleDebugAssertError() );
       
   178         LOCVERIFIERDLGDEBUG( "Verification cancelled" );
       
   179         iVerifierQuery->Cancel();
       
   180         }
       
   181     else
       
   182         {
       
   183         // It must be a notification then, this case is not probable but
       
   184         // we can cancel the dialog if this would happen.
       
   185         __ASSERT_DEBUG( iCurrentRequestType == ENotification,
       
   186                 HandleDebugAssertError() );
       
   187          __ASSERT_DEBUG( iNotifier, HandleDebugAssertError() );
       
   188         LOCVERIFIERDLGDEBUG( "Notification cancelled" );
       
   189         iNotifier->Cancel();
       
   190         }
       
   191     LOCVERIFIERDLGDEBUG( "-CLpdVerifierPlugin::HandleRequestCancelled" );
       
   192     }
       
   193 
       
   194 // -----------------------------------------------------------------------------
       
   195 // CLpdVerifierPlugin::HandleAllRequestCancelled
       
   196 // (other items were commented in a header).
       
   197 // -----------------------------------------------------------------------------
       
   198 //
       
   199 void CLpdVerifierPlugin::HandleAllRequestCancelled()
       
   200     {
       
   201     LOCVERIFIERDLGDEBUG( "+CLpdVerifierPlugin::HandleAllRequestCancelled" );
       
   202     if (iCurrentRequest != KPosNullQNRequestId)
       
   203         { // current request requires some specific behavior
       
   204         HandleRequestCancelled(iCurrentRequest);
       
   205         }
       
   206    LOCVERIFIERDLGDEBUG( "-CLpdVerifierPlugin::HandleAllRequestCancelled" );
       
   207     }
       
   208 
       
   209 // -----------------------------------------------------------------------------
       
   210 // CLpdVerifierPlugin::HandleVerificationResultL
       
   211 // (other items were commented in a header).
       
   212 // -----------------------------------------------------------------------------
       
   213 //
       
   214 void CLpdVerifierPlugin::HandleVerificationResultL(TInt aResultCode)
       
   215     {
       
   216     iVerifyResult = aResultCode;
       
   217 
       
   218         LOCVERIFIERDLGDEBUG1( "+CLpdVerifierPlugin::HandleVerificationResultL(%d)",
       
   219                 iVerifyResult );
       
   220 
       
   221     switch (iVerifyResult)
       
   222         {
       
   223         case KErrNone: // fall through
       
   224         case KErrAccessDenied:
       
   225             {
       
   226             // No need for rules now in 3.0
       
   227             break;
       
   228             }
       
   229         case KErrTimedOut:
       
   230             { // UI's internal timer expired
       
   231             break;
       
   232             }
       
   233         case KErrCancel:
       
   234             {
       
   235             return; // don't handle next req. yet
       
   236             }
       
   237         case KErrAbort: // This is used for emergency call support
       
   238             {
       
   239             CompleteAllRequests(iVerifyResult);
       
   240             // ScheduleRequest() allows the current call chain
       
   241             // run to completion and resources are released after that.
       
   242             iRequestActiveObject->ScheduleRequest();
       
   243             return;
       
   244             }
       
   245         default:
       
   246             {
       
   247             
       
   248             break;
       
   249             }
       
   250         }
       
   251 
       
   252     CompleteCurrentAndContinue(iVerifyResult); // this request was handled
       
   253     LOCVERIFIERDLGDEBUG( "-CLpdVerifierPlugin::HandleVerificationResultL" );
       
   254     }
       
   255 // -----------------------------------------------------------------------------
       
   256 // CLpdVerifierPlugin::HandleNotificationResultL
       
   257 // (other items were commented in a header).
       
   258 // -----------------------------------------------------------------------------
       
   259 //
       
   260 void CLpdVerifierPlugin::HandleNotificationResultL(TInt aResultCode)
       
   261     {
       
   262 
       
   263    LOCVERIFIERDLGDEBUG1( "+CLpdVerifierPlugin::HandleVerificationResultL(%d)",
       
   264                 aResultCode );
       
   265     CompleteRequest(iCurrentRequest, aResultCode);
       
   266     iCurrentRequest = KPosNullQNRequestId;
       
   267 
       
   268     switch (aResultCode)
       
   269         {
       
   270         case KErrNone: // fall through
       
   271         case KErrTimedOut: // fall through
       
   272             {
       
   273             break;
       
   274             }
       
   275         case KErrCancel:
       
   276             {
       
   277             break;
       
   278             }
       
   279         case KErrAbort: // This is used for emergency call support
       
   280             {
       
   281             CompleteAllRequests(aResultCode);
       
   282             // ScheduleRequest() -> allows the current call chain
       
   283             // run to completion and resources are released after that.
       
   284             break;
       
   285             }
       
   286         default:
       
   287             {
       
   288             
       
   289             break;
       
   290             }
       
   291         }
       
   292 
       
   293     iRequestActiveObject->ScheduleRequest(); // handle next req.
       
   294     LOCVERIFIERDLGDEBUG( "-CLpdVerifierPlugin::HandleNotificationResultL" );
       
   295     }
       
   296 
       
   297 // -----------------------------------------------------------------------------
       
   298 // CLpdVerifierPlugin::HandleLeave
       
   299 // (other items were commented in a header).
       
   300 // -----------------------------------------------------------------------------
       
   301 //
       
   302 void CLpdVerifierPlugin::HandleLeave(TInt /*aError*/)
       
   303     {
       
   304         LOCVERIFIERDLGDEBUG1( "+CLpdVerifierPlugin::HandleLeave(%d)", aError);
       
   305     // In this case user needs feedback about the error situation:
       
   306     
       
   307 
       
   308     // In case of leave current request is completed with
       
   309     // iVerifyResult, but queue handling is still continued.
       
   310     // iVerifyResult is better completion code for request than aError.
       
   311     CompleteCurrentAndContinue(iVerifyResult);
       
   312     LOCVERIFIERDLGDEBUG( "-CLpdVerifierPlugin::HandleLeave" );
       
   313     }
       
   314 
       
   315 // -----------------------------------------------------------------------------
       
   316 // CLpdVerifierPlugin::HandleNextRequest
       
   317 // (other items were commented in a header).
       
   318 // -----------------------------------------------------------------------------
       
   319 //
       
   320 void CLpdVerifierPlugin::HandleNextRequest()
       
   321     {
       
   322     LOCVERIFIERDLGDEBUG( "+CLpdVerifierPlugin::HandleNextRequest" );
       
   323     TRAPD( err, HandleNextRequestL() );
       
   324     if (err)
       
   325         {
       
   326         // In case of leave current request is completed with
       
   327         // error code, but queue handling is still continued.
       
   328 
       
   329         // If we couldn't start handling the request it is
       
   330         // better not to confuse user with an error note.
       
   331 
       
   332         CompleteCurrentAndContinue(iVerifyResult);
       
   333         }
       
   334     LOCVERIFIERDLGDEBUG( "-CLpdVerifierPlugin::HandleNextRequest" );
       
   335     }
       
   336 
       
   337 // -----------------------------------------------------------------------------
       
   338 // CLpdVerifierPlugin::HandleNextRequestL
       
   339 // (other items were commented in a header).
       
   340 // -----------------------------------------------------------------------------
       
   341 //
       
   342 void CLpdVerifierPlugin::HandleNextRequestL()
       
   343     {
       
   344     LOCVERIFIERDLGDEBUG( "+CLpdVerifierPlugin::HandleNextRequestL" );
       
   345     // It is better to free previous query resources here, because
       
   346     // now all callback methods have finished (active object allowed
       
   347     // run to completion)
       
   348     this->FreeQueryResources();
       
   349 
       
   350     // Read the next request:
       
   351     RArray<TPosQNRequestId> requests;
       
   352     CleanupClosePushL(requests);
       
   353     GetRequestsL(requests);
       
   354 
       
   355     if (requests.Count() == 0)
       
   356         { // No more requests to handle
       
   357         CleanupStack::PopAndDestroy(); // requests
       
   358         // This is a very important step, it allows new requests
       
   359         // to flow in ( see HandleNewRequestL() ):
       
   360         delete iRequestActiveObject;
       
   361         iRequestActiveObject = NULL;
       
   362         return;
       
   363         }
       
   364     iCurrentRequest = requests[0];
       
   365     CleanupStack::PopAndDestroy(); // requests
       
   366     SetCurrentRequestL(iCurrentRequest);
       
   367 
       
   368     // Check whether the request is coming from Uikon Server. If not reject this request.
       
   369     if (!CheckClientSecureId(KPrivSrvSecureId))
       
   370         {
       
   371         CompleteCurrentAndContinue(KErrPermissionDenied);
       
   372         return;
       
   373         }
       
   374    
       
   375     // Check the request type
       
   376     iCurrentRequestType = RequestTypeL(iCurrentRequest);
       
   377 
       
   378     iRtorProcessor->ReadRequestorsL(*this);
       
   379 
       
   380       
       
   381     
       
   382     if (iCurrentRequestType == EQuery)
       
   383         {
       
   384         LOCVERIFIERDLGDEBUG( "New verification request received" );
       
   385         HandleNextVerificationL();
       
   386         }
       
   387     else if (iCurrentRequestType == ENotification)
       
   388         {
       
   389         LOCVERIFIERDLGDEBUG( "New notification request received" );
       
   390         HandleNextNotificationL();
       
   391         }
       
   392     else
       
   393         {
       
   394         User::Leave(KErrNotSupported);
       
   395         }
       
   396     LOCVERIFIERDLGDEBUG( "-CLpdVerifierPlugin::HandleNextRequestL" );
       
   397     }
       
   398 
       
   399 // -----------------------------------------------------------------------------
       
   400 // CLpdVerifierPlugin::HandleNextVerificationL
       
   401 // (other items were commented in a header).
       
   402 // -----------------------------------------------------------------------------
       
   403 //
       
   404 void CLpdVerifierPlugin::HandleNextVerificationL()
       
   405     {
       
   406     LOCVERIFIERDLGDEBUG( "+CLpdVerifierPlugin::HandleNextVerificationL" );
       
   407     __ASSERT_DEBUG( iCurrentRequest != KPosNullQNRequestId,
       
   408             HandleAssertErrorL() );
       
   409     __ASSERT_DEBUG( !iVerifierQuery, HandleAssertErrorL() );
       
   410     
       
   411     CPosRequestor::TRequestType reqType;
       
   412        if (CheckRequestTypeL() == CPosRequestor::ERequestPeriodic)
       
   413             reqType = CPosRequestor::ERequestPeriodic;
       
   414         else
       
   415             reqType = CPosRequestor::ERequestSingleShot;
       
   416     
       
   417     TPosRequestSource source(RequestSource());
       
   418     if (source == EPosRequestSourceNotAvailable)
       
   419         {
       
   420         CompleteCurrentAndContinue(KErrNone);
       
   421         }
       
   422     else
       
   423         {
       
   424         
       
   425          TPosRequestDecision decision(QueryTimeoutStrategy());
       
   426         
       
   427         iRtorProcessor->iRequestType=reqType;
       
   428         iRtorProcessor->iRequestDecision=decision;
       
   429         iRtorProcessor->iDialogType=CLpdRequestorProcessor::EQuery;
       
   430                
       
   431         iVerifierQuery = CLpdVerifierQueryLauncher::NewL(*this);
       
   432         // Ownership NOT transferred
       
   433         iVerifierQuery->SetRequestInfoL(iRtorProcessor);
       
   434         
       
   435         iVerifierQuery->StartQueryL();    
       
   436         }
       
   437     LOCVERIFIERDLGDEBUG( "-CLpdVerifierPlugin::HandleNextVerificationL" );
       
   438     }
       
   439 
       
   440 // -----------------------------------------------------------------------------
       
   441 // CLpdVerifierPlugin::HandleNextNotificationL
       
   442 // (other items were commented in a header).
       
   443 // -----------------------------------------------------------------------------
       
   444 //
       
   445 void CLpdVerifierPlugin::HandleNextNotificationL()
       
   446     {
       
   447     LOCVERIFIERDLGDEBUG( "+CLpdVerifierPlugin::HandleNextNotificationL" );
       
   448     __ASSERT_DEBUG( iCurrentRequest != KPosNullQNRequestId,
       
   449             HandleAssertErrorL() );
       
   450     
       
   451     // There is no differentiation now for periodic and single shot notifications
       
   452     HandleNextNonPeriodicNotificationL();
       
   453     LOCVERIFIERDLGDEBUG( "-CLpdVerifierPlugin::HandleNextNotificationL" );
       
   454     }
       
   455 // -----------------------------------------------------------------------------
       
   456 // CLpdVerifierPlugin::HandleNextNonPeriodicNotificationL
       
   457 // (other items were commented in a header).
       
   458 // -----------------------------------------------------------------------------
       
   459 //
       
   460 void CLpdVerifierPlugin::HandleNextNonPeriodicNotificationL()
       
   461     {
       
   462     LOCVERIFIERDLGDEBUG( "+CLpdVerifierPlugin::HandleNextNonPeriodicNotificationL" );
       
   463     __ASSERT_DEBUG( iCurrentRequest != KPosNullQNRequestId,
       
   464             HandleAssertErrorL() );
       
   465     __ASSERT_DEBUG( !iNotifier, HandleAssertErrorL() );
       
   466 
       
   467     if (RequestSource() != EPosRequestSourceNetwork)
       
   468         { // Notifications are supported only for network requests
       
   469         User::Leave(KErrNotSupported);
       
   470         }
       
   471 
       
   472     TPosNotificationReason reason = NotificationReason();
       
   473     TPosRequestDecision decision = LocationRequestDecision();
       
   474     iRtorProcessor->iNotifReason=reason;
       
   475     iRtorProcessor->iDialogType=CLpdRequestorProcessor::ENotification;
       
   476     iRtorProcessor->iRequestDecision=decision;
       
   477     
       
   478     iNotifier = CLpdNotifierQueryLauncher::NewL(*this);
       
   479     iNotifier->SetRequestInfoL(iRtorProcessor);
       
   480     iNotifier->StartQueryL();
       
   481     LOCVERIFIERDLGDEBUG( "-CLpdVerifierPlugin::HandleNextNonPeriodicNotificationL" );
       
   482     }
       
   483 
       
   484 
       
   485 // -----------------------------------------------------------------------------
       
   486 // CLpdVerifierPlugin::CompleteCurrentAndContinue
       
   487 // (other items were commented in a header).
       
   488 // -----------------------------------------------------------------------------
       
   489 //
       
   490 void CLpdVerifierPlugin::CompleteCurrentAndContinue(TInt aResultCode)
       
   491     {
       
   492     LOCVERIFIERDLGDEBUG( "+CLpdVerifierPlugin::CompleteCurrentAndContinue" );
       
   493     if (iCurrentRequest != KPosNullQNRequestId)
       
   494         {
       
   495         CompleteRequest(iCurrentRequest, aResultCode);
       
   496         }
       
   497     iCurrentRequest = KPosNullQNRequestId;
       
   498 
       
   499     __ASSERT_DEBUG( iRequestActiveObject, HandleDebugAssertError() );
       
   500     iRequestActiveObject->ScheduleRequest(); // handle next req.
       
   501     LOCVERIFIERDLGDEBUG( "-CLpdVerifierPlugin::CompleteCurrentAndContinue" );
       
   502     }
       
   503 
       
   504 // -----------------------------------------------------------------------------
       
   505 // CLpdVerifierPlugin::FreeQueryResources
       
   506 // (other items were commented in a header).
       
   507 // -----------------------------------------------------------------------------
       
   508 //
       
   509 void CLpdVerifierPlugin::FreeQueryResources()
       
   510     {
       
   511     LOCVERIFIERDLGDEBUG( "+CLpdVerifierPlugin::FreeQueryResources" );
       
   512     iCurrentRequest = KPosNullQNRequestId;
       
   513     delete iVerifierQuery;
       
   514     iVerifierQuery = NULL;
       
   515     iVerifyResult = KErrGeneral;
       
   516     delete iNotifier;
       
   517     iNotifier = NULL;
       
   518     if (iRtorProcessor)
       
   519         { // if already construction fails iRtorProcessor may
       
   520         // be NULL, otherwise it points to an instance.
       
   521         iRtorProcessor->ResetAndDestroyRequestors();
       
   522         }
       
   523     LOCVERIFIERDLGDEBUG( "-CLpdVerifierPlugin::FreeQueryResources" );
       
   524     }
       
   525 
       
   526 // -----------------------------------------------------------------------------
       
   527 // CLpdVerifierPlugin::HandleAssertErrorL
       
   528 // (other items were commented in a header).
       
   529 // -----------------------------------------------------------------------------
       
   530 //
       
   531 void CLpdVerifierPlugin::HandleAssertErrorL() const
       
   532     {
       
   533     LOCVERIFIERDLGDEBUG( "+CLpdVerifierPlugin::HandleAssertErrorL" ); 
       
   534 #ifdef _DEBUG        
       
   535     User::Panic(KPanicText, KLpdErrGeneral);
       
   536 #else
       
   537     User::Leave( KErrCorrupt );
       
   538 #endif
       
   539     LOCVERIFIERDLGDEBUG( "-CLpdVerifierPlugin::HandleAssertErrorL" ); 
       
   540     }
       
   541 
       
   542 // -----------------------------------------------------------------------------
       
   543 // CLpdVerifierPlugin::HandleDebugAssertError
       
   544 // (other items were commented in a header).
       
   545 // -----------------------------------------------------------------------------
       
   546 //
       
   547 void CLpdVerifierPlugin::HandleDebugAssertError() const
       
   548     {
       
   549     LOCVERIFIERDLGDEBUG( "+CLpdVerifierPlugin::HandleDebugAssertError" ); 
       
   550 #ifdef _DEBUG
       
   551     User::Panic(KPanicText, KLpdErrGeneral);
       
   552 #endif
       
   553     LOCVERIFIERDLGDEBUG( "-CLpdVerifierPlugin::HandleDebugAssertError" ); 
       
   554     }
       
   555 
       
   556 
       
   557 // -----------------------------------------------------------------------------
       
   558 // CLpdVerifierPlugin::CheckRequestTypeL
       
   559 // Checks the type of request and helps to know
       
   560 // if a given request is of SUPL periodic type
       
   561 // @param aCurrentRequest request id
       
   562 // @return TRequestType type of request enum
       
   563 // -----------------------------------------------------------------------------
       
   564 CPosRequestor::TRequestType CLpdVerifierPlugin::CheckRequestTypeL()
       
   565     {
       
   566     LOCVERIFIERDLGDEBUG( "+CLpdVerifierPlugin::CheckRequestTypeL" );
       
   567     CPosRequestor::TRequestType reqType = CPosRequestor::ENetworkTypeUnknown;
       
   568     if (RequestorCountL() > 0)
       
   569         {
       
   570         CPosRequestor* requestor = RequestorLC(0);
       
   571         reqType = requestor->RequestType();
       
   572         CleanupStack::PopAndDestroy(requestor);
       
   573         }
       
   574     LOCVERIFIERDLGDEBUG( "-CLpdVerifierPlugin::CheckRequestTypeL" );
       
   575     return reqType;
       
   576     }
       
   577 
       
   578 
       
   579 //  End of File