1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/security/authorisation/userpromptservice/inc_private/upscommon.inl Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,68 @@
1.4 +/*
1.5 +* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of the License "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description:
1.18 +* The functions defined in this file provide constant data which is
1.19 +* used by both the client and server implementations.
1.20 +*
1.21 +*/
1.22 +
1.23 +
1.24 +/**
1.25 + @file
1.26 + @internalComponent
1.27 + @released
1.28 +*/
1.29 +
1.30 +
1.31 +#ifndef UPSCOMMON_INL
1.32 +#define UPSCOMMON_INL
1.33 +
1.34 +#include "upscommon.h"
1.35 +
1.36 +
1.37 +namespace UserPromptService
1.38 + {
1.39 + inline TVersion Version()
1.40 + /**
1.41 + This function is defined because there is no literal constructor for TVersion.
1.42 +
1.43 + @return Defines a version number which the client
1.44 + can use to open the server. If the client
1.45 + was built with a higher version number, then
1.46 + it cannot open the server. This ensures that
1.47 + a client only talks to a server whose version
1.48 + is at least as high as its own.
1.49 + */
1.50 + {
1.51 + TVersion v(KUpsVerMajor, KUpsVerMinor, KUpsVerBuild);
1.52 + return v;
1.53 + }
1.54 +
1.55 + inline TUidType ServerImageFullUid()
1.56 + /**
1.57 + This function is defined because there is no literal constructor
1.58 + for TUidType. It returns the server executable's UID, which is used
1.59 + to ensure the client launches the correct server process, as opposed
1.60 + to another application which uses the same executable name.
1.61 +
1.62 + @return TUidType The server executable's full UID.
1.63 + */
1.64 + {
1.65 + TUidType uidType(KExecutableImageUid, KNullUid, KUpsServerUid);
1.66 + return uidType;
1.67 + }
1.68 + } // namespace UserPromptService
1.69 +
1.70 +#endif // #ifndef UPSCOMMON_INL
1.71 +