sl@0: /* sl@0: * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of the License "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * Defines inline functions used by both SCS client and server implementations, sl@0: * but not with the client API user. sl@0: * sl@0: */ sl@0: sl@0: sl@0: /** sl@0: @file sl@0: @internalTechnology sl@0: @released sl@0: */ sl@0: sl@0: #ifndef SCSCOMMON_INL sl@0: #define SCSCOMMON_INL sl@0: sl@0: #include sl@0: sl@0: namespace ScsImpl sl@0: { sl@0: sl@0: inline void ExtractScsAndImplFunctions(const RMessage2& aMessage, TScsFunction* aScsFunc, TInt* aImplFunc) sl@0: /** sl@0: Takes the function code from the supplied message and breaks it into the SCS sl@0: field and implementation code. sl@0: sl@0: @param aMessage Message contains function code supplied to server sl@0: from client-side implementation. sl@0: @param aScsFunc If not NULL then on return this contains the SCS code. sl@0: @param aImplFunc If not NULL then on return this contains the implementation custom code. sl@0: */ sl@0: { sl@0: TInt f = aMessage.Function(); sl@0: if (aScsFunc != 0) sl@0: *aScsFunc = static_cast(f & KScsFunctionMask); sl@0: sl@0: if (aImplFunc != 0) sl@0: *aImplFunc = f & ~KScsFunctionMask; sl@0: } sl@0: sl@0: #ifdef _DEBUG sl@0: inline TBool ScsFieldUsed(TInt aFunction) sl@0: /** sl@0: This function is used on the client-side in debug builds to sl@0: ensure the (sub)session function identifier which is being sl@0: sent to the server does not yet contain any SCS fields. sl@0: */ sl@0: { sl@0: return aFunction & KScsFunctionMask; sl@0: } sl@0: #endif sl@0: } // namespace UserPromptService sl@0: sl@0: #endif // #ifndef SCSCOMMON_INL sl@0: