2 * Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: Virtual Phonebook base interface for contact field data.
15 * Sub classes have static Cast functions for safe casting.
20 #ifndef MVPBKCONTACTFIELDDATA_H
21 #define MVPBKCONTACTFIELDDATA_H
27 #include <vpbkfieldtype.hrh>
31 /// Constant indicating that field length is unlimited.
32 const TInt KVPbkUnlimitedFieldLength = -1;
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
43 class MVPbkContactFieldData
49 virtual ~MVPbkContactFieldData() { }
51 public: // New functions
53 * Returns the derived data type id.
54 * @return Contact field storage type.
56 virtual TVPbkFieldStorageType DataType() const =0;
59 * Returns true if the storage is empty.
60 * @return ETrue if the data field is empty.
62 virtual TBool IsEmpty() const =0;
65 * Copies data from given field data.
66 * @param aFieldData Data that is copied to this object.
67 * @precond aFieldData.DataType() == this->DataType()
69 virtual void CopyL(const MVPbkContactFieldData& aFieldData) =0;
72 * Returns an extension point for this interface or NULL.
73 * @param aExtensionUid Uid of extension.
74 * @return Extension point or NULL.
76 virtual TAny* ContactFieldDataExtension(
77 TUid /*aExtensionUid*/) { return NULL; }
80 #endif // MVPBKCONTACTFIELDDATA_H