epoc32/include/app/MVPbkContactFieldDateTimeData.h
branchSymbian3
changeset 4 837f303aceeb
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/app/MVPbkContactFieldDateTimeData.h	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -0,0 +1,98 @@
     1.4 +/*
     1.5 +* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of "Eclipse Public License v1.0"
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description:  Virtual Phonebook interface for date/time type of contact 
    1.18 +*                field data.
    1.19 +*
    1.20 +*/
    1.21 +
    1.22 +
    1.23 +#ifndef MVPBKCONTACTFIELDDATETIMEDATA_H
    1.24 +#define MVPBKCONTACTFIELDDATETIMEDATA_H
    1.25 +
    1.26 +// INCLUDES
    1.27 +#include <mvpbkcontactfielddata.h>
    1.28 +
    1.29 +
    1.30 +// CLASS DECLARATIONS
    1.31 +
    1.32 +/**
    1.33 + * Virtual Phonebook date/time field data.
    1.34 + * This class is used to manipulate contact field data, which contains
    1.35 + * a date/time type of data.
    1.36 + */
    1.37 +class MVPbkContactFieldDateTimeData : 
    1.38 +        public MVPbkContactFieldData
    1.39 +    {
    1.40 +    public:  // Destructor
    1.41 +        /**
    1.42 +         * Destructor.
    1.43 +         */
    1.44 +        virtual ~MVPbkContactFieldDateTimeData() { }
    1.45 +
    1.46 +    public:  // from MVPbkContactFieldData
    1.47 +        TVPbkFieldStorageType DataType() const
    1.48 +            {
    1.49 +            return EVPbkFieldStorageTypeDateTime;
    1.50 +            }
    1.51 +
    1.52 +    public:  // Interface
    1.53 +        /**
    1.54 +         * Casts MVPbkContactFieldData to this interface.
    1.55 +         *
    1.56 +         * @precond aFieldData.DataType() == EVPbkFieldStorageTypeDateTime
    1.57 +         *          VPbkError::Panic(VPbkError::EFieldDataTypeMismatch)
    1.58 +         *          is raised if the precondition does not hold.
    1.59 +         * @param aFieldData    Data of the field.
    1.60 +         * @return Casted inteface for the date/time field data.
    1.61 +         */
    1.62 +        IMPORT_C static MVPbkContactFieldDateTimeData& Cast
    1.63 +            ( MVPbkContactFieldData& aFieldData );
    1.64 +
    1.65 +        /**
    1.66 +         * Casts const MVPbkContactFieldData to this interface.
    1.67 +         *
    1.68 +         * @precond aFieldData.DataType() == EVPbkFieldStorageTypeDateTime
    1.69 +         *          VPbkError::Panic(VPbkError::EFieldDataTypeMismatch)
    1.70 +         *          is raised if the precondition does not hold.
    1.71 +         * @param aFieldData    Data of the field.
    1.72 +         * @return Casted inteface for the date/time field data.
    1.73 +         */
    1.74 +        IMPORT_C static const MVPbkContactFieldDateTimeData& Cast
    1.75 +            ( const MVPbkContactFieldData& aFieldData );
    1.76 +
    1.77 +        /**
    1.78 +         * Returns the date/time data.
    1.79 +         * @return Date/time data.
    1.80 +         */
    1.81 +        virtual TTime DateTime() const = 0;
    1.82 +
    1.83 +        /**
    1.84 +         * Sets the date/time data.
    1.85 +         * @param aTime Date/time to be set.
    1.86 +         */
    1.87 +        virtual void SetDateTime( const TTime& aTime ) = 0;
    1.88 +
    1.89 +        /**
    1.90 +         * Returns an extension point for this interface or NULL.
    1.91 +         * @param aExtensionUid Uid of extension.
    1.92 +         * @return Extension point or NULL.
    1.93 +         */
    1.94 +        virtual TAny* ContactFieldDateTimeDataExtension( 
    1.95 +                TUid /*aExtensionUid*/ ) { return NULL; }
    1.96 +    };
    1.97 +
    1.98 +
    1.99 +#endif  // MVPBKCONTACTFIELDDATETIMEDATA_H
   1.100 +
   1.101 +//End of file