|
1 // Copyright (c) 2004-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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 |
|
17 |
|
18 /** |
|
19 @file |
|
20 @internalTechnology |
|
21 */ |
|
22 |
|
23 |
|
24 #if !defined(NETMESSAGES_H) |
|
25 #define NETMESSAGES_H |
|
26 |
|
27 #include <comms-infras/metadata.h> |
|
28 #include <comms-infras/metabuffer.h> |
|
29 |
|
30 #define NET_MESSAGE_DECL( _class, _uid, _type ) \ |
|
31 public: \ |
|
32 static inline _class * NewL(void) \ |
|
33 { Meta::STypeId typeId( (_uid ) , (_type) ); \ |
|
34 return static_cast< _class *>(Meta::SMetaDataECom::NewInstanceL(typeId)); } \ |
|
35 static inline _class * LoadL(TPtrC8& aDes) \ |
|
36 { return static_cast< _class *>(Meta::SMetaDataECom::LoadL(aDes)); } \ |
|
37 static inline TUid GetUid(void) { return TUid::Uid(_uid) ; } \ |
|
38 public: \ |
|
39 DATA_VTABLE |
|
40 |
|
41 namespace NetMessages |
|
42 { |
|
43 |
|
44 /** An class recognised by CWorkerThread. When a client of the root server wants to send a message to a module |
|
45 via RRootServ::SendMessage method it serialises an instance of CNetMessage based class and passes it as |
|
46 a aData parameter |
|
47 @see RRootServ::SendMessage |
|
48 @released since 9.1 |
|
49 */ |
|
50 class CMessage : public Meta::SMetaDataECom |
|
51 { |
|
52 public: |
|
53 TYPEID_TABLE |
|
54 }; |
|
55 |
|
56 } // namespace NetMessages |
|
57 #endif // NETMESSAGES_H |