locsrv_plat/query_and_notification_api/inc/EPos_CPosPrivacyNotifier.h
branchRCL_3
changeset 8 6fcbaa43369c
child 13 9c303455e256
equal deleted inserted replaced
7:19bff11d6c18 8:6fcbaa43369c
       
     1 /*
       
     2 * Copyright (c) 2002-2005 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:   Class for LBS Privacy Query & Notify (Q&N) privacy notifiers.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CPOSPRIVACYNOTIFIER_H
       
    21 #define CPOSPRIVACYNOTIFIER_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <lbs/epos_privacy.h>
       
    26 #include <lbs/EPos_TPosQNInputData.h>
       
    27 
       
    28 // DATA TYPES
       
    29 
       
    30 
       
    31 // CONSTANT DECLARATIONS
       
    32 /**
       
    33 @publishedPartner
       
    34 @deprecated
       
    35 */
       
    36 const TPosQNRequestId KPosNullQNRequestId = -1;
       
    37 
       
    38 // FORWARD DECLARATIONS
       
    39 class CPosPrivacyNotifierExtension;
       
    40 class CPosRequestor;
       
    41 class MEikSrvNotifierBase2;
       
    42 
       
    43 // CLASS DECLARATION
       
    44 /**
       
    45 Base class for LBS Privacy Query & Notify (Q&N) privacy notifiers.
       
    46 
       
    47 A privacy notifier is a UI plug-in which handles privacy query and
       
    48 notification requests.
       
    49 
       
    50 This class contains declarations for event methods that must be implemented
       
    51 by the notifier in order to receive information about new requests or
       
    52 cancelled requests.
       
    53 
       
    54 It also contains methods for accessing information about a request and for
       
    55 completing a request.
       
    56 
       
    57 @publishedPartner
       
    58 @deprecated
       
    59 */
       
    60 class CPosPrivacyNotifier : public CBase
       
    61     {
       
    62     public:
       
    63         /**
       
    64         Specifies whether the requested dialog should be a query or a
       
    65         notification dialog.
       
    66         */
       
    67         enum TRequestType {
       
    68             /** Query dialog requested. */
       
    69             EQuery = 0,
       
    70             /** Notification dialog requested. */
       
    71             ENotification
       
    72             };
       
    73 
       
    74     public:
       
    75         IMPORT_C virtual ~CPosPrivacyNotifier();
       
    76 
       
    77     public:
       
    78 
       
    79         /**
       
    80         * This method is called when a new privacy query or notification has
       
    81         * been requested.
       
    82         *
       
    83         * @param aRequestId The ID of the new query or notification request.
       
    84         */
       
    85         virtual void HandleNewRequestL(
       
    86         /* IN  */       TPosQNRequestId aRequestId
       
    87         ) = 0;
       
    88 
       
    89         /**
       
    90         * This method is called when a privacy query or notification request is
       
    91         * cancelled.
       
    92         *
       
    93         * It is not necessary to call @ref CompleteRequest for a cancelled
       
    94         * request.
       
    95         *
       
    96         * @param aRequestId The ID of the cancelled query or notification
       
    97         *   request.
       
    98         */
       
    99         virtual void HandleRequestCancelled(
       
   100         /* IN  */       TPosQNRequestId aRequestId
       
   101         ) = 0;
       
   102 
       
   103         /**
       
   104         * This method is called to cancel all outstanding requests.
       
   105         *
       
   106         * It is not necessary to call @ref CompleteRequest for a cancelled
       
   107         * request.
       
   108         */
       
   109         virtual void HandleAllRequestCancelled() = 0;
       
   110         
       
   111         IMPORT_C MEikSrvNotifierBase2* NotifierBase() const;
       
   112         IMPORT_C TPosVerifyCancelReason CancelReason() const;
       
   113         IMPORT_C void GetRequestsL(RArray<TPosQNRequestId>& aRequestArray) const;
       
   114         IMPORT_C TRequestType RequestTypeL(TPosQNRequestId aRequestId) const;
       
   115         IMPORT_C void SetCurrentRequestL(TPosQNRequestId aRequestId);
       
   116         IMPORT_C TPosQNRequestId CurrentRequest() const;
       
   117         IMPORT_C TPosRequestDecision QueryTimeoutStrategy() const;
       
   118         IMPORT_C TPosRequestSource RequestSource() const;
       
   119         IMPORT_C TPosRequestDecision LocationRequestDecision() const;
       
   120         IMPORT_C TPosNotificationReason NotificationReason() const;
       
   121         IMPORT_C TInt RequestorCountL() const;
       
   122         IMPORT_C CPosRequestor* RequestorLC(TInt aRequestorIndex) const;
       
   123         IMPORT_C void CompleteRequest(TPosQNRequestId aRequestId, TInt aCompletionCode);
       
   124         IMPORT_C void CompleteAllRequests(TInt aCompletionCode);
       
   125         IMPORT_C TBool CheckClientSecureId(TSecureId aSecureId);
       
   126 
       
   127     protected:
       
   128         IMPORT_C CPosPrivacyNotifier();
       
   129         IMPORT_C void BaseConstructL(TUid aChannel,TInt aPriority);
       
   130 
       
   131     private:
       
   132         // By default, prohibit copy constructor
       
   133         CPosPrivacyNotifier( const CPosPrivacyNotifier& );
       
   134         // Prohibit assigment operator
       
   135         CPosPrivacyNotifier& operator= ( const CPosPrivacyNotifier& );
       
   136 
       
   137     private:
       
   138         CPosPrivacyNotifierExtension* iExtension;
       
   139     };
       
   140 
       
   141 #endif      // CPOSPRIVACYNOTIFIER_H