secsrv_plat/security_code_ui_api/inc/SecUi.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 26 Jan 2010 15:20:08 +0200
changeset 0 164170e6151a
child 26 aad866c37519
child 49 09b1ac925e3f
permissions -rw-r--r--
Revision: 201004

/*
* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description: 
*		Provides initialization and uninitialization for SecUi resource file
*
*
*/


#ifndef     __SECUI_H
#define     __SECUI_H

class TSecUi
	{
	public:
		/**
		* Initializes SecUi resource file
		*
		* Should be called before using any other SecUi methods 
		*/
		IMPORT_C static void InitializeLibL();
		/**
		* Uninitializes SecUi resource file
		*
		* Should be called after finished using SecUi methods 
		*/
		IMPORT_C static void UnInitializeLib();
		/**
		* Returns the resource file name of SecurityUI dll.
		*
		* @return TFileName (resource file name) 
		*/
		static TFileName ResourceFileName();
        	/**
        * Check if SecUi can be uninitialized, i.e. if client count is zero (or less).
        *
        * @return ETrue if SecUi can be freed, EFalse otherwise.
        */
		TBool CanBeFreed();

		/**
        * Increse client count for this thread.
        */
		void IncreaseClientCount();

		/**
        * Decrease client count for this thread
        */
		void DecreaseClientCount();

	private:
		/**
		* C++ default constructor.
		*/
		TSecUi();
		/**
		* Destructor.
		*/
		~TSecUi();
		/**
		* Symbian OS constructor.
		*/
		void ConstructL();
	private:
		TInt iResourceFileOffset;
        TInt iClientCount;

	};
#endif

// End of file