|
1 /* |
|
2 * Copyright (c) 2005 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: Notify phone ring and caller ID |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef BTMCACTIVE_H |
|
20 #define BTMCACTIVE_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include "btmc_defs.h" |
|
25 |
|
26 class CBtmcActive; |
|
27 |
|
28 class MBtmcActiveObserver |
|
29 { |
|
30 public: |
|
31 virtual void RequestCompletedL(CBtmcActive& aActive, TInt aErr) = 0; |
|
32 |
|
33 virtual void CancelRequest(TInt aServiceId) = 0; |
|
34 }; |
|
35 |
|
36 /** |
|
37 * CBtmcActive generates RING for incoming call. |
|
38 */ |
|
39 NONSHARABLE_CLASS(CBtmcActive) : public CActive |
|
40 { |
|
41 public: |
|
42 |
|
43 /** |
|
44 * Two-phased constructor. |
|
45 */ |
|
46 static CBtmcActive* NewL(MBtmcActiveObserver& aObserver, |
|
47 CActive::TPriority aPriority, TInt aServiceId); |
|
48 |
|
49 static CBtmcActive* NewLC(MBtmcActiveObserver& aObserver, |
|
50 CActive::TPriority aPriority, TInt aServiceId); |
|
51 |
|
52 /** |
|
53 * Destructor. |
|
54 */ |
|
55 ~CBtmcActive(); |
|
56 |
|
57 public: |
|
58 |
|
59 virtual void GoActive(); |
|
60 |
|
61 TInt ServiceId() const; |
|
62 |
|
63 void SetServiceId(TInt aServiceId); |
|
64 |
|
65 protected: |
|
66 |
|
67 /** |
|
68 * From CActive. Called when asynchronous request completes. |
|
69 * @since 3.0 |
|
70 * @param None |
|
71 * @return None |
|
72 */ |
|
73 virtual void RunL(); |
|
74 |
|
75 virtual void DoCancel(); |
|
76 |
|
77 protected: |
|
78 |
|
79 /** |
|
80 * C++ default constructor. |
|
81 */ |
|
82 CBtmcActive(MBtmcActiveObserver& aObserver, |
|
83 CActive::TPriority aPriority, TInt aServiceId); |
|
84 |
|
85 MBtmcActiveObserver& Observer(); |
|
86 |
|
87 private: |
|
88 MBtmcActiveObserver& iObserver; |
|
89 TInt iServiceId; |
|
90 }; |
|
91 |
|
92 #endif // BTMCACTIVE_H |
|
93 |
|
94 // End of File |