locationsystemui/locationsysui/privacyverifiernotifierui/locverifier/inc/lpdrequestorprocessor.h
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:  Processes requestor related data.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CLPDREQUESTORPROCESSOR_H
       
    20 #define CLPDREQUESTORPROCESSOR_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include "locrequestorutilsresolver.h"
       
    24 #include <e32base.h>
       
    25 #include <lbs/epos_rposrequestorstack.h>
       
    26 #include <lbs/epos_cposrequestor.h>
       
    27 #include <lbs/epos_privacy.h>
       
    28 // FORWARD DECLARATIONS
       
    29 class CPosPrivacyNotifier;
       
    30 
       
    31 
       
    32 // CLASS DECLARATION
       
    33 
       
    34 /**
       
    35 *  This class reads, processes and owns requestor data.
       
    36 *  @lib locverifierdlg.dll
       
    37 *  @since 2.1
       
    38 */
       
    39 class CLpdRequestorProcessor : public CBase
       
    40     {
       
    41     public:  // Constructors and destructor
       
    42         
       
    43         enum TDialogType
       
    44             {
       
    45             /** Query dialog requested. */
       
    46             EQuery = 0,
       
    47             /** Notification dialog requested. */
       
    48             ENotification
       
    49             };
       
    50  
       
    51     
       
    52     
       
    53        /**
       
    54         * Two-phased constructor.
       
    55         * @return created object
       
    56         */
       
    57         static CLpdRequestorProcessor* NewL();
       
    58         
       
    59         /**
       
    60         * Destructor.
       
    61         */
       
    62         virtual ~CLpdRequestorProcessor();
       
    63 
       
    64     public: // New functions
       
    65 
       
    66         /**
       
    67         * Reads requestor information from the privacy notifier.
       
    68         * Uses RequestorIdValid() for id validity check.
       
    69         * Calls UpdateRuleRequestorsL().
       
    70         * @param aPosNotifier reference
       
    71         * @return ETrue if all requestor id's were valid, EFalse otherwise.
       
    72         */
       
    73         TBool ReadRequestorsL( const CPosPrivacyNotifier& aPosNotifier );
       
    74 
       
    75         /**
       
    76         * Returns requestor array for reading.
       
    77         * @return array of requestors
       
    78         */
       
    79         const RPointerArray<CPosRequestor>& Requestors() const;
       
    80         
       
    81         /**
       
    82          * Resets requestor arrays and destroys requestor objects.
       
    83          */
       
    84          void ResetAndDestroyRequestors();
       
    85        
       
    86              		
       
    87     protected: // Constructors and destructors
       
    88 
       
    89         /**
       
    90         * C++ constructor.
       
    91         */
       
    92         CLpdRequestorProcessor();
       
    93 
       
    94     protected: // New methods
       
    95 
       
    96         /**
       
    97         * Handles assert errors. Panics in debug build but leaves in release
       
    98         * build, as this component runs in EikSrv and must never panic.
       
    99         */
       
   100         void HandleAssertErrorL() const;
       
   101 
       
   102     private:
       
   103         TBool RequestorIdValid(
       
   104             const CPosRequestor& aRequestor );
       
   105    
       
   106     public:
       
   107         RPointerArray<CPosRequestor> iRequestors;
       
   108         CPosRequestor::TRequestType  iRequestType;
       
   109         TPosRequestDecision          iRequestDecision;
       
   110         TDialogType                  iDialogType; 
       
   111         TPosNotificationReason       iNotifReason; 
       
   112         
       
   113     };
       
   114 
       
   115 #endif      // CLPDREQUESTORPROCESSOR_H   
       
   116             
       
   117 // End of File