|
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: Virtual Phonebook base interface for contact field data. |
|
15 * Sub classes have static Cast functions for safe casting. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef MVPBKCONTACTFIELDDATA_H |
|
21 #define MVPBKCONTACTFIELDDATA_H |
|
22 |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32cmn.h> |
|
26 #include <e32std.h> |
|
27 #include <vpbkfieldtype.hrh> |
|
28 |
|
29 // CONSTANTS |
|
30 |
|
31 /// Constant indicating that field length is unlimited. |
|
32 const TInt KVPbkUnlimitedFieldLength = -1; |
|
33 |
|
34 |
|
35 // CLASS DECLARATIONS |
|
36 |
|
37 /** |
|
38 * Virtual Phonebook field data interface. |
|
39 * Interface for contact field data. Different data type interfaces |
|
40 * are derived from this interface, which have data manipulation |
|
41 * functionality. |
|
42 */ |
|
43 class MVPbkContactFieldData |
|
44 { |
|
45 public: // Destructor |
|
46 /** |
|
47 * Destructor. |
|
48 */ |
|
49 virtual ~MVPbkContactFieldData() { } |
|
50 |
|
51 public: // New functions |
|
52 /** |
|
53 * Returns the derived data type id. |
|
54 * @return Contact field storage type. |
|
55 */ |
|
56 virtual TVPbkFieldStorageType DataType() const =0; |
|
57 |
|
58 /** |
|
59 * Returns true if the storage is empty. |
|
60 * @return ETrue if the data field is empty. |
|
61 */ |
|
62 virtual TBool IsEmpty() const =0; |
|
63 |
|
64 /** |
|
65 * Copies data from given field data. |
|
66 * @param aFieldData Data that is copied to this object. |
|
67 * @precond aFieldData.DataType() == this->DataType() |
|
68 */ |
|
69 virtual void CopyL(const MVPbkContactFieldData& aFieldData) =0; |
|
70 |
|
71 /** |
|
72 * Returns an extension point for this interface or NULL. |
|
73 * @param aExtensionUid Uid of extension. |
|
74 * @return Extension point or NULL. |
|
75 */ |
|
76 virtual TAny* ContactFieldDataExtension( |
|
77 TUid /*aExtensionUid*/) { return NULL; } |
|
78 }; |
|
79 |
|
80 #endif // MVPBKCONTACTFIELDDATA_H |
|
81 |
|
82 // End of File |