|
1 /* |
|
2 * Copyright (c) 2005-2006 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 observer is used by |
|
15 * ECOM clients to get function call from the availability Plug-in |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __MUSAVAAVAILABILITYOBSERVERIMP_H__ |
|
22 #define __MUSAVAAVAILABILITYOBSERVERIMP_H__ |
|
23 |
|
24 #include "musavaavailabilityobserver.h" |
|
25 //#include "musavaobserver.h" |
|
26 #include "musunittesting.h" |
|
27 #include <e32base.h> |
|
28 #include <e32def.h> |
|
29 |
|
30 #ifdef MUS_UNITTEST |
|
31 #undef IMPORT_C |
|
32 #define IMPORT_C |
|
33 #endif |
|
34 |
|
35 class CMusAvaController; |
|
36 class MMusAvaObserver; |
|
37 /** |
|
38 * MusAvailability Observer base class |
|
39 * |
|
40 * Observer interface for ECOM clients. |
|
41 * |
|
42 * @lib musavailabilityplugin.lib |
|
43 * @since S60 v3.2 |
|
44 */ |
|
45 |
|
46 class CMusAvaAvailabilityObserverImp : public CBase, |
|
47 public MMusAvaAvailabilityObserver |
|
48 |
|
49 { |
|
50 public: |
|
51 |
|
52 /** |
|
53 * Two-phased constructor |
|
54 * |
|
55 * @since S60 v3.2 |
|
56 * @param |
|
57 * @return Returns pointer to CMusAvaController object |
|
58 */ |
|
59 |
|
60 static CMusAvaAvailabilityObserverImp* NewL( ); |
|
61 |
|
62 /** |
|
63 * Destructor |
|
64 * |
|
65 * @since S60 v3.2 |
|
66 * @param |
|
67 * @return |
|
68 */ |
|
69 |
|
70 ~CMusAvaAvailabilityObserverImp(); |
|
71 |
|
72 protected: |
|
73 |
|
74 /** |
|
75 * Constructor |
|
76 * |
|
77 * @since S60 v3.2 |
|
78 * @return |
|
79 */ |
|
80 |
|
81 CMusAvaAvailabilityObserverImp( ); |
|
82 |
|
83 /** |
|
84 * Perform the second phase construction of a |
|
85 * CMusAvaController object |
|
86 * |
|
87 * @since S60 v3.2 |
|
88 * @param |
|
89 * @return |
|
90 */ |
|
91 |
|
92 void ConstructL(); |
|
93 |
|
94 // from base class MMusAvaAvailabilityObserver |
|
95 |
|
96 public: |
|
97 |
|
98 /** |
|
99 * Availability report |
|
100 * |
|
101 * @since S60 v3.2 |
|
102 * @param aStatus New status for availability. |
|
103 */ |
|
104 virtual void AvailabilityChanged( |
|
105 MMusAvaObserver::TAvailabilityName aName, |
|
106 MMusAvaObserver::TAvailabilityStatus aStatus ); |
|
107 |
|
108 virtual void AvailabilityError( |
|
109 MMusAvaObserver::TAvailabilityName aName, |
|
110 MMusAvaObserver::TAvailabilityStatus aStatus ); |
|
111 |
|
112 virtual TBool Available( |
|
113 MMusAvaObserver::TAvailabilityName aAvailability ); |
|
114 |
|
115 |
|
116 virtual MMusAvaObserver::TAvailabilityStatus AvailabilityPluginState(); |
|
117 |
|
118 |
|
119 public: |
|
120 |
|
121 MMusAvaObserver::TAvailabilityStatus iStatus; |
|
122 MMusAvaObserver::TAvailabilityName iName; |
|
123 MUS_UNITTEST ( UT_CMusAvaDefaultImp ) |
|
124 }; |
|
125 |
|
126 |
|
127 #endif // __MUSAVAAVAILABILITYOBSERVERIMP_H__ |
|
128 |