epoc32/include/app/MVPbkContactFieldData.h
branchSymbian3
changeset 4 837f303aceeb
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/app/MVPbkContactFieldData.h	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -0,0 +1,82 @@
     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 base interface for contact field data. 
    1.18 +*                Sub classes have static Cast functions for safe casting.
    1.19 +*
    1.20 +*/
    1.21 +
    1.22 +
    1.23 +#ifndef MVPBKCONTACTFIELDDATA_H
    1.24 +#define MVPBKCONTACTFIELDDATA_H
    1.25 +
    1.26 +
    1.27 +// INCLUDES
    1.28 +#include <e32cmn.h>
    1.29 +#include <e32std.h>
    1.30 +#include <vpbkfieldtype.hrh>
    1.31 +
    1.32 +// CONSTANTS
    1.33 +
    1.34 +/// Constant indicating that field length is unlimited.
    1.35 +const TInt KVPbkUnlimitedFieldLength = -1;
    1.36 +
    1.37 +
    1.38 +// CLASS DECLARATIONS
    1.39 +
    1.40 +/**
    1.41 + * Virtual Phonebook field data interface.
    1.42 + * Interface for contact field data. Different data type interfaces
    1.43 + * are derived from this interface, which have data manipulation 
    1.44 + * functionality.
    1.45 + */
    1.46 +class MVPbkContactFieldData
    1.47 +    {
    1.48 +    public:  // Destructor
    1.49 +        /**
    1.50 +         * Destructor.
    1.51 +         */
    1.52 +        virtual ~MVPbkContactFieldData() { }
    1.53 +
    1.54 +    public:  // New functions
    1.55 +        /**
    1.56 +         * Returns the derived data type id.
    1.57 +         * @return Contact field storage type.
    1.58 +         */
    1.59 +        virtual TVPbkFieldStorageType DataType() const =0;
    1.60 +
    1.61 +        /**
    1.62 +         * Returns true if the storage is empty.
    1.63 +         * @return ETrue if the data field is empty.
    1.64 +         */
    1.65 +        virtual TBool IsEmpty() const =0;
    1.66 +
    1.67 +        /**
    1.68 +         * Copies data from given field data.
    1.69 +         * @param aFieldData    Data that is copied to this object.
    1.70 +         * @precond aFieldData.DataType() == this->DataType()
    1.71 +         */
    1.72 +        virtual void CopyL(const MVPbkContactFieldData& aFieldData) =0;
    1.73 +
    1.74 +        /**
    1.75 +         * Returns an extension point for this interface or NULL.
    1.76 +         * @param aExtensionUid Uid of extension.
    1.77 +         * @return Extension point or NULL.
    1.78 +         */
    1.79 +        virtual TAny* ContactFieldDataExtension(
    1.80 +                TUid /*aExtensionUid*/) { return NULL; }
    1.81 +    };
    1.82 +
    1.83 +#endif  // MVPBKCONTACTFIELDDATA_H
    1.84 +
    1.85 +// End of File