author | William Roberts <williamr@symbian.org> |
Wed, 31 Mar 2010 12:33:34 +0100 | |
branch | Symbian3 |
changeset 4 | 837f303aceeb |
permissions | -rw-r--r-- |
williamr@4 | 1 |
/* |
williamr@4 | 2 |
* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies). |
williamr@4 | 3 |
* All rights reserved. |
williamr@4 | 4 |
* This component and the accompanying materials are made available |
williamr@4 | 5 |
* under the terms of "Eclipse Public License v1.0" |
williamr@4 | 6 |
* which accompanies this distribution, and is available |
williamr@4 | 7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
williamr@4 | 8 |
* |
williamr@4 | 9 |
* Initial Contributors: |
williamr@4 | 10 |
* Nokia Corporation - initial contribution. |
williamr@4 | 11 |
* |
williamr@4 | 12 |
* Contributors: |
williamr@4 | 13 |
* |
williamr@4 | 14 |
* Description: Virtual Phonebook base interface for contact field data. |
williamr@4 | 15 |
* Sub classes have static Cast functions for safe casting. |
williamr@4 | 16 |
* |
williamr@4 | 17 |
*/ |
williamr@4 | 18 |
|
williamr@4 | 19 |
|
williamr@4 | 20 |
#ifndef MVPBKCONTACTFIELDDATA_H |
williamr@4 | 21 |
#define MVPBKCONTACTFIELDDATA_H |
williamr@4 | 22 |
|
williamr@4 | 23 |
|
williamr@4 | 24 |
// INCLUDES |
williamr@4 | 25 |
#include <e32cmn.h> |
williamr@4 | 26 |
#include <e32std.h> |
williamr@4 | 27 |
#include <vpbkfieldtype.hrh> |
williamr@4 | 28 |
|
williamr@4 | 29 |
// CONSTANTS |
williamr@4 | 30 |
|
williamr@4 | 31 |
/// Constant indicating that field length is unlimited. |
williamr@4 | 32 |
const TInt KVPbkUnlimitedFieldLength = -1; |
williamr@4 | 33 |
|
williamr@4 | 34 |
|
williamr@4 | 35 |
// CLASS DECLARATIONS |
williamr@4 | 36 |
|
williamr@4 | 37 |
/** |
williamr@4 | 38 |
* Virtual Phonebook field data interface. |
williamr@4 | 39 |
* Interface for contact field data. Different data type interfaces |
williamr@4 | 40 |
* are derived from this interface, which have data manipulation |
williamr@4 | 41 |
* functionality. |
williamr@4 | 42 |
*/ |
williamr@4 | 43 |
class MVPbkContactFieldData |
williamr@4 | 44 |
{ |
williamr@4 | 45 |
public: // Destructor |
williamr@4 | 46 |
/** |
williamr@4 | 47 |
* Destructor. |
williamr@4 | 48 |
*/ |
williamr@4 | 49 |
virtual ~MVPbkContactFieldData() { } |
williamr@4 | 50 |
|
williamr@4 | 51 |
public: // New functions |
williamr@4 | 52 |
/** |
williamr@4 | 53 |
* Returns the derived data type id. |
williamr@4 | 54 |
* @return Contact field storage type. |
williamr@4 | 55 |
*/ |
williamr@4 | 56 |
virtual TVPbkFieldStorageType DataType() const =0; |
williamr@4 | 57 |
|
williamr@4 | 58 |
/** |
williamr@4 | 59 |
* Returns true if the storage is empty. |
williamr@4 | 60 |
* @return ETrue if the data field is empty. |
williamr@4 | 61 |
*/ |
williamr@4 | 62 |
virtual TBool IsEmpty() const =0; |
williamr@4 | 63 |
|
williamr@4 | 64 |
/** |
williamr@4 | 65 |
* Copies data from given field data. |
williamr@4 | 66 |
* @param aFieldData Data that is copied to this object. |
williamr@4 | 67 |
* @precond aFieldData.DataType() == this->DataType() |
williamr@4 | 68 |
*/ |
williamr@4 | 69 |
virtual void CopyL(const MVPbkContactFieldData& aFieldData) =0; |
williamr@4 | 70 |
|
williamr@4 | 71 |
/** |
williamr@4 | 72 |
* Returns an extension point for this interface or NULL. |
williamr@4 | 73 |
* @param aExtensionUid Uid of extension. |
williamr@4 | 74 |
* @return Extension point or NULL. |
williamr@4 | 75 |
*/ |
williamr@4 | 76 |
virtual TAny* ContactFieldDataExtension( |
williamr@4 | 77 |
TUid /*aExtensionUid*/) { return NULL; } |
williamr@4 | 78 |
}; |
williamr@4 | 79 |
|
williamr@4 | 80 |
#endif // MVPBKCONTACTFIELDDATA_H |
williamr@4 | 81 |
|
williamr@4 | 82 |
// End of File |