|
1 /* |
|
2 * Copyright (c) 2002-2007 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: An observer API for contact events |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef MVPBKSIMCONTACTOBSERVER_H |
|
21 #define MVPBKSIMCONTACTOBSERVER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32std.h> |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class CVPbkSimContact; |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 /** |
|
32 * An observer API for contact events |
|
33 * |
|
34 */ |
|
35 class MVPbkSimContactObserver |
|
36 { |
|
37 public: // Types |
|
38 |
|
39 /** |
|
40 * SIM contact events |
|
41 */ |
|
42 enum TEvent |
|
43 { |
|
44 /// Unknown operation |
|
45 EUnknown = 0, |
|
46 /// Reading of the contact complete |
|
47 ERead, |
|
48 /// Deleting of the contact complete |
|
49 EDelete, |
|
50 /// Saving of the contact complete |
|
51 ESave, |
|
52 }; |
|
53 |
|
54 public: // New functions |
|
55 |
|
56 /** |
|
57 * Called after successful contact event |
|
58 * @param aEvent the contact event |
|
59 * @param aContact a pointer to contact if the event is ERead. |
|
60 * Otherwise NULL. The client must take the ownership immediately. |
|
61 */ |
|
62 virtual void ContactEventComplete( TEvent aEvent, |
|
63 CVPbkSimContact* aContact ) = 0; |
|
64 |
|
65 /** |
|
66 * Called after failed contact event. |
|
67 * @param aEvent the contact event |
|
68 * @param aContact |
|
69 * @param aError the error code. |
|
70 */ |
|
71 virtual void ContactEventError( TEvent aEvent, |
|
72 CVPbkSimContact* aContact, TInt aError ) = 0; |
|
73 |
|
74 protected: // destructor |
|
75 |
|
76 /** |
|
77 * Destructor. |
|
78 */ |
|
79 virtual ~MVPbkSimContactObserver() {} |
|
80 }; |
|
81 |
|
82 #endif // MVPBKSIMCONTACTOBSERVER_H |
|
83 |
|
84 // End of File |