epoc32/include/app/MVPbkObjectHierarchy.h
branchSymbian3
changeset 4 837f303aceeb
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/app/MVPbkObjectHierarchy.h	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -0,0 +1,75 @@
     1.4 +/*
     1.5 +* Copyright (c) 2004-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:  An interface for objects that belongs to object hierarchy
    1.18 +*
    1.19 +*/
    1.20 +
    1.21 +
    1.22 +#ifndef MVPBKOBJECTHIERARCHY_H
    1.23 +#define MVPBKOBJECTHIERARCHY_H
    1.24 +
    1.25 +
    1.26 +// INCLUDES
    1.27 +#include <e32cmn.h>
    1.28 +
    1.29 +// FORWARD DECLARATIONS
    1.30 +class MVPbkContactStore;
    1.31 +
    1.32 +
    1.33 +// CLASS DECLARATIONS
    1.34 +
    1.35 +/**
    1.36 + * An interface for objects that belongs to object hierarchy.
    1.37 + *
    1.38 + * The interface can be used to get the store from an object that
    1.39 + * belongs to the hierarchy.
    1.40 + */
    1.41 +class MVPbkObjectHierarchy
    1.42 +    {
    1.43 +    public:  // Destructor
    1.44 +        virtual ~MVPbkObjectHierarchy() { }
    1.45 +
    1.46 +    public:  // New functions
    1.47 +        /**
    1.48 +         * Returns the parent object of this object. For the root of the 
    1.49 +         * hierarchy returns self.
    1.50 +         * @return The parent object.
    1.51 +         */
    1.52 +        virtual MVPbkObjectHierarchy& ParentObject() const = 0;
    1.53 +
    1.54 +        /**
    1.55 +         * Returns the contact store where this object originates from.
    1.56 +         * @return The Contact store.
    1.57 +         */
    1.58 +        virtual MVPbkContactStore& ContactStore() const 
    1.59 +            {
    1.60 +            return ParentObject().ContactStore();
    1.61 +            }
    1.62 +
    1.63 +        /**
    1.64 +         * Returns an extension point for this interface or NULL.
    1.65 +         *
    1.66 +         * @param aExtensionUid no extensions defined currently.
    1.67 +         * @return An extension point for this interface or NULL.
    1.68 +         */
    1.69 +        virtual TAny* ObjectHierarchyExtension(TUid /*aExtensionUid*/) 
    1.70 +                { return NULL; }
    1.71 +    };
    1.72 +
    1.73 +
    1.74 +#endif  // MVPBKOBJECTHIERARCHY_H
    1.75 +
    1.76 +//End of file
    1.77 +
    1.78 +