secsrv_plat/security_code_ui_api/inc/SecUi.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 31 Aug 2010 16:04:40 +0300
branchRCL_3
changeset 49 09b1ac925e3f
parent 0 164170e6151a
child 50 03674e5abf46
permissions -rw-r--r--
Revision: 201033 Kit: 201035

/*
* 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

#if defined(_DEBUG)
#define RDEBUG( x, y ) RDebug::Printf( "%s %s (%u) %s=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, x, y );
#define RDEBUGSTR( x ) RDebug::Print( x );
#else
#define RDEBUG( x, y )
#define RDEBUGSTR( x )
#endif

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();
        	/**
        * 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;
        TInt iDialogOpened;

	};
#endif

// End of file