menufw/hierarchynavigator/hnmetadatamodel/inc/hnmdnotifyrequests.h
changeset 0 f72a12da539e
equal deleted inserted replaced
-1:000000000000 0:f72a12da539e
       
     1 /*
       
     2 * Copyright (c) 2007-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:  represents the notification requests
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_HNMDREQUESTS_H
       
    21 #define C_HNMDREQUESTS_H
       
    22 
       
    23 #include <e32base.h>
       
    24 #include <xmlengelement.h> 
       
    25 
       
    26 class CHnItemId;
       
    27 class CHnMdNotifyRequest;
       
    28 struct THnMdCommonPointers;
       
    29 
       
    30 /**
       
    31  * Notify Requests.
       
    32  * 
       
    33  * This class stores CHnMdNotifyRequest objects.
       
    34  * 
       
    35  *
       
    36  * @lib hnmetadatamodel
       
    37  * @since S60 5.0
       
    38  * @ingroup group_hnmetadatamodel
       
    39  */
       
    40 NONSHARABLE_CLASS(CHnMdNotifyRequests) : public CBase
       
    41     {
       
    42 public:
       
    43 
       
    44     /**
       
    45      * Two-phase constructor.
       
    46      *
       
    47      * @since S60 5.0
       
    48      * @param aElement Element.
       
    49      * @param aItemId Item's identifier.
       
    50      * @param aCmnPtrs Common pointers.
       
    51      * @return Fully constructed object.
       
    52      */
       
    53     static CHnMdNotifyRequests* NewL( TXmlEngElement aElement, 
       
    54             const CHnItemId & aItemId,
       
    55             THnMdCommonPointers* aCmnPtrs );
       
    56 
       
    57     /**
       
    58      * Two-phase constructor.
       
    59      *
       
    60      * @since S60 5.0
       
    61      * @param aElement Element.
       
    62      * @param aItemId Item's identifier.
       
    63      * @param aCmnPtrs Common pointers.
       
    64      * @return Fully constructed object.
       
    65      */
       
    66     static CHnMdNotifyRequests* NewLC( TXmlEngElement aElement,
       
    67             const CHnItemId & aItemId,
       
    68             THnMdCommonPointers* aCmnPtrs );
       
    69 
       
    70     /**
       
    71      * Standard C++ virtual destructor.
       
    72      *
       
    73      * @since S60 5.0
       
    74      */
       
    75     virtual ~CHnMdNotifyRequests();
       
    76 
       
    77     /**
       
    78      * Adds request.
       
    79      *
       
    80      * @since S60 5.0
       
    81      * @param aRequests Request parameters.
       
    82      * @return Status code.
       
    83      */
       
    84     TInt AddNotifyRequest( CHnMdNotifyRequest* aRequests );
       
    85     
       
    86     /**
       
    87      * Gets request.
       
    88      *
       
    89      * @since S60 5.0
       
    90      * @param aPosition Position of a query.
       
    91      * @return Query.
       
    92      */
       
    93     CHnMdNotifyRequest& NotifyRequest( TInt aPosition ) const;
       
    94     
       
    95     /**
       
    96      * Gets number of requests.
       
    97      *
       
    98      * @since S60 5.0
       
    99      * @return Number of queries.
       
   100      */
       
   101     TInt Count() const;
       
   102     
       
   103     /**
       
   104      * Requests notifucation from all services.
       
   105      *
       
   106      * @since S60 5.0
       
   107      * @param aParams Parameters in a form of a CLiwGenericParamList object.
       
   108      * @param aCmdOptions Command options.
       
   109      */
       
   110     void SendAllRequestsL( CLiwGenericParamList& aParams,
       
   111             TInt aCmdOptions = 0);
       
   112     
       
   113     /**
       
   114      * Check if requests were sent.
       
   115      * 
       
   116      * @return Returns true if requests were sent.
       
   117      */
       
   118     TBool Sent();
       
   119 
       
   120 
       
   121 private:
       
   122 
       
   123     /**
       
   124      * Standard C++ constructor.
       
   125      *
       
   126      * @since S60 5.0
       
   127      */
       
   128     CHnMdNotifyRequests();
       
   129 
       
   130     /**
       
   131      * Standard symbian 2nd phase constructor.
       
   132      *
       
   133      * @since S60 5.0
       
   134      * @param aElement Xml element.
       
   135      * @param aItemId Item's id.
       
   136      * @param aCmnPtrs Common pointers container.
       
   137      */
       
   138     void ConstructL(  TXmlEngElement aElement, 
       
   139             const CHnItemId & aItemId,
       
   140             THnMdCommonPointers* aCmnPtrs );
       
   141 
       
   142 private: // data
       
   143 
       
   144     /**
       
   145      * Own - Requests.
       
   146      */
       
   147     RPointerArray<CHnMdNotifyRequest> iNotifyRequests;
       
   148     
       
   149     
       
   150     /**
       
   151      * Indicates if requests were sent.
       
   152      */
       
   153     TBool iSent;
       
   154 
       
   155     };
       
   156 
       
   157 #endif // C_HNMDREQUESTS_H