|
1 /* |
|
2 * Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Registry for subsessions |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __CSuplNetInitiatedSession_H__ |
|
21 #define __CSuplNetInitiatedSession_H__ |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class CSuplNetInitiatedSession; |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 /** |
|
32 * Class to handle subsession registry entries for a session |
|
33 */ |
|
34 class CSuplNetInitiatedRegistry :public CBase |
|
35 { |
|
36 public: // Constructors and destructor |
|
37 |
|
38 /** |
|
39 * Two-phased constructor |
|
40 * |
|
41 * @return a new instance of this class |
|
42 */ |
|
43 static CSuplNetInitiatedRegistry* NewL(); |
|
44 |
|
45 /** |
|
46 * C++ destructor |
|
47 */ |
|
48 ~CSuplNetInitiatedRegistry(); |
|
49 |
|
50 public: // New functions |
|
51 |
|
52 /** |
|
53 * Retreives the appropriate subsession. |
|
54 * |
|
55 * @param aHandle the subsession handle |
|
56 * @return a subsession |
|
57 */ |
|
58 CSuplNetInitiatedSession* SubSessionFromHandleL( |
|
59 /* IN */ TUint aHandle |
|
60 ); |
|
61 |
|
62 /** |
|
63 * Retreives the appropriate subsession. |
|
64 * |
|
65 * @param aIndex the index in the list |
|
66 * @return a subsession, NULL if no session at specified index. |
|
67 */ |
|
68 CSuplNetInitiatedSession* SubSessionFromIndex( |
|
69 /* IN */ TInt aIndex |
|
70 ); |
|
71 |
|
72 /** |
|
73 * Returns the maximum number of reference counting |
|
74 * objects that the object index can hold before |
|
75 * internal buffers need to be expanded. |
|
76 * @return the maximum number of reference counting objects. |
|
77 */ |
|
78 TInt Count(); |
|
79 |
|
80 /** |
|
81 * Closes a subsession. |
|
82 * |
|
83 * @param aHandle a handle to the subsession |
|
84 */ |
|
85 void RemoveInstance( |
|
86 /* IN */ TUint aHandle |
|
87 ); |
|
88 |
|
89 /** |
|
90 * Adds an object instance to the registry and |
|
91 * transfers object ownership to the registry. |
|
92 * |
|
93 * @param aSubSession an object instance |
|
94 * @return a registry handle to the object instance. |
|
95 */ |
|
96 TInt AddInstanceL( |
|
97 /* IN */ CSuplNetInitiatedSession* aSubSession |
|
98 ); |
|
99 |
|
100 private: |
|
101 |
|
102 /** |
|
103 * C++ default constructor. |
|
104 */ |
|
105 CSuplNetInitiatedRegistry(); |
|
106 |
|
107 /** |
|
108 * By default EPOC constructor is private. |
|
109 */ |
|
110 void ConstructL(); |
|
111 |
|
112 // By default, prohibit copy constructor |
|
113 CSuplNetInitiatedRegistry( const CSuplNetInitiatedRegistry& ); |
|
114 // Prohibit assigment operator |
|
115 CSuplNetInitiatedRegistry& operator= ( const CSuplNetInitiatedRegistry& ); |
|
116 |
|
117 private: // Data |
|
118 |
|
119 CObjectIx* iRegistryIndex; |
|
120 CObjectCon* iRegistryContainer; |
|
121 CObjectConIx* iRegistryContainerIndex; |
|
122 }; |
|
123 |
|
124 |
|
125 #endif // __CSuplNetInitiatedSession_H__ |
|
126 |
|
127 // End of File |