|
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: This class represents the base class for all server-side subsession |
|
15 * classes. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef CCBSOBJECT_H |
|
21 #define CCBSOBJECT_H |
|
22 |
|
23 // INCLUDES |
|
24 |
|
25 #include <e32base.h> |
|
26 #include "CbsCommon.h" |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class CCbsSession; |
|
30 |
|
31 // CLASS DECLARATION |
|
32 |
|
33 /** |
|
34 * CCbsSession is the base class for the classes that represent |
|
35 * server-side subsessions. |
|
36 * |
|
37 * It provides some convience functions is remove redundancy of |
|
38 * subsession classes. |
|
39 */ |
|
40 class CCbsObject : public CObject |
|
41 { |
|
42 public: // New functions |
|
43 /** |
|
44 * Constructor. |
|
45 * |
|
46 * @param aSession Pointer to the session. |
|
47 */ |
|
48 CCbsObject( CCbsSession& aSession ); |
|
49 |
|
50 /** |
|
51 * Destructor. |
|
52 */ |
|
53 ~CCbsObject(); |
|
54 |
|
55 /** |
|
56 * Handles the requests for the object. |
|
57 * |
|
58 * Implemented in subsession classes. |
|
59 * |
|
60 * @param aMessage Request to be handled. |
|
61 * @return Boolean value indicating whether |
|
62 * the request was handled. |
|
63 */ |
|
64 virtual TBool HandleRequestsL( const RMessage2& aMessage ) = 0; |
|
65 |
|
66 /** |
|
67 * Returns the message of current client request. |
|
68 * |
|
69 * @return The message object of the current |
|
70 * client request. |
|
71 */ |
|
72 const RMessage2& Message(); |
|
73 |
|
74 /** |
|
75 * Returns a reference to the session. |
|
76 * |
|
77 * @return Main session object. |
|
78 */ |
|
79 CCbsSession& Session(); |
|
80 |
|
81 /** |
|
82 * Panics the client. |
|
83 * |
|
84 * @param aPanic Reason for panic. |
|
85 */ |
|
86 void PanicClient( TCbsSessionPanic aPanic ) const; |
|
87 |
|
88 private: // Data |
|
89 |
|
90 // The session to which this object belongs. |
|
91 CCbsSession& iSession; |
|
92 |
|
93 }; |
|
94 |
|
95 #endif // CCBSOBJECT_H |
|
96 |
|
97 // End of File |
|
98 |
|
99 |