|
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 file contains the header file of the CCbsMcnListener class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CCBSMCNLISTENER_H |
|
20 #define CCBSMCNLISTENER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> // CActive |
|
24 #include "CbsMcnCommon.h" |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class CMcn; |
|
28 class RCbsMcnSession; |
|
29 |
|
30 // CLASS DECLARATION |
|
31 |
|
32 /** |
|
33 * Listens for incoming MCN messages. Functionality is based on basic |
|
34 * active object implementation. |
|
35 */ |
|
36 class CCbsMcnListener |
|
37 : public CActive |
|
38 { |
|
39 public: // New functions |
|
40 /** |
|
41 * Creates a new Mcn listener. |
|
42 * @return A new CCbsMcnListener instance. |
|
43 */ |
|
44 static CCbsMcnListener* NewL( CMcn& aMcn, RCbsMcnSession& aSession ); |
|
45 |
|
46 /** |
|
47 * Destructor. |
|
48 */ |
|
49 ~CCbsMcnListener(); |
|
50 |
|
51 private: // From CActive |
|
52 |
|
53 /** |
|
54 * This method is called when an Mcn message is received. |
|
55 * The message is stored in the buffer. |
|
56 */ |
|
57 void RunL(); |
|
58 |
|
59 /** |
|
60 * Cancels the outstanding Mcn request. |
|
61 */ |
|
62 void DoCancel(); |
|
63 |
|
64 private: |
|
65 /** |
|
66 Constructor. |
|
67 */ |
|
68 CCbsMcnListener( CMcn& aMcn, RCbsMcnSession& aSession ); |
|
69 |
|
70 /** |
|
71 * 2nd-phase constructor. |
|
72 */ |
|
73 void ConstructL(); |
|
74 |
|
75 /** |
|
76 * Receive an Mcn message from network. |
|
77 */ |
|
78 void Receive(); |
|
79 |
|
80 private: // Data |
|
81 |
|
82 // The Mcn client to use for reception. |
|
83 CMcn& iMcn; |
|
84 |
|
85 // Session to the Mcn client. |
|
86 RCbsMcnSession& iSession; |
|
87 |
|
88 // MCN message for IPC |
|
89 TCbsMcnMessage iMcnMessage; |
|
90 |
|
91 // Package for MCN message |
|
92 TPckg<TCbsMcnMessage> iMcnPckg; |
|
93 }; |
|
94 |
|
95 #endif // CCBSMCNLISTENER_H |
|
96 |
|
97 // End of File |
|
98 |
|
99 |