|
1 /* |
|
2 * Copyright (c) 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: Declaration of CCDSYDOSServerRequestManager class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CDSYDOSSERVERREQUESTMANAGER_H |
|
20 #define CDSYDOSSERVERREQUESTMANAGER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include "CDSYServiceLogic.h" |
|
25 |
|
26 |
|
27 // CONSTANTS |
|
28 // MACROS |
|
29 // DATA TYPES |
|
30 // FUNCTION PROTOTYPES |
|
31 // FORWARD DECLARATIONS |
|
32 class TCDSYMessage; |
|
33 class CCDSYMessageBufferItem; |
|
34 class CCDSYController; |
|
35 |
|
36 |
|
37 /** |
|
38 * CCDSYDOSServerRequestManager |
|
39 * This class implements the CCDSYDOSServerRequestManager, |
|
40 * which sends the messages to controller and gets the responses to the messages. |
|
41 */ |
|
42 NONSHARABLE_CLASS( CCDSYDOSServerRequestManager ): public CBase, public MCDSYServiceLogic |
|
43 { |
|
44 public: |
|
45 /** |
|
46 * Destructor. |
|
47 */ |
|
48 ~CCDSYDOSServerRequestManager(); |
|
49 |
|
50 /** |
|
51 * Creates a new instance of CCDSYDOSServerRequestManager. |
|
52 * @param CCDSYController& aCDSYController Reference to CCDSYController. |
|
53 * @return CCDSYDOSServerRequestManager* Pointer to an instance of CCDSYDOSServerRequestManager. |
|
54 */ |
|
55 static CCDSYDOSServerRequestManager* NewL( CCDSYController& aCDSYController ); |
|
56 |
|
57 /** |
|
58 * Sends the message to CCDSYController. Provides waits for the response to the message. |
|
59 * @param TCDSYMessage& aCDSYMessage Reference to the message to be sent. |
|
60 * @return void |
|
61 */ |
|
62 void SendMessageL( TCDSYMessage& aCDSYMessage ); |
|
63 |
|
64 /** |
|
65 * Sends the message to CCDSYController. Returns after the message has been sent. |
|
66 * @param TCDSYMessage& aCDSYMessage Reference to the message to be sent. |
|
67 * @param RMessagePtr2 aMessage Pointer to the message. |
|
68 * @return void |
|
69 */ |
|
70 void SendMessageL( TCDSYMessage& aCDSYMessage, RMessagePtr2 aMessage ); |
|
71 |
|
72 /** |
|
73 * Processes the response to the message sent. |
|
74 * @param TCDSYMessage& aCDSYMessage Reference to the message received. |
|
75 * @return void |
|
76 */ |
|
77 void ProcessMessageL( TCDSYMessage& aCDSYMessage ); |
|
78 |
|
79 /** |
|
80 * Expires the message. Does nothing. |
|
81 * @param TCDSYMessage& aCDSYMessage Message to be expired. |
|
82 * @return void |
|
83 */ |
|
84 void ExpireMessageL( TCDSYMessage& aCDSYMessage ); |
|
85 |
|
86 /** |
|
87 * Cancels the async request. |
|
88 * @param TUint32 aTransactionID Transaction ID. |
|
89 * @param TInt aReason Cancel reason. |
|
90 * @return void |
|
91 */ |
|
92 void Cancel( TUint32 aTransactionID, TInt aReason ); |
|
93 |
|
94 private: |
|
95 /** |
|
96 * Constructor. |
|
97 * @param CCDSYController& aCDSYController Reference to CCDSYController. |
|
98 */ |
|
99 CCDSYDOSServerRequestManager( CCDSYController& aCDSYController ); |
|
100 |
|
101 /** |
|
102 * 2nd phase constructor. |
|
103 * @return void |
|
104 */ |
|
105 void ConstructL(); |
|
106 |
|
107 private: |
|
108 CCDSYController& iCDSYController; // Reference to CCDSYController. |
|
109 RPointerArray<CCDSYMessageBufferItem> iMessages;// Messages waiting for response. |
|
110 |
|
111 public: |
|
112 TBool iLDSYFind; |
|
113 }; |
|
114 |
|
115 |
|
116 |
|
117 #endif //#ifndef CDSYDOSSERVERREQUESTMANAGER_H |
|
118 |
|
119 |
|
120 |
|
121 // End of File |