|
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 contact field type selector for |
|
15 * : single contact assign. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef CPBK2ASSIGNSINGLEPROPERTY_H |
|
21 #define CPBK2ASSIGNSINGLEPROPERTY_H |
|
22 |
|
23 // INCLUDES |
|
24 #include "CPbk2SelectFieldPropertyBase.h" |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class MVPbkStoreContact; |
|
28 class CVPbkContactManager; |
|
29 |
|
30 // CLASS DECLARATION |
|
31 |
|
32 /** |
|
33 * Phonebook 2 contact field type selector for single contact assign. |
|
34 * Responsible for: |
|
35 * - validating created add item wrappers |
|
36 * - returning selected field index |
|
37 */ |
|
38 class CPbk2AssignSingleProperty : public CPbk2SelectFieldPropertyBase |
|
39 { |
|
40 public: // Construction and destruction |
|
41 |
|
42 /** |
|
43 * Creates a new instance of this class. |
|
44 * |
|
45 * @param aSelector Externalized field type selector buffer. |
|
46 * @param aStoreContact Store contact. |
|
47 * @param aContactManager Virtual Phonebook contact manager. |
|
48 * @return A new instance of this class. |
|
49 */ |
|
50 static CPbk2AssignSingleProperty* NewL( |
|
51 HBufC8& aSelector, |
|
52 MVPbkStoreContact& aStoreContact, |
|
53 CVPbkContactManager& aContactManager ); |
|
54 |
|
55 /** |
|
56 * Destructor. |
|
57 */ |
|
58 ~CPbk2AssignSingleProperty(); |
|
59 |
|
60 public: // From MPbk2AssignSelectFieldProperty |
|
61 void PrepareL(); |
|
62 TInt ExecuteL(); |
|
63 TInt SelectedFieldIndex() const; |
|
64 |
|
65 private: // Implementation |
|
66 CPbk2AssignSingleProperty( |
|
67 HBufC8& aSelector, |
|
68 TInt aResourceId, |
|
69 MVPbkStoreContact& aStoreContact, |
|
70 CVPbkContactManager& aContactManager ); |
|
71 void ConstructL(); |
|
72 |
|
73 private: // Data |
|
74 /// Own: Index of the desired field if it exists in the contact |
|
75 TInt iFieldIndex; |
|
76 /// Ref: Store contact |
|
77 MVPbkStoreContact& iStoreContact; |
|
78 /// Own: Error code returned to client after ExecuteL is finished |
|
79 TInt iResult; |
|
80 /// Ref: Virtual Phonebook contact manager |
|
81 CVPbkContactManager& iContactManager; |
|
82 }; |
|
83 |
|
84 #endif // CPBK2ASSIGNSINGLEPROPERTY_H |
|
85 |
|
86 // End of File |