|
1 /* |
|
2 * Copyright (c) 2006-2009 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: Harvester servers session* |
|
15 */ |
|
16 |
|
17 |
|
18 #ifndef __CHARVESTERSERVERSESSION_H__ |
|
19 #define __CHARVESTERSERVERSESSION_H__ |
|
20 |
|
21 // INCLUDE FILES |
|
22 #include <e32base.h> |
|
23 |
|
24 // LOCAL INCLUDES |
|
25 #include "harvesterserver.h" |
|
26 |
|
27 // CLASS DECLARATION |
|
28 /** |
|
29 * CServerSession. |
|
30 * An instance of class CHarvesterServerSession is created for each client. |
|
31 */ |
|
32 class CHarvesterServerSession : public CSession2 |
|
33 { |
|
34 public: // Constructors and destructors |
|
35 |
|
36 /** |
|
37 * NewL. |
|
38 * Two-phased constructor. |
|
39 * @param aServer Harvester server implementation |
|
40 * @return Pointer to created CHarvesterServerSession object. |
|
41 */ |
|
42 static CHarvesterServerSession* NewL( CHarvesterServer& aServer ); |
|
43 |
|
44 /** |
|
45 * NewLC. |
|
46 * Two-phased constructor. |
|
47 * @param aServer Harvester server implementation |
|
48 * @return Pointer to created CHarvesterServerSession object. |
|
49 */ |
|
50 static CHarvesterServerSession* NewLC( CHarvesterServer& aServer ); |
|
51 |
|
52 /** |
|
53 * ~CHarvesterServerSession |
|
54 * Destructor. |
|
55 */ |
|
56 virtual ~CHarvesterServerSession(); |
|
57 |
|
58 |
|
59 protected: |
|
60 |
|
61 /** |
|
62 * ~ServiceL |
|
63 * Protected ServiceL method |
|
64 * @param aMessage Message receved from the Harvester Client |
|
65 */ |
|
66 void ServiceL( const RMessage2& aMessage ); |
|
67 |
|
68 virtual void Disconnect(const RMessage2 &aMessage); |
|
69 |
|
70 private: // Constructors and destructors |
|
71 |
|
72 /** |
|
73 * CMdSServerSession. |
|
74 * C++ default constructor. |
|
75 * @param aServer Harvester server implementation |
|
76 */ |
|
77 CHarvesterServerSession( CHarvesterServer& aServer ); |
|
78 |
|
79 /** |
|
80 * ConstructL. |
|
81 * 2nd phase constructor. |
|
82 */ |
|
83 void ConstructL(); |
|
84 |
|
85 /** |
|
86 * Reference to Harvester Server implementation |
|
87 */ |
|
88 CHarvesterServer& iServer; |
|
89 |
|
90 }; |
|
91 |
|
92 #endif // __CHARVESTERSERVERSESSION_H__ |
|
93 |
|
94 |
|
95 |
|
96 |