|
1 // Copyright (c) 2006-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 #if !defined(SS_APIEXT_REGISTER_H_INCLUDED) |
|
22 #define SS_APIEXT_REGISTER_H_INCLUDED |
|
23 |
|
24 #include <comms-infras/api_ext_list.h> |
|
25 #include <comms-infras/api_ext_msg.h> |
|
26 #include <elements/nm_common.h> |
|
27 |
|
28 class CSockManData; |
|
29 |
|
30 namespace ESock |
|
31 { |
|
32 |
|
33 class CExtItfMsgPluginInfo; |
|
34 class TCommsApiExtRegister; |
|
35 |
|
36 /** |
|
37 @internalTechnology |
|
38 |
|
39 Utility class |
|
40 */ |
|
41 class TCommsApiExtTable |
|
42 { |
|
43 friend class TCommsApiExtRegister; |
|
44 |
|
45 private: |
|
46 explicit TCommsApiExtTable(TInt aExtensionId, const Meta::STypeId& aMsgImplTid); |
|
47 |
|
48 void AddClientL(TSubSessionUniqueId aClientId, Messages::CGlobals& aSockManData); |
|
49 TBool RemoveClient(TSubSessionUniqueId aClientId, Messages::CGlobals& aSockManData); |
|
50 static void DeregisterInterfaceOnCleanup(TAny* aTid); |
|
51 |
|
52 private: |
|
53 const TInt iExtensionId; |
|
54 const Meta::STypeId iMsgImplTid; |
|
55 CExtItfMsgPluginInfo* iMsgPluginInfo; |
|
56 RArray<TSubSessionUniqueId> iClients; //Extensions opened by this client |
|
57 }; |
|
58 |
|
59 /** |
|
60 @internalTechnology |
|
61 |
|
62 Utility class |
|
63 */ |
|
64 class TCommsApiExtRegister |
|
65 { |
|
66 public: |
|
67 explicit TCommsApiExtRegister(Messages::CGlobals& aSockManData); |
|
68 ~TCommsApiExtRegister(); |
|
69 void RegisterInterfaceL(TInt aExtItfId, const Meta::STypeId& aMsgImplTid, TSubSessionUniqueId aClientId); |
|
70 //Returns next client on this interface if any |
|
71 TSubSessionUniqueId FirstClient(TInt aExtItfId); |
|
72 TSubSessionUniqueId DeRegisterInterface(TInt aExtItfId, TSubSessionUniqueId aClientId); |
|
73 |
|
74 private: |
|
75 TInt FindApiExtClientsTable(TInt aExtItfId); |
|
76 |
|
77 private: |
|
78 Messages::CGlobals& iGlobals; |
|
79 RArray<TCommsApiExtTable> iApiExtList; |
|
80 }; |
|
81 |
|
82 } // namespace ESock |
|
83 |
|
84 #endif // SS_APIEXT_REGISTER_H_INCLUDED |
|
85 |