epoc32/include/comms-infras/ss_apiext_register.h
branchSymbian3
changeset 4 837f303aceeb
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/comms-infras/ss_apiext_register.h	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -0,0 +1,85 @@
     1.4 +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +/**
    1.20 + @file
    1.21 + @internalTechnology
    1.22 +*/
    1.23 +
    1.24 +#if !defined(SS_APIEXT_REGISTER_H_INCLUDED)
    1.25 +#define SS_APIEXT_REGISTER_H_INCLUDED
    1.26 +
    1.27 +#include <comms-infras/api_ext_list.h>
    1.28 +#include <comms-infras/api_ext_msg.h>
    1.29 +#include <elements/nm_common.h>
    1.30 +
    1.31 +class CSockManData;
    1.32 +
    1.33 +namespace ESock
    1.34 +{
    1.35 +
    1.36 +class CExtItfMsgPluginInfo;
    1.37 +class TCommsApiExtRegister;
    1.38 +
    1.39 +/**
    1.40 +	@internalTechnology
    1.41 +
    1.42 +	Utility class
    1.43 +*/
    1.44 +class TCommsApiExtTable
    1.45 +	{
    1.46 +	friend class TCommsApiExtRegister;
    1.47 +
    1.48 +private:
    1.49 +	explicit TCommsApiExtTable(TInt aExtensionId, const Meta::STypeId& aMsgImplTid);
    1.50 +
    1.51 +	void AddClientL(TSubSessionUniqueId aClientId, Messages::CGlobals& aSockManData);
    1.52 +	TBool RemoveClient(TSubSessionUniqueId aClientId, Messages::CGlobals& aSockManData);
    1.53 +	static void DeregisterInterfaceOnCleanup(TAny* aTid);
    1.54 +
    1.55 +private:
    1.56 +	const TInt iExtensionId;
    1.57 +	const Meta::STypeId iMsgImplTid;
    1.58 +	CExtItfMsgPluginInfo* iMsgPluginInfo;
    1.59 +	RArray<TSubSessionUniqueId> iClients; //Extensions opened by this client
    1.60 +	};
    1.61 +
    1.62 +/**
    1.63 +	@internalTechnology
    1.64 +
    1.65 +	Utility class
    1.66 +*/
    1.67 +class TCommsApiExtRegister
    1.68 +	{
    1.69 +public:
    1.70 +	explicit TCommsApiExtRegister(Messages::CGlobals& aSockManData);
    1.71 +	~TCommsApiExtRegister();
    1.72 +	void RegisterInterfaceL(TInt aExtItfId, const Meta::STypeId& aMsgImplTid, TSubSessionUniqueId aClientId);
    1.73 +	//Returns next client on this interface if any
    1.74 +	TSubSessionUniqueId FirstClient(TInt aExtItfId);
    1.75 +	TSubSessionUniqueId DeRegisterInterface(TInt aExtItfId, TSubSessionUniqueId aClientId);
    1.76 +
    1.77 +private:
    1.78 +	TInt FindApiExtClientsTable(TInt aExtItfId);
    1.79 +
    1.80 +private:
    1.81 +	Messages::CGlobals& iGlobals;
    1.82 +	RArray<TCommsApiExtTable> iApiExtList;
    1.83 +	};
    1.84 +
    1.85 +} // namespace ESock
    1.86 +
    1.87 +#endif // SS_APIEXT_REGISTER_H_INCLUDED
    1.88 +