os/security/cryptomgmtlibs/securityutils/inc/secsettingscommon.inl
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
/*
sl@0
     2
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     3
* All rights reserved.
sl@0
     4
* This component and the accompanying materials are made available
sl@0
     5
* under the terms of the License "Eclipse Public License v1.0"
sl@0
     6
* which accompanies this distribution, and is available
sl@0
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     8
*
sl@0
     9
* Initial Contributors:
sl@0
    10
* Nokia Corporation - initial contribution.
sl@0
    11
*
sl@0
    12
* Contributors:
sl@0
    13
*
sl@0
    14
* Description: 
sl@0
    15
* The functions defined in this file provide constant data which is
sl@0
    16
* used by both the client and server implementations.
sl@0
    17
*
sl@0
    18
*/
sl@0
    19
sl@0
    20
sl@0
    21
/**
sl@0
    22
 @file
sl@0
    23
 @internalComponent
sl@0
    24
 @released
sl@0
    25
*/
sl@0
    26
sl@0
    27
sl@0
    28
#ifndef SECSETTINGSCOMMON_INL
sl@0
    29
#define SECSETTINGSCOMMON_INL
sl@0
    30
sl@0
    31
sl@0
    32
sl@0
    33
namespace SecuritySettingsServer
sl@0
    34
	{
sl@0
    35
	inline TVersion Version()
sl@0
    36
	/**
sl@0
    37
		This function is defined because there is no literal constructor for TVersion.
sl@0
    38
sl@0
    39
		@return					Defines a version number which the client	
sl@0
    40
								can use to open the server.  If the client
sl@0
    41
								was built with a higher version number, then
sl@0
    42
								it cannot open the server.  This ensures that
sl@0
    43
								a client only talks to a server whose version
sl@0
    44
								is at least as high as its own.
sl@0
    45
	 */
sl@0
    46
		{
sl@0
    47
		TVersion v(KSecSettingsVerMajor, KSecSettingsVerMinor, KSecSettingsVerBuild);
sl@0
    48
		return v;
sl@0
    49
		}
sl@0
    50
sl@0
    51
	inline TUidType ServerImageFullUid()
sl@0
    52
	/**
sl@0
    53
		This function is defined because there is no literal constructor
sl@0
    54
		for TUidType.  It returns the server executable's UID, which is used
sl@0
    55
		to ensure the client launches the correct server process, as opposed
sl@0
    56
		to another application which uses the same executable name.
sl@0
    57
sl@0
    58
		@return TUidType		The server executable's full UID.
sl@0
    59
	 */
sl@0
    60
		{
sl@0
    61
		TUidType uidType(KExecutableImageUid, KNullUid, KSecSettingsServerUid);
sl@0
    62
		return uidType;
sl@0
    63
		}
sl@0
    64
	}	// namespace SecuritySettingsServer
sl@0
    65
	
sl@0
    66
#endif	// #ifndef SECSETTINGSCOMMON_INL
sl@0
    67