|
1 /* |
|
2 * Copyright (c) 2003 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 of WimServer sessions |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CWIMSESSIONREGISTRY_H |
|
21 #define CWIMSESSIONREGISTRY_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class CWimSession; |
|
29 |
|
30 |
|
31 // CLASS DECLARATION |
|
32 |
|
33 /** |
|
34 * This class holds array of sessions of server. |
|
35 * |
|
36 * @since Series60 2.1 |
|
37 */ |
|
38 class CWimSessionRegistry : public CBase |
|
39 { |
|
40 public: // Constructors and destructor |
|
41 |
|
42 /** |
|
43 * Two-phased constructor. |
|
44 */ |
|
45 static CWimSessionRegistry* NewL(); |
|
46 |
|
47 /** |
|
48 * Destructor. |
|
49 */ |
|
50 virtual ~CWimSessionRegistry(); |
|
51 |
|
52 public: // New functions |
|
53 |
|
54 /** |
|
55 * Add session to array |
|
56 * @param aSession Session to be added |
|
57 * @return void |
|
58 */ |
|
59 void AddSessionL( CWimSession* aSession ); |
|
60 |
|
61 /** |
|
62 * Get array of sessions |
|
63 * @param aSessions Session array |
|
64 * @return void |
|
65 */ |
|
66 void GetSessionsL( RArray<CWimSession*>& aSessions ) const; |
|
67 |
|
68 /** |
|
69 * Remove session from sessions array |
|
70 * @param aSession Session to be removed |
|
71 * @return void |
|
72 */ |
|
73 void RemoveSession( CWimSession* aSession ); |
|
74 |
|
75 private: |
|
76 |
|
77 /** |
|
78 * C++ default constructor. |
|
79 */ |
|
80 CWimSessionRegistry(); |
|
81 |
|
82 /** |
|
83 * By default Symbian 2nd phase constructor is private. |
|
84 */ |
|
85 void ConstructL(); |
|
86 |
|
87 private: |
|
88 // Array of sessions |
|
89 RArray<CWimSession*> iSessions; |
|
90 |
|
91 }; |
|
92 |
|
93 #endif // CWIMSESSIONREGISTRY_H |
|
94 |