|
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: it is used to update session slot state and signal new |
|
15 * session slot events |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef __RPENGSTORAGEADMINSUBCLIENT_H__ |
|
21 #define __RPENGSTORAGEADMINSUBCLIENT_H__ |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32def.h> |
|
25 #include "PEngStorageGlobals.h" |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class RPEngStorageAdminClient; |
|
29 |
|
30 /** |
|
31 * Storage Admin sub-client |
|
32 * it is used to update session slot state and |
|
33 * signal new session slot events |
|
34 * |
|
35 * @lib PEngStoreMan2.dll |
|
36 * @since 3.0 |
|
37 */ |
|
38 |
|
39 // CLASS DECLARATION |
|
40 class RPEngStorageAdminSubClient: public RSubSessionBase |
|
41 |
|
42 { |
|
43 public: // Constructors and destructors |
|
44 |
|
45 /** |
|
46 * C++ default constructor. |
|
47 */ |
|
48 IMPORT_C RPEngStorageAdminSubClient( ); |
|
49 |
|
50 /** |
|
51 * Destructor. |
|
52 */ |
|
53 IMPORT_C ~RPEngStorageAdminSubClient( void ); |
|
54 |
|
55 public: // new methods |
|
56 |
|
57 /** |
|
58 * Connects to the presence server |
|
59 * |
|
60 * @since 3.0 |
|
61 * @param aAdminClient main admin client |
|
62 * @param aSessionName packed session slot Id |
|
63 * @return KErrNone or any of system wide error codes |
|
64 */ |
|
65 IMPORT_C TInt Connect( |
|
66 RPEngStorageAdminClient& aAdminClient, |
|
67 const TDesC8& aSesssionName ); |
|
68 |
|
69 /** |
|
70 * Close connection to the presence server |
|
71 * When this sub-session is closed it is assumed that |
|
72 * State of the connection is closed |
|
73 * |
|
74 * @since 3.0 |
|
75 */ |
|
76 IMPORT_C void Close(); |
|
77 |
|
78 public: // new Storage management Functions |
|
79 |
|
80 /** |
|
81 * Update Presence State of defined connection. |
|
82 * |
|
83 * @since 3.0 |
|
84 * @param aState state of the Session Slot, in case |
|
85 * aEven is not reconstructed, this value |
|
86 * is used instead to determine state of the |
|
87 * session |
|
88 * @param aEvent new event of session slot from the Presence Server |
|
89 * @return KErrNone if notification went OK, |
|
90 * otherwise system wide error code |
|
91 */ |
|
92 IMPORT_C TInt NotifyEvent( const TDesC8& aEvent ); |
|
93 |
|
94 /** |
|
95 * Notify error from to the listeners |
|
96 * |
|
97 * @since 3.0 |
|
98 * @param aError code to be notified to listeners |
|
99 */ |
|
100 IMPORT_C TInt NotifyError( TInt aError ); |
|
101 |
|
102 /** |
|
103 * Check if Application Id is registered for given session slot |
|
104 * |
|
105 * @since 3.0 |
|
106 * @param aAppId application Id |
|
107 * @return KErrNone if registered, KErrNotFound if not |
|
108 * system wide error code if something other goes wrong |
|
109 */ |
|
110 IMPORT_C TInt CheckAppIdRegistration( const TDesC& aAppId ); |
|
111 |
|
112 private: // Data |
|
113 |
|
114 /// Flag if sub Session is connected to the Server |
|
115 TBool iConnected; |
|
116 |
|
117 |
|
118 }; |
|
119 |
|
120 #endif // __RPENGSTORAGEADMINSUBCLIENT_H__ |
|
121 |
|
122 |
|
123 |
|
124 |
|
125 |
|
126 |
|
127 |
|
128 |
|
129 |
|
130 |
|
131 |
|
132 |
|
133 |
|
134 |
|
135 |
|
136 |
|
137 |
|
138 |
|
139 |
|
140 |
|
141 |