commsfwsupport/commselements/NetMessages/inc/NetMessages.h
changeset 0 dfb7c4ff071f
equal deleted inserted replaced
-1:000000000000 0:dfb7c4ff071f
       
     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 "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  @file
       
    18  @internalTechnology
       
    19 */
       
    20 
       
    21 
       
    22 #if !defined(NETMESSAGES_H)
       
    23 #define NETMESSAGES_H
       
    24 
       
    25 #include <elements/metadata.h>
       
    26 #include <elements/metabuffer.h>
       
    27 
       
    28 #define NET_MESSAGE_DECL( _class, _uid, _type ) \
       
    29 public: \
       
    30 	static inline _class * NewL(void) \
       
    31 		{ Meta::STypeId typeId = { (_uid ) , (_type) }; \
       
    32 	  return static_cast< _class *>(Meta::SMetaDataECom::NewInstanceL(typeId)); } \
       
    33 	static inline _class * LoadL(TPtrC8& aDes) \
       
    34 		{ return static_cast< _class *>(Meta::SMetaDataECom::LoadL(aDes)); } \
       
    35 	static inline TUid GetUid(void) { return TUid::Uid(_uid) ; } \
       
    36 public: \
       
    37 	DATA_VTABLE
       
    38 
       
    39 namespace NetMessages
       
    40 {
       
    41 
       
    42 /** An class recognised by CWorkerThread. When a client of the root server wants to send a message to a module
       
    43 via RRootServ::SendMessage method it serialises an instance of CNetMessage based class and passes it as
       
    44 a aData parameter
       
    45 @see RRootServ::SendMessage
       
    46 @released since 9.1
       
    47 */
       
    48 class CMessage : public Meta::SMetaDataECom
       
    49 	{
       
    50 public:
       
    51 	TYPEID_TABLE
       
    52 	};
       
    53 
       
    54 } // namespace NetMessages
       
    55 #endif	// NETMESSAGES_H
       
    56