secsrv_plat/security_code_ui_api/inc/SecUi.h
changeset 0 164170e6151a
child 21 09b1ac925e3f
equal deleted inserted replaced
-1:000000000000 0:164170e6151a
       
     1 /*
       
     2 * Copyright (c) 2002 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 *		Provides initialization and uninitialization for SecUi resource file
       
    16 *
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 #ifndef     __SECUI_H
       
    22 #define     __SECUI_H
       
    23 
       
    24 class TSecUi
       
    25 	{
       
    26 	public:
       
    27 		/**
       
    28 		* Initializes SecUi resource file
       
    29 		*
       
    30 		* Should be called before using any other SecUi methods 
       
    31 		*/
       
    32 		IMPORT_C static void InitializeLibL();
       
    33 		/**
       
    34 		* Uninitializes SecUi resource file
       
    35 		*
       
    36 		* Should be called after finished using SecUi methods 
       
    37 		*/
       
    38 		IMPORT_C static void UnInitializeLib();
       
    39 		/**
       
    40 		* Returns the resource file name of SecurityUI dll.
       
    41 		*
       
    42 		* @return TFileName (resource file name) 
       
    43 		*/
       
    44 		static TFileName ResourceFileName();
       
    45         	/**
       
    46         * Check if SecUi can be uninitialized, i.e. if client count is zero (or less).
       
    47         *
       
    48         * @return ETrue if SecUi can be freed, EFalse otherwise.
       
    49         */
       
    50 		TBool CanBeFreed();
       
    51 
       
    52 		/**
       
    53         * Increse client count for this thread.
       
    54         */
       
    55 		void IncreaseClientCount();
       
    56 
       
    57 		/**
       
    58         * Decrease client count for this thread
       
    59         */
       
    60 		void DecreaseClientCount();
       
    61 
       
    62 	private:
       
    63 		/**
       
    64 		* C++ default constructor.
       
    65 		*/
       
    66 		TSecUi();
       
    67 		/**
       
    68 		* Destructor.
       
    69 		*/
       
    70 		~TSecUi();
       
    71 		/**
       
    72 		* Symbian OS constructor.
       
    73 		*/
       
    74 		void ConstructL();
       
    75 	private:
       
    76 		TInt iResourceFileOffset;
       
    77         TInt iClientCount;
       
    78 
       
    79 	};
       
    80 #endif
       
    81 
       
    82 // End of file
       
    83