1 /* |
|
2 * Copyright (c) 2007 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: Server session for BS engine |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_CBSSERVERSESSION_H |
|
20 #define C_CBSSERVERSESSION_H |
|
21 |
|
22 class CBSServer; |
|
23 |
|
24 /** |
|
25 * Server session. |
|
26 * An instance of class CBSServerSession is created for each client |
|
27 */ |
|
28 class CBSServerSession : public CSession2 |
|
29 { |
|
30 public: |
|
31 /** |
|
32 * Create a CBSServerSession object using two phase construction, |
|
33 * and return a pointer to the created object |
|
34 * |
|
35 * @since S60 3.2 |
|
36 * @param aServer CBSServer |
|
37 * @return pointer to new session |
|
38 */ |
|
39 static CBSServerSession* NewL( CBSServer* aServer ); |
|
40 |
|
41 /** |
|
42 * Create a CBSServerSession object using two phase construction, |
|
43 * and return a pointer to the created object |
|
44 * |
|
45 * @since S60 3.2 |
|
46 * @param aServer CBSServer |
|
47 * @return pointer to new session |
|
48 */ |
|
49 static CBSServerSession* NewLC( CBSServer* aServer ); |
|
50 |
|
51 /** |
|
52 * Destructor. |
|
53 */ |
|
54 virtual ~CBSServerSession(); |
|
55 |
|
56 // from base class CSession |
|
57 |
|
58 /** |
|
59 * From CSession. |
|
60 * Called after a service request from client; from class CSession |
|
61 * |
|
62 * @since S60 3.2 |
|
63 * @param aMessage message from client (containing requested operation and any data) |
|
64 */ |
|
65 void ServiceL( const RMessage2& aMessage ); |
|
66 |
|
67 private: |
|
68 |
|
69 CBSServerSession( CBSServer* aServer ); |
|
70 |
|
71 void ConstructL(); |
|
72 |
|
73 /** |
|
74 * Read text from message from given slot |
|
75 * |
|
76 * @since S60 3.2 |
|
77 * @param aMessage message |
|
78 * @param aSlot slot number |
|
79 * @return descriptor |
|
80 */ |
|
81 HBufC8* ReadTextLC( const RMessage2& aMessage, TInt aSlot ); |
|
82 |
|
83 private: |
|
84 // data |
|
85 |
|
86 /** |
|
87 * Pointer to server |
|
88 * Not own. |
|
89 */ |
|
90 CBSServer* iBSServer; |
|
91 /** |
|
92 * UID of application assigned to the session |
|
93 */ |
|
94 TUid iAppUid; |
|
95 }; |
|
96 |
|
97 #endif // C_CADATSERVERSESSION_H |
|