equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2008-2008 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: Encapsulates singleton client and provided observer |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef C_CCHUICLIENTOBSERVER_H |
|
21 #define C_CCHUICLIENTOBSERVER_H |
|
22 |
|
23 #include <e32base.h> |
|
24 #include <e32const.h> |
|
25 |
|
26 class MCchUiObserver; |
|
27 |
|
28 /** |
|
29 * This class stores client provider reference and api instance used to create |
|
30 * it. Those can be mapped when api instance is deleted to remove observer. |
|
31 * This way singleton instance will not call observers that are already deleted. |
|
32 * This class implements the use of Service provider settings. |
|
33 * |
|
34 * @code |
|
35 * @endcode |
|
36 * |
|
37 * @lib cchui.lib |
|
38 * @since S60 5.0 |
|
39 */ |
|
40 NONSHARABLE_CLASS( CCchUiClientObserver ): public CBase |
|
41 { |
|
42 public: |
|
43 |
|
44 /** |
|
45 * Two-phased constructor. |
|
46 */ |
|
47 static CCchUiClientObserver* NewL( MCchUiObserver& aObserver); |
|
48 |
|
49 /** |
|
50 * Two-phased constructor. |
|
51 */ |
|
52 static CCchUiClientObserver* NewLC( MCchUiObserver& aObserver ); |
|
53 |
|
54 /** |
|
55 * Destructor. |
|
56 */ |
|
57 virtual ~CCchUiClientObserver(); |
|
58 |
|
59 /** |
|
60 * Return observer. |
|
61 * |
|
62 * @since S60 5.0 |
|
63 * @return observer reference |
|
64 */ |
|
65 MCchUiObserver& Observer(); |
|
66 |
|
67 private: |
|
68 |
|
69 CCchUiClientObserver( MCchUiObserver& aObserver ); |
|
70 |
|
71 private: // data |
|
72 |
|
73 /** |
|
74 * Observer reference. |
|
75 */ |
|
76 MCchUiObserver& iObserver; |
|
77 }; |
|
78 |
|
79 #endif // C_CCHUICLIENTOBSERVER_H |