|
1 // Copyright (c) 2002-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 // |
|
15 |
|
16 |
|
17 #if !defined(__W32COMM_H__) |
|
18 #define __W32COMM_H__ |
|
19 |
|
20 |
|
21 const TUint KBufferMessageSlot =0; |
|
22 const TUint KReplyBufferMessageSlot =1; |
|
23 const TUint KRemoteBufferMessageSlot =2; |
|
24 |
|
25 const TUint KAsyncMessageSlotAnimDllHandle =0; |
|
26 const TUint KAsyncMessageSlotAnimHandle =1; |
|
27 |
|
28 class TDescriptorType |
|
29 { |
|
30 public: |
|
31 enum TBufferType |
|
32 { |
|
33 EDes8, |
|
34 EDes16, |
|
35 EDesC8, |
|
36 EDesC16, |
|
37 }; |
|
38 public: |
|
39 virtual void SetDescriptorOnIpcArgs(TIpcArgs& aIpcArgs) const=0; |
|
40 protected: |
|
41 inline TDescriptorType(TInt aArgument, TBufferType aBufferType) : iArgument(aArgument), iBufferType(aBufferType) {} |
|
42 protected: |
|
43 TInt iArgument; |
|
44 TBufferType iBufferType; |
|
45 }; |
|
46 |
|
47 class TReadDescriptorType : public TDescriptorType |
|
48 { |
|
49 public: |
|
50 inline TReadDescriptorType(const TDesC8* aBuffer) : TDescriptorType((TInt)aBuffer, EDesC8) |
|
51 { |
|
52 } |
|
53 inline TReadDescriptorType(const TDesC16* aBuffer) : TDescriptorType((TInt)aBuffer, EDesC16) |
|
54 { |
|
55 } |
|
56 public: // from TDescriptorType |
|
57 void SetDescriptorOnIpcArgs(TIpcArgs& aIpcArgs) const; |
|
58 }; |
|
59 |
|
60 class TWriteDescriptorType : public TDescriptorType |
|
61 { |
|
62 public: |
|
63 inline TWriteDescriptorType(TDes8* aBuffer) : TDescriptorType((TInt)aBuffer, EDes8) |
|
64 { |
|
65 } |
|
66 inline TWriteDescriptorType(TDes16* aBuffer) : TDescriptorType((TInt)aBuffer, EDes16) |
|
67 { |
|
68 } |
|
69 public: // from TDescriptorType |
|
70 void SetDescriptorOnIpcArgs(TIpcArgs& aIpcArgs) const; |
|
71 }; |
|
72 |
|
73 |
|
74 |
|
75 #endif |