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 interface for date/time type of contact
20 #ifndef MVPBKCONTACTFIELDDATETIMEDATA_H
21 #define MVPBKCONTACTFIELDDATETIMEDATA_H
24 #include <mvpbkcontactfielddata.h>
30 * Virtual Phonebook date/time field data.
31 * This class is used to manipulate contact field data, which contains
32 * a date/time type of data.
34 class MVPbkContactFieldDateTimeData :
35 public MVPbkContactFieldData
41 virtual ~MVPbkContactFieldDateTimeData() { }
43 public: // from MVPbkContactFieldData
44 TVPbkFieldStorageType DataType() const
46 return EVPbkFieldStorageTypeDateTime;
51 * Casts MVPbkContactFieldData to this interface.
53 * @precond aFieldData.DataType() == EVPbkFieldStorageTypeDateTime
54 * VPbkError::Panic(VPbkError::EFieldDataTypeMismatch)
55 * is raised if the precondition does not hold.
56 * @param aFieldData Data of the field.
57 * @return Casted inteface for the date/time field data.
59 IMPORT_C static MVPbkContactFieldDateTimeData& Cast
60 ( MVPbkContactFieldData& aFieldData );
63 * Casts const MVPbkContactFieldData to this interface.
65 * @precond aFieldData.DataType() == EVPbkFieldStorageTypeDateTime
66 * VPbkError::Panic(VPbkError::EFieldDataTypeMismatch)
67 * is raised if the precondition does not hold.
68 * @param aFieldData Data of the field.
69 * @return Casted inteface for the date/time field data.
71 IMPORT_C static const MVPbkContactFieldDateTimeData& Cast
72 ( const MVPbkContactFieldData& aFieldData );
75 * Returns the date/time data.
76 * @return Date/time data.
78 virtual TTime DateTime() const = 0;
81 * Sets the date/time data.
82 * @param aTime Date/time to be set.
84 virtual void SetDateTime( const TTime& aTime ) = 0;
87 * Returns an extension point for this interface or NULL.
88 * @param aExtensionUid Uid of extension.
89 * @return Extension point or NULL.
91 virtual TAny* ContactFieldDateTimeDataExtension(
92 TUid /*aExtensionUid*/ ) { return NULL; }
96 #endif // MVPBKCONTACTFIELDDATETIMEDATA_H