ncdengine/inc/ncdnodedependencyinfo.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:   MNcdDependencyInfo
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef NCD_NODE_DEPENDENCY_INFO
       
    20 #define NCD_NODE_DEPENDENCY_INFO
       
    21 
       
    22 #include <e32cmn.h>
       
    23 
       
    24 #include "ncdnodedependency.h"
       
    25 
       
    26 class MNcdNode;
       
    27 
       
    28 /**
       
    29  *  This interface provides functions to get information about dependency
       
    30  *  nodes or dependency content.
       
    31  *
       
    32  *  This interface is also present when the node depends on some free
       
    33  *  downloadable content. In that case, DependencyNodeL() will return 
       
    34  *  a NULL pointer.
       
    35  *
       
    36  *  @see MNcdNodeDependency
       
    37  *  @see MNcdNode
       
    38  *
       
    39  *  
       
    40  */
       
    41 class MNcdNodeDependencyInfo
       
    42 {
       
    43 public:
       
    44 
       
    45     /** 
       
    46      * @return const TDesC& Name of the dependency content.
       
    47      *         If the protocol has not defined any value, 
       
    48      *         an empty string is returned.
       
    49      */
       
    50     virtual const TDesC& Name() const = 0;
       
    51 
       
    52     /** 
       
    53      * @return const TDesC& Version of the dependency content.
       
    54      *         If the protocol has not defined any value, 
       
    55      *         an empty string is returned.
       
    56      */
       
    57     virtual const TDesC& Version() const = 0;
       
    58     
       
    59     /** 
       
    60      * This function is the indicative Symbian application UID for the
       
    61      * contents that are applications. This can be used e.g. for checking
       
    62      * if the application has already been installed to the phone.
       
    63      *    
       
    64      * @return TUid Uid of the dependency content.
       
    65      */
       
    66     virtual TUid Uid() const = 0;
       
    67 
       
    68 
       
    69     /** 
       
    70      * @return MNcdNode* Node that contains the dependency content. 
       
    71      *         If the dependency content has been given as a 
       
    72      *         downloadable content, then NULL is returned.
       
    73      *         Counted, Release() must be called after use.
       
    74      * @exception Leave System wide error code.
       
    75      */
       
    76     virtual MNcdNode* DependencyNodeL() const = 0;
       
    77 
       
    78 
       
    79     /**
       
    80      * Returns the state of the dependency
       
    81      *
       
    82      * @return Dependency's state
       
    83      */
       
    84     virtual TNcdDependencyState State() const = 0;
       
    85 
       
    86 
       
    87 protected:
       
    88 
       
    89     /**
       
    90      * The destructor of an interface is set virtual to make sure that
       
    91      * the destructors of derived classes are called appropriately when the
       
    92      * object is destroyed.
       
    93      *
       
    94      * Destructor is defined as protected to prevent direct use of 
       
    95      * delete on interface.
       
    96      *
       
    97      * 
       
    98      */
       
    99     virtual ~MNcdNodeDependencyInfo() { };
       
   100 
       
   101 };
       
   102 
       
   103 #endif // NCD_NODE_DEPENDENCY_INFO