idlehomescreen/xmluicontroller/inc/xmlnodeidgenerator.h
branchRCL_3
changeset 83 5456b4e8b3a8
equal deleted inserted replaced
82:5f0182e07bfb 83:5456b4e8b3a8
       
     1 /*
       
     2 * Copyright (c) 2005-2007 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:  Builder class for XML UI node identifiers.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_XMLNODEIDGENERATOR_H
       
    20 #define C_XMLNODEIDGENERATOR_H
       
    21 
       
    22 // System includes
       
    23 #include <e32base.h>
       
    24 
       
    25 // User includes
       
    26 
       
    27 // Forward declarations
       
    28 class CHsContentPublisher;
       
    29 class THsPublisherInfo;
       
    30 struct TAiContentItem;
       
    31 
       
    32 namespace AiXmlUiController
       
    33 {
       
    34 /**
       
    35 *  @ingroup group_xmluicontroller
       
    36 * 
       
    37 *  Xml node id generator.Generates an identifier that is used to look up 
       
    38 *  settings node from XML UI model.
       
    39 *
       
    40 *  @lib AiXmlUiMain
       
    41 */
       
    42 NONSHARABLE_CLASS( CXmlNodeIdGenerator ) : public CBase
       
    43     {
       
    44 public: 
       
    45     // Constructor and destructor
       
    46 
       
    47     static CXmlNodeIdGenerator* NewL();
       
    48     
       
    49     ~CXmlNodeIdGenerator();
       
    50 
       
    51 public:    
       
    52     // New functions
       
    53 
       
    54     /**
       
    55      * Generates an identifier that is used to look up settings node from 
       
    56      * XML UI model.
       
    57      *
       
    58      * @param aPublisherInfo Active Idle publisher info to use in the 
       
    59      *                       identifier generation.
       
    60      * @return content node identifier.
       
    61      */
       
    62     TPtrC SettingsNodeIdL( const THsPublisherInfo& aPublisherInfo );
       
    63     
       
    64     /**
       
    65      * Generates an identifier that is used to look up content node from 
       
    66      * XML UI model.
       
    67      *
       
    68      * @param aPlugin       Active Idle publisher to use in the identifier 
       
    69      *                      generation.
       
    70      * @param aContentItem  Active Idle content item to use in the 
       
    71      *                      identifier generation.
       
    72      * @return content node identifier.
       
    73      */
       
    74     TPtrC ContentNodeIdL( CHsContentPublisher& aPlugin, 
       
    75         const TAiContentItem& aContentItem );
       
    76     
       
    77     /**
       
    78      * Generates an identifier that is used to look up content node from 
       
    79      * XML UI model.
       
    80      *
       
    81      * @param aPublisherInfo Active Idle publisher info to use in the 
       
    82      *                       identifier generation.
       
    83      * @param aContentItem   Active Idle content item to use in the 
       
    84      *                       identifier generation.
       
    85      * @return content node identifier.
       
    86      */
       
    87     TPtrC ContentNodeIdL( const THsPublisherInfo& aPublisherInfo, 
       
    88         const TAiContentItem& aContentItem );
       
    89     
       
    90     /**
       
    91      * Generates an identifier that is used to look up resource node from 
       
    92      * XML UI model.
       
    93      *
       
    94      * @param aPlugin       Active Idle publisher to use in the identifier 
       
    95      *                      generation.
       
    96      * @param aContentItem  Active Idle content item to use in the 
       
    97      *                      identifier generation.
       
    98      * @return resource node identifier.
       
    99      */
       
   100     TPtrC ResourceNodeIdL( CHsContentPublisher& aPlugin, 
       
   101         const TAiContentItem& aContentItem );
       
   102     
       
   103     /**
       
   104      * Generates an identifier that is used to look up resource node from 
       
   105      * XML UI model.
       
   106      *
       
   107      * @param aPublisherInfo Active Idle publisher info to use in the 
       
   108      *                       identifier generation.
       
   109      * @param aContentItem   Active Idle content item to use in the 
       
   110      *                       identifier generation.
       
   111      * @return resource node identifier.
       
   112      */
       
   113     TPtrC ResourceNodeIdL( const THsPublisherInfo& aPublisherInfo, 
       
   114         const TAiContentItem& aContentItem );
       
   115     
       
   116 private: 
       
   117     // Constructors
       
   118     
       
   119     /**
       
   120      * C++ default constructor
       
   121      */
       
   122     CXmlNodeIdGenerator();
       
   123         
       
   124 private: 
       
   125     // data
       
   126 
       
   127     /** Content node id buffer, Owned */
       
   128     HBufC* iContentNodeIdBuf;    
       
   129     };
       
   130         
       
   131 }  // namespace AiXmlUiController
       
   132 
       
   133 #endif // C_XMLNODEIDGENERATOR_H
       
   134 
       
   135 // End of file