1 /* |
|
2 * Copyright (c) 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: Contact observer interface |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef VASMCONTACTOBSERVER_H |
|
20 #define VASMCONTACTOBSERVER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32std.h> |
|
24 |
|
25 #include <cntdef.h> |
|
26 |
|
27 // CONSTANTS |
|
28 |
|
29 // DATA TYPES |
|
30 |
|
31 // Contact event |
|
32 enum TVasContactEvent |
|
33 { |
|
34 ENullEvent, // No event occured. |
|
35 EContactAdded, // A contact has been added to the contact store. |
|
36 EContactDeleted, // A contact has been deleted from the contact store. |
|
37 EContactChanged, // An existing contact in the contact store has been changed. |
|
38 EGroupAdded, // A contact group has been added to the contact store. |
|
39 EGroupDeleted, // A contact group has been deleted from the contact store. |
|
40 EGroupChanged, // An existing contact group in the contact store has been changed. |
|
41 EStoreBackupBeginning, // Contact store backup is beginning. |
|
42 EStoreRestoreBeginning, // Contact store restore is beginning. |
|
43 EStoreBackupRestoreCompleted, // Contact store backup or restore is completed. |
|
44 EUnknownChanges, // There has been some unknown changes in the contact store. |
|
45 ENotSupported // Other kind of changes that are not supported |
|
46 }; |
|
47 |
|
48 struct TPhonebookEvent |
|
49 { |
|
50 TTime iTime; |
|
51 TVasContactEvent iType; |
|
52 TContactItemId iContactId; |
|
53 |
|
54 TPhonebookEvent() |
|
55 { |
|
56 iType = EContactChanged; |
|
57 iContactId = 0; |
|
58 iTime.UniversalTime(); |
|
59 } |
|
60 }; |
|
61 |
|
62 // FORWARD DECLARATIONS |
|
63 |
|
64 // CLASS DECLARATION |
|
65 |
|
66 /** |
|
67 * Contact observer interface |
|
68 * |
|
69 * @since 3.2 |
|
70 */ |
|
71 class MVasContactObserver |
|
72 { |
|
73 public: // Constructors and destructor |
|
74 |
|
75 public: // New functions |
|
76 |
|
77 /** |
|
78 * Called when a contact change event occurs |
|
79 * |
|
80 * @since 3.2 |
|
81 */ |
|
82 virtual void HandleEventL( const TPhonebookEvent& aEvent ) = 0; |
|
83 |
|
84 public: // Functions from base classes |
|
85 |
|
86 private: // New functions |
|
87 |
|
88 private: // Data |
|
89 |
|
90 }; |
|
91 |
|
92 #endif // VASMCONTACTOBSERVER_H |
|
93 |
|
94 // End of File |
|