contacts_plat/virtual_phonebook_engine_api/inc/MVPbkContactFieldDateTimeData.h
branchRCL_3
changeset 63 f4a778e096c2
child 64 c1e8ba0c2b16
equal deleted inserted replaced
62:5b6f26637ad3 63:f4a778e096c2
       
     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 interface for date/time type of contact 
       
    15 *                field data.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef MVPBKCONTACTFIELDDATETIMEDATA_H
       
    21 #define MVPBKCONTACTFIELDDATETIMEDATA_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <MVPbkContactFieldData.h>
       
    25 
       
    26 
       
    27 // CLASS DECLARATIONS
       
    28 
       
    29 /**
       
    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.
       
    33  */
       
    34 class MVPbkContactFieldDateTimeData : 
       
    35         public MVPbkContactFieldData
       
    36     {
       
    37     public:  // Destructor
       
    38         /**
       
    39          * Destructor.
       
    40          */
       
    41         virtual ~MVPbkContactFieldDateTimeData() { }
       
    42 
       
    43     public:  // from MVPbkContactFieldData
       
    44         TVPbkFieldStorageType DataType() const
       
    45             {
       
    46             return EVPbkFieldStorageTypeDateTime;
       
    47             }
       
    48 
       
    49     public:  // Interface
       
    50         /**
       
    51          * Casts MVPbkContactFieldData to this interface.
       
    52          *
       
    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.
       
    58          */
       
    59         IMPORT_C static MVPbkContactFieldDateTimeData& Cast
       
    60             ( MVPbkContactFieldData& aFieldData );
       
    61 
       
    62         /**
       
    63          * Casts const MVPbkContactFieldData to this interface.
       
    64          *
       
    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.
       
    70          */
       
    71         IMPORT_C static const MVPbkContactFieldDateTimeData& Cast
       
    72             ( const MVPbkContactFieldData& aFieldData );
       
    73 
       
    74         /**
       
    75          * Returns the date/time data.
       
    76          * @return Date/time data.
       
    77          */
       
    78         virtual TTime DateTime() const = 0;
       
    79 
       
    80         /**
       
    81          * Sets the date/time data.
       
    82          * @param aTime Date/time to be set.
       
    83          */
       
    84         virtual void SetDateTime( const TTime& aTime ) = 0;
       
    85 
       
    86         /**
       
    87          * Returns an extension point for this interface or NULL.
       
    88          * @param aExtensionUid Uid of extension.
       
    89          * @return Extension point or NULL.
       
    90          */
       
    91         virtual TAny* ContactFieldDateTimeDataExtension( 
       
    92                 TUid /*aExtensionUid*/ ) { return NULL; }
       
    93     };
       
    94 
       
    95 
       
    96 #endif  // MVPBKCONTACTFIELDDATETIMEDATA_H
       
    97 
       
    98 //End of file