equal
deleted
inserted
replaced
|
1 // Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Common utils |
|
15 // |
|
16 // |
|
17 |
|
18 #include <e32std.h> |
|
19 #include "w32comm.h" |
|
20 |
|
21 void TWriteDescriptorType::SetDescriptorOnIpcArgs(TIpcArgs& aIpcArgs) const |
|
22 { |
|
23 switch (iBufferType) |
|
24 { |
|
25 case EDes8: |
|
26 aIpcArgs.Set(KReplyBufferMessageSlot, reinterpret_cast<TDes8*>(iArgument)); |
|
27 break; |
|
28 case EDes16: |
|
29 aIpcArgs.Set(KReplyBufferMessageSlot, reinterpret_cast<TDes16*>(iArgument)); |
|
30 break; |
|
31 case EDesC8: |
|
32 case EDesC16: |
|
33 default: |
|
34 break; |
|
35 } |
|
36 } |
|
37 |
|
38 void TReadDescriptorType::SetDescriptorOnIpcArgs(TIpcArgs& aIpcArgs) const |
|
39 { |
|
40 switch (iBufferType) |
|
41 { |
|
42 case EDesC8: |
|
43 aIpcArgs.Set(KRemoteBufferMessageSlot, reinterpret_cast<const TDesC8*>(iArgument)); |
|
44 break; |
|
45 case EDesC16: |
|
46 aIpcArgs.Set(KRemoteBufferMessageSlot, reinterpret_cast<const TDesC16*>(iArgument)); |
|
47 break; |
|
48 case EDes8: |
|
49 case EDes16: |
|
50 default: |
|
51 break; |
|
52 } |
|
53 } |