equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "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". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Inline methods related to client server communication |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // ----------------------------------------------------------------------------- |
|
21 // Calculates padded length of descriptor |
|
22 // ----------------------------------------------------------------------------- |
|
23 // |
|
24 inline TInt AlfPaddedLength( TInt aLength ) |
|
25 { |
|
26 const TInt remainder = aLength % KAlfClientServerRoundToBoundary; |
|
27 |
|
28 if ( remainder ) |
|
29 { |
|
30 // First round to previous multiple of KAlfClientServerRoundToBoundary |
|
31 // and then go to next |
|
32 aLength -= remainder; |
|
33 aLength += KAlfClientServerRoundToBoundary; |
|
34 } |
|
35 |
|
36 return aLength; |
|
37 } |
|
38 |
|
39 // ----------------------------------------------------------------------------- |
|
40 // Just panic |
|
41 // ----------------------------------------------------------------------------- |
|
42 // |
|
43 inline void AlfPanicClient( const RMessage2& aMessage, TAlfPanicSrv aReason ) |
|
44 { |
|
45 _LIT( KAlfPanicClientCategory, "Alf Toolkit" ); |
|
46 aMessage.Panic( KAlfPanicClientCategory, aReason ); |
|
47 } |