locationrequestmgmt/networkrequesthandler/inc/EPos_PosCommonPrivacyResources.h
changeset 36 b47902b73a93
parent 0 9cfd9a3ee49c
equal deleted inserted replaced
35:a2efdd544abf 36:b47902b73a93
       
     1 /*
       
     2 * Copyright (c) 2005-2009 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:
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 /**
       
    22  @file
       
    23  @internalComponent
       
    24  @released
       
    25 */
       
    26 
       
    27 #ifndef POSCOMMONPRIVACYRESOURCES_H
       
    28 #define POSCOMMONPRIVACYRESOURCES_H
       
    29 
       
    30 //  INCLUDES
       
    31 #include <e32base.h>
       
    32 
       
    33 // FORWARD DECLARATIONS
       
    34 class CPosDialogCtrl;
       
    35 class CPosTrace;
       
    36 
       
    37 // DATA TYPES
       
    38 class CPosCommonPrivacyResources : public CBase
       
    39     {
       
    40     public: // Data
       
    41         CPosDialogCtrl*         iDialogCtrl;
       
    42         TInt                    iLastAssignedRequestId;
       
    43 #ifdef _DEBUG
       
    44         CPosTrace*              iTrace;
       
    45 #endif
       
    46     };
       
    47 
       
    48 // CLASS DECLARATION
       
    49 
       
    50 /**
       
    51 *  Singleton representation for common resources in the privacy server.
       
    52 */
       
    53 class PosCommonPrivacyResources
       
    54     {
       
    55     public:  // New functions
       
    56 
       
    57         /**
       
    58         * Installs the holder for common resources in thread local storage.
       
    59         * @return KErrNone if ok, otherwise a system wide error code.
       
    60         */
       
    61         static TInt Install();
       
    62 
       
    63         /**
       
    64         * Checks if the PosCommonPrivacyResources is installed.
       
    65         * @return ETrue if installed, otherwise EFalse.
       
    66         */
       
    67         static TBool Installed();
       
    68 
       
    69         /**
       
    70         * Uninstalls the holder for common resources. The common resources are
       
    71         * not destroyed by this call.
       
    72         */
       
    73         static void Uninstall();
       
    74 
       
    75         /**
       
    76         * Gets a handle to the global dialog controller.
       
    77         * @return The global dialog controller.
       
    78         */
       
    79         static CPosDialogCtrl* DialogCtrl();
       
    80 
       
    81         /**
       
    82         * Sets the global dialog controller.
       
    83         * @param aDialogCtrl The global dialog controller.
       
    84         */
       
    85         static void SetDialogCtrl(
       
    86             /* IN  */   CPosDialogCtrl* aDialogCtrl);
       
    87 
       
    88         /**
       
    89         * Get a new unique request id for a new CPosReqLogEntry.
       
    90         *
       
    91         * @return The new unique request id.
       
    92         */
       
    93         static TInt GetNewRequestId();
       
    94 
       
    95 #ifdef _DEBUG
       
    96         static void SetupTraceL();
       
    97         static void TearDownTrace();
       
    98 
       
    99         static void Trace(
       
   100             /* IN  */ const TDesC& aDescription,
       
   101             /* IN  */ const TDesC& aFilename,
       
   102             /* IN  */ const TInt aLineNumber
       
   103             );
       
   104 #endif
       
   105     };
       
   106 
       
   107 #endif      // POSCOMMONPRIVACYRESOURCES_H
       
   108 
       
   109 // End of File
       
   110 
       
   111