ncdengine/inc/ncdnodefavorite.h
changeset 0 ba25891c3a9e
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     1 /*
       
     2 * Copyright (c) 2006-2008 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:   Contains MNcdNodeFavorite interface
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef M_NCD_NODE_FAVORITE_H
       
    20 #define M_NCD_NODE_FAVORITE_H
       
    21 
       
    22 
       
    23 #include "catalogsbase.h"
       
    24 #include "ncdinterfaceids.h"
       
    25 
       
    26 class MNcdQuery;
       
    27 class MNcdNode;
       
    28 
       
    29 /**
       
    30  * This interface is provided for favorite nodes. It can be used
       
    31  * to set and get a disclaimer of the favorite node, and remove
       
    32  * the node from favorites.
       
    33  *
       
    34  * It can be checked whether a node is a favorite node, by querying
       
    35  * this interface.
       
    36  *
       
    37  *  
       
    38  */
       
    39 class MNcdNodeFavorite : public virtual MCatalogsBase
       
    40     {
       
    41 
       
    42 public:
       
    43 
       
    44     /**
       
    45      * Unique identifier for the interface, required for all MCatalogsBase interfaces.
       
    46      *
       
    47      * 
       
    48      */
       
    49     enum { KInterfaceUid = ENcdNodeFavoriteUid };
       
    50     
       
    51     /**
       
    52      * Removes the node from favorites.
       
    53      *
       
    54      * After calling this method, this interface will be invalid.
       
    55      *
       
    56      * @exception Leave System wide error code.
       
    57      */
       
    58     virtual void RemoveFromFavoritesL() = 0;
       
    59     
       
    60     /**
       
    61      * Sets the disclaimer for the node. To remove disclaimer,
       
    62      * give NULL pointer as parameter. 
       
    63      *
       
    64      * @param aDisclaimerOwner The node which has the disclaimer to set.
       
    65      *                         Ownership is not transferred.
       
    66      * @exception Leave System wide error code.
       
    67      */
       
    68     virtual void SetDisclaimerL( MNcdNode* aDisclaimerOwner ) = 0;
       
    69     
       
    70     /**
       
    71      * Get the dislaimer.
       
    72      *
       
    73      * @return The disclaimer, or NULL if disclaimer is not set. The object is
       
    74      * reference counted. Must be released after use.
       
    75      * @exception Leave System wide error code.
       
    76      */
       
    77     virtual MNcdQuery* DisclaimerL() const = 0;
       
    78     
       
    79     
       
    80 protected:
       
    81 
       
    82     /**
       
    83     * Destructor.
       
    84     *
       
    85     * @see MCatalogsBase::~MCatalogsBase
       
    86     */
       
    87     virtual ~MNcdNodeFavorite() {}
       
    88     
       
    89     };
       
    90 
       
    91 
       
    92 #endif // M_NCD_NODE_FAVORITE_H