|
1 /* |
|
2 * Copyright (c) 2005-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: Phonebook 2 textual contact data assigner. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CPBK2CONTACTTEXTDATAASSIGNER_H |
|
20 #define CPBK2CONTACTTEXTDATAASSIGNER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include "MPbk2ContactAssigner.h" |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class MPbk2ContactAssignerObserver; |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 /** |
|
32 * Phonebook 2 textual contact data assigner. |
|
33 */ |
|
34 class CPbk2ContactTextDataAssigner : public CActive, |
|
35 public MPbk2ContactAssigner |
|
36 { |
|
37 public: // Construction and destruction |
|
38 |
|
39 /** |
|
40 * Creates a new instance of this class. |
|
41 * |
|
42 * @param aObserver Observer. |
|
43 * @return A new instance of this class. |
|
44 */ |
|
45 static CPbk2ContactTextDataAssigner* NewL( |
|
46 MPbk2ContactAssignerObserver& aObserver ); |
|
47 |
|
48 /** |
|
49 * Destructor. |
|
50 */ |
|
51 ~CPbk2ContactTextDataAssigner(); |
|
52 |
|
53 public: // From MPbk2ContactAssigner |
|
54 void AssignDataL( |
|
55 MVPbkStoreContact& aStoreContact, |
|
56 MVPbkStoreContactField* aContactField, |
|
57 const MVPbkFieldType* aFieldType, |
|
58 const HBufC* aDataBuffer ); |
|
59 void AssignAttributeL( |
|
60 MVPbkStoreContact& aStoreContact, |
|
61 MVPbkStoreContactField* aContactField, |
|
62 TPbk2AttributeAssignData aAttributeAssignData ); |
|
63 |
|
64 private: // From CActive |
|
65 void RunL(); |
|
66 void DoCancel(); |
|
67 TInt RunError( |
|
68 TInt aError ); |
|
69 |
|
70 private: // Implementation |
|
71 CPbk2ContactTextDataAssigner( |
|
72 MPbk2ContactAssignerObserver& aObserver ); |
|
73 void InsertDataL( |
|
74 MVPbkStoreContactField& aField, |
|
75 const HBufC& aDataBuffer ); |
|
76 void IssueRequest(); |
|
77 |
|
78 private: // Data |
|
79 /// Ref: Observer |
|
80 MPbk2ContactAssignerObserver& iObserver; |
|
81 /// Own: Index of the added field |
|
82 TInt iIndex; |
|
83 }; |
|
84 |
|
85 #endif // CPBK2CONTACTTEXTDATAASSIGNER_H |
|
86 |
|
87 // End of File |