|
1 /* |
|
2 * Copyright (c) 2004 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: VAS contact handler interface |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef NSSCONTACTHANDLER_H |
|
20 #define NSSCONTACTHANDLER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class CNssContactHandlerImplementation; |
|
27 class CContactHandlerStopper; |
|
28 |
|
29 /** |
|
30 * Contact handler creates voice tags out of phonebook contacts and keeps |
|
31 * SIND data in sync with the phonebook |
|
32 * |
|
33 * @lib NssVASContactHdlr.dll |
|
34 * @since 2.8 |
|
35 */ |
|
36 class CNssContactHandler : public CBase |
|
37 { |
|
38 public: // Constructors and destructor |
|
39 |
|
40 /** |
|
41 * Two-phased constructor. |
|
42 */ |
|
43 IMPORT_C static CNssContactHandler* NewL(); |
|
44 |
|
45 /** |
|
46 * Destructor. |
|
47 */ |
|
48 IMPORT_C virtual ~CNssContactHandler(); |
|
49 |
|
50 public: // New functions |
|
51 |
|
52 /** |
|
53 * Disables the contact handler until EnableEventHandling is called |
|
54 * Typically this means 'until reboot' |
|
55 * Is used in case of unrecoverable error. |
|
56 * |
|
57 * @todo Move to private? |
|
58 * @return void |
|
59 */ |
|
60 IMPORT_C void DisableEventHandling(); |
|
61 |
|
62 /** |
|
63 * Enables the contact handler. |
|
64 * |
|
65 * @deprecated Move to private? |
|
66 * @return void |
|
67 */ |
|
68 IMPORT_C void EnableEventHandling(); |
|
69 |
|
70 /** |
|
71 * Sets pointer to object which handles ContactHandler thread stopping. |
|
72 * |
|
73 * @param "CContactHandlerStopper* aStopper" Pointer to stopper object |
|
74 * @return void |
|
75 */ |
|
76 void SetStopperPointer( CContactHandlerStopper* aStopper ); |
|
77 |
|
78 private: |
|
79 |
|
80 /** |
|
81 * C++ default constructor. |
|
82 */ |
|
83 CNssContactHandler(); |
|
84 |
|
85 /** |
|
86 * Second-phase constructor |
|
87 */ |
|
88 void ConstructL(); |
|
89 |
|
90 // Prohibit copy constructor if not deriving from CBase. |
|
91 /** @todo why? */ |
|
92 CNssContactHandler( const CNssContactHandler& ); |
|
93 |
|
94 // Prohibit assigment operator if not deriving from CBase. |
|
95 CNssContactHandler& operator= ( const CNssContactHandler& ); |
|
96 |
|
97 /** |
|
98 * Thread function. |
|
99 * |
|
100 * @param "TAny* aParams" Void pointer given in the thread startup phase. |
|
101 */ |
|
102 static TInt CHThreadFunction( TAny* aParams ); |
|
103 |
|
104 private: |
|
105 |
|
106 // ContactHandler thread name |
|
107 TBuf<125> iThreadNameBuf; |
|
108 |
|
109 // Pointer to ContactHandler thread stopper |
|
110 CContactHandlerStopper* iStopper; |
|
111 }; |
|
112 |
|
113 #endif // CONTACTHANDLER_H |
|
114 |
|
115 // End of File |