commsfwsupport/commselements/NetSubscribe/INC/NetSubscribe.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 #ifndef __NETSUBSCRIBE_H_
       
    22 #define __NETSUBSCRIBE_H_
       
    23 
       
    24 #include <e32base.h>
       
    25 #include <e32std.h>
       
    26 #include <elements/metadata.h>
       
    27 
       
    28 namespace NetSubscribe
       
    29 {
       
    30 /**
       
    31  * Maximum length(in bytes) of TEvent data part supported by NetSubscribe. 
       
    32  * The length is returned by SMetaData::Length()
       
    33  *
       
    34  * @see SMetaData
       
    35  */
       
    36 const TInt KMaxLength = 128;
       
    37 const TInt KTransportUid = 0x102055AA;
       
    38 enum ETransportTypes
       
    39 	{
       
    40 	/**
       
    41 	 * Publish/Subscribe Transport type
       
    42 	 */
       
    43 	EPublishSubscribe
       
    44 	//Another transport types should follow here
       
    45 	};
       
    46 	
       
    47 class TEventClientData;
       
    48 struct SSignalId;
       
    49 class TEventBase;
       
    50 class XSignal;
       
    51 class CNetSubscribe : public CBase
       
    52 /**
       
    53  * Client side of the signal subscription library. The class abstracts the mechanism the signals are
       
    54  * registered, trapped and the way event data are marhalled/demarshalled.
       
    55  * Derived class manages specific signal source & transport layer
       
    56  * Allows for multiple signal to be registered.
       
    57  *
       
    58  * @see XSignal
       
    59  *	@internalTechnology
       
    60  */
       
    61 	{
       
    62 	friend class TEvent;
       
    63 	
       
    64 public:
       
    65 	IMPORT_C static CNetSubscribe* NewL( const Meta::STypeId& aTransportId );
       
    66 	
       
    67 	IMPORT_C ~CNetSubscribe();
       
    68 
       
    69 protected:
       
    70 	explicit CNetSubscribe();
       
    71 	virtual void RegisterNewSignalL(TEventClientData& aData, const SSignalId& aSignalId ) = 0;
       
    72 
       
    73 	void RegisterSignalL(TEventClientData& aData, const SSignalId& aSignalId );
       
    74 	void DeRegisterSignal(TEventBase* aEvent);
       
    75 
       
    76 protected:		
       
    77 	RPointerArray<XSignal> iSignals;
       
    78 	};
       
    79 
       
    80 } // namespace NetSubscribe
       
    81 
       
    82 
       
    83 #endif // __NETSUBSCRIBE_H_
       
    84