Update contrib.
2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
15 * Defines inline functions used by both SCS client and server implementations,
16 * but not with the client API user.
30 #include <scs/scscommon.h>
35 inline void ExtractScsAndImplFunctions(const RMessage2& aMessage, TScsFunction* aScsFunc, TInt* aImplFunc)
37 Takes the function code from the supplied message and breaks it into the SCS
38 field and implementation code.
40 @param aMessage Message contains function code supplied to server
41 from client-side implementation.
42 @param aScsFunc If not NULL then on return this contains the SCS code.
43 @param aImplFunc If not NULL then on return this contains the implementation custom code.
46 TInt f = aMessage.Function();
48 *aScsFunc = static_cast<TScsFunction>(f & KScsFunctionMask);
51 *aImplFunc = f & ~KScsFunctionMask;
55 inline TBool ScsFieldUsed(TInt aFunction)
57 This function is used on the client-side in debug builds to
58 ensure the (sub)session function identifier which is being
59 sent to the server does not yet contain any SCS fields.
62 return aFunction & KScsFunctionMask;
65 } // namespace UserPromptService
67 #endif // #ifndef SCSCOMMON_INL