author | William Roberts <williamr@symbian.org> |
Wed, 31 Mar 2010 12:33:34 +0100 | |
branch | Symbian3 |
changeset 4 | 837f303aceeb |
permissions | -rw-r--r-- |
williamr@4 | 1 |
// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
williamr@4 | 2 |
// All rights reserved. |
williamr@4 | 3 |
// This component and the accompanying materials are made available |
williamr@4 | 4 |
// under the terms of "Eclipse Public License v1.0" |
williamr@4 | 5 |
// which accompanies this distribution, and is available |
williamr@4 | 6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html". |
williamr@4 | 7 |
// |
williamr@4 | 8 |
// Initial Contributors: |
williamr@4 | 9 |
// Nokia Corporation - initial contribution. |
williamr@4 | 10 |
// |
williamr@4 | 11 |
// Contributors: |
williamr@4 | 12 |
// |
williamr@4 | 13 |
// Description: |
williamr@4 | 14 |
// |
williamr@4 | 15 |
|
williamr@4 | 16 |
/** |
williamr@4 | 17 |
@file |
williamr@4 | 18 |
@internalTechnology |
williamr@4 | 19 |
*/ |
williamr@4 | 20 |
|
williamr@4 | 21 |
#if !defined(SS_APIEXT_REGISTER_H_INCLUDED) |
williamr@4 | 22 |
#define SS_APIEXT_REGISTER_H_INCLUDED |
williamr@4 | 23 |
|
williamr@4 | 24 |
#include <comms-infras/api_ext_list.h> |
williamr@4 | 25 |
#include <comms-infras/api_ext_msg.h> |
williamr@4 | 26 |
#include <elements/nm_common.h> |
williamr@4 | 27 |
|
williamr@4 | 28 |
class CSockManData; |
williamr@4 | 29 |
|
williamr@4 | 30 |
namespace ESock |
williamr@4 | 31 |
{ |
williamr@4 | 32 |
|
williamr@4 | 33 |
class CExtItfMsgPluginInfo; |
williamr@4 | 34 |
class TCommsApiExtRegister; |
williamr@4 | 35 |
|
williamr@4 | 36 |
/** |
williamr@4 | 37 |
@internalTechnology |
williamr@4 | 38 |
|
williamr@4 | 39 |
Utility class |
williamr@4 | 40 |
*/ |
williamr@4 | 41 |
class TCommsApiExtTable |
williamr@4 | 42 |
{ |
williamr@4 | 43 |
friend class TCommsApiExtRegister; |
williamr@4 | 44 |
|
williamr@4 | 45 |
private: |
williamr@4 | 46 |
explicit TCommsApiExtTable(TInt aExtensionId, const Meta::STypeId& aMsgImplTid); |
williamr@4 | 47 |
|
williamr@4 | 48 |
void AddClientL(TSubSessionUniqueId aClientId, Messages::CGlobals& aSockManData); |
williamr@4 | 49 |
TBool RemoveClient(TSubSessionUniqueId aClientId, Messages::CGlobals& aSockManData); |
williamr@4 | 50 |
static void DeregisterInterfaceOnCleanup(TAny* aTid); |
williamr@4 | 51 |
|
williamr@4 | 52 |
private: |
williamr@4 | 53 |
const TInt iExtensionId; |
williamr@4 | 54 |
const Meta::STypeId iMsgImplTid; |
williamr@4 | 55 |
CExtItfMsgPluginInfo* iMsgPluginInfo; |
williamr@4 | 56 |
RArray<TSubSessionUniqueId> iClients; //Extensions opened by this client |
williamr@4 | 57 |
}; |
williamr@4 | 58 |
|
williamr@4 | 59 |
/** |
williamr@4 | 60 |
@internalTechnology |
williamr@4 | 61 |
|
williamr@4 | 62 |
Utility class |
williamr@4 | 63 |
*/ |
williamr@4 | 64 |
class TCommsApiExtRegister |
williamr@4 | 65 |
{ |
williamr@4 | 66 |
public: |
williamr@4 | 67 |
explicit TCommsApiExtRegister(Messages::CGlobals& aSockManData); |
williamr@4 | 68 |
~TCommsApiExtRegister(); |
williamr@4 | 69 |
void RegisterInterfaceL(TInt aExtItfId, const Meta::STypeId& aMsgImplTid, TSubSessionUniqueId aClientId); |
williamr@4 | 70 |
//Returns next client on this interface if any |
williamr@4 | 71 |
TSubSessionUniqueId FirstClient(TInt aExtItfId); |
williamr@4 | 72 |
TSubSessionUniqueId DeRegisterInterface(TInt aExtItfId, TSubSessionUniqueId aClientId); |
williamr@4 | 73 |
|
williamr@4 | 74 |
private: |
williamr@4 | 75 |
TInt FindApiExtClientsTable(TInt aExtItfId); |
williamr@4 | 76 |
|
williamr@4 | 77 |
private: |
williamr@4 | 78 |
Messages::CGlobals& iGlobals; |
williamr@4 | 79 |
RArray<TCommsApiExtTable> iApiExtList; |
williamr@4 | 80 |
}; |
williamr@4 | 81 |
|
williamr@4 | 82 |
} // namespace ESock |
williamr@4 | 83 |
|
williamr@4 | 84 |
#endif // SS_APIEXT_REGISTER_H_INCLUDED |
williamr@4 | 85 |