|
1 /* |
|
2 * Copyright (c) 2004 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: Messenger Negotiators. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MPHSRVMESSENGERNEGOTIATORS_H |
|
20 #define MPHSRVMESSENGERNEGOTIATORS_H |
|
21 |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include "PhSrvMessengerTypes.h" |
|
26 #include <CPhCltMessenger.h> |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class CPhSrvSubSessionBase; |
|
30 |
|
31 |
|
32 // CLASS DECLARATION |
|
33 |
|
34 |
|
35 /** |
|
36 * Abstract messenger negotiators class. |
|
37 * |
|
38 * @since 2.6 |
|
39 */ |
|
40 class MPhSrvMessengerNegotiator |
|
41 { |
|
42 public: // New functions |
|
43 |
|
44 /** |
|
45 * Make a messenger request. |
|
46 * |
|
47 * @param aSubSession Subsession for messenger. |
|
48 * @param aParameters The request parameters. |
|
49 * @param aMessage The received message. Used also in panic situations. |
|
50 */ |
|
51 virtual void NegotiatorRequest( |
|
52 CPhSrvSubSessionBase& aSubSession, |
|
53 const TPhCltMessengerParameters& aParameters, |
|
54 const RMessage2& aMessage ) = 0; |
|
55 |
|
56 /** |
|
57 * Cancel an oustanding messenger request. |
|
58 * If the specified subsession doesn't have an oustanding request, |
|
59 * then the subsession is paniced. |
|
60 * |
|
61 * @param aSubSession Subsession that has the messenger request. |
|
62 * @param aRequestType The type of the request to be canceled. |
|
63 */ |
|
64 virtual void NegotiatorRequestCancel( |
|
65 CPhSrvSubSessionBase& aSubSession, |
|
66 const TPhCltMessengerCommand aRequestType ) = 0; |
|
67 |
|
68 /** |
|
69 * Construct, i.e. reserve space for the subsession given |
|
70 * as parameter. |
|
71 * |
|
72 * @param aSubSession Subsession that is constructed. |
|
73 * @param aParameters The needed construct parameters. |
|
74 * @param aMessage The message that is completed when request is ready. |
|
75 */ |
|
76 virtual void NegotiatorRequestConstructL( |
|
77 CPhSrvSubSessionBase& aSubSession, |
|
78 const TPhCltMessengerParameters& aParameters, |
|
79 const RMessage2& aMessage ) = 0; |
|
80 |
|
81 /** |
|
82 * Delete, i.e. free all the space reserved for the subsession given |
|
83 * as parameter. |
|
84 * |
|
85 * @param aSubSession Subsession whose memory is freed. |
|
86 */ |
|
87 virtual void NegotiatorRequestDelete( |
|
88 CPhSrvSubSessionBase& aSubSession ) = 0; |
|
89 }; |
|
90 |
|
91 #endif // MPHSRVMESSENGERNEGOTIATORS_H |
|
92 |
|
93 |
|
94 // End of File |