|
1 /* |
|
2 * Copyright (c) 2002 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: Presence Server abstract interface |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef MPENGSERVER_H |
|
21 #define MPENGSERVER_H |
|
22 |
|
23 // INCLUDES |
|
24 |
|
25 #include <e32def.h> |
|
26 #include <bamdesca.h> |
|
27 #include "TPEngServerMessages.h" |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 class CPEngCSPSessManager; |
|
31 class CPEngSessionSlotId; |
|
32 class CPEngSubSession; |
|
33 |
|
34 // CLASS DECLARATION |
|
35 |
|
36 /** |
|
37 * Presence Server abstract interface |
|
38 * |
|
39 * @lib PEngServer2 |
|
40 * @since 3.0 |
|
41 */ |
|
42 class MPEngServer |
|
43 { |
|
44 public: // New functions used by the server session |
|
45 /** |
|
46 * Inform server about created session, |
|
47 * Access count is increased |
|
48 * |
|
49 * @since 3.0 |
|
50 */ |
|
51 virtual void SessionCreated() = 0; |
|
52 |
|
53 /** |
|
54 * Inform server about closing of the session |
|
55 * Access count is decreased |
|
56 * |
|
57 * @since 3.0 |
|
58 */ |
|
59 virtual void SessionDied() = 0; |
|
60 |
|
61 |
|
62 /** |
|
63 * Add subsession to the container |
|
64 * |
|
65 * @since 3.0 |
|
66 * @param aSubSession sub session instance |
|
67 */ |
|
68 virtual void AddSubSessionL( CPEngSubSession& aSubSession ) = 0; |
|
69 |
|
70 /** |
|
71 * Remove subsession from the container |
|
72 * |
|
73 * @since 3.0 |
|
74 * @param aSubSession subsession instance |
|
75 */ |
|
76 virtual void RemoveSubSessionL( CPEngSubSession& aSubSession ) = 0; |
|
77 |
|
78 public: // New functions used by the server Sub-Session |
|
79 |
|
80 /** |
|
81 * Session Manager |
|
82 * If session manager is not active it is created |
|
83 * |
|
84 * @since 3.0 |
|
85 * @param aSessionId session slot Id |
|
86 * @return session Manager |
|
87 */ |
|
88 virtual CPEngCSPSessManager* CSPSessionManagerLC( |
|
89 CPEngSessionSlotId& aSessionId ) = 0; |
|
90 |
|
91 public: // New functions used by the Session Manager |
|
92 |
|
93 /** |
|
94 * Remove Session Manager from the server |
|
95 * |
|
96 * @since 3.0 |
|
97 * @param aManager session manager to be removed |
|
98 */ |
|
99 virtual void RemoveCSPSessManager( |
|
100 CPEngCSPSessManager* aManager ) = 0; |
|
101 |
|
102 |
|
103 /** |
|
104 * Session is opened |
|
105 * Informs server that session slot is opened |
|
106 * Plugin server is informed about change is needed |
|
107 * @since 3.0 |
|
108 */ |
|
109 virtual void SessionOpened() = 0; |
|
110 |
|
111 /** |
|
112 * Session is closed |
|
113 * Informs server that session slot is closed |
|
114 * Plugin server is informed about change is needed |
|
115 * @since 3.0 |
|
116 */ |
|
117 virtual void SessionClosed() = 0; |
|
118 |
|
119 protected: //Destructor |
|
120 |
|
121 /** |
|
122 * Virtual inline destructor. |
|
123 * |
|
124 * Server cannot be destroyed through this interface |
|
125 * destroyed using this interface. |
|
126 */ |
|
127 virtual ~MPEngServer() {}; |
|
128 |
|
129 }; |
|
130 |
|
131 #endif // MPENGSERVER_H |
|
132 |
|
133 // End of File |