ncdengine/provider/protocol/inc/ncdrequestbrowsesearch.h
changeset 0 ba25891c3a9e
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     1 /*
       
     2 * Copyright (c) 2006 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:   CNcdRequestBrowseSearch declaration
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CNCDREQUESTBROWSESEARCH_HH
       
    20 #define CNCDREQUESTBROWSESEARCH_HH
       
    21 
       
    22 #include <e32std.h>
       
    23 #include <e32base.h>
       
    24 #include "ncdrequestbase.h"
       
    25 #include "ncdrequestconstants.h"
       
    26 #include "ncdprotocoltypes.h"
       
    27 
       
    28 class CNcdRequestBrowseSearch : public CNcdRequestBase
       
    29     {
       
    30 
       
    31 public:
       
    32     HBufC8* CreateRequestL();
       
    33 
       
    34     /**
       
    35      * Setter for the request mode (browse/search)
       
    36      *
       
    37      * @param aDoSearch  Search request if true, browse if false
       
    38      */
       
    39     void SetSearch( TBool aDoSearch );
       
    40        
       
    41 
       
    42     /**
       
    43      * Adds an entity to browse/search.
       
    44      *
       
    45      * @param aId
       
    46      * @param aIncludeMetadata
       
    47      */
       
    48     void AddEntityL( const TDesC& aId, TBool aIncludeMetadata );
       
    49     
       
    50     /**
       
    51      * Adds an entity to browse/search.
       
    52      *
       
    53      * @param aId
       
    54      * @param aTimestamp
       
    55      * @param aIncludeMetadata
       
    56      */
       
    57     void AddEntityL( const TDesC& aId, const TDesC& aTimestamp,
       
    58                      TBool  aIncludeMetadata );
       
    59     
       
    60     /**
       
    61      * Adds an entity filter to the request.
       
    62      * Arrays include only included keywords.
       
    63      *
       
    64      * @param aIncludedKeywords         Included keywords.
       
    65      * @param aIncludedContentPurposes  Included content purposes.
       
    66      * @param aReviewScore              Review score (1-5)
       
    67      * @param aSubscribableContent      Is content subscribable?
       
    68      * @param aFreeContent              Is content free?
       
    69      */
       
    70     void AddEntityFilterL( 
       
    71         const MDesC16Array& aIncludedKeywords,
       
    72         const MDesC16Array& aIncludedContentPurposes,        
       
    73         TBool         aSubscribableContent,
       
    74         TBool         aFreeContent);
       
    75         
       
    76     
       
    77     /**
       
    78      * Adds a response filter to the request.
       
    79      *
       
    80      * @param aPageSize
       
    81      * @param aSpageStart
       
    82      * @param aStructureDepth
       
    83      * @param aMetaDataDepth
       
    84      * @param aMetaDataPerLevel
       
    85      * @param aIncludedElements
       
    86      * @param aExcludedElements
       
    87      */
       
    88     void AddResponseFilterL(
       
    89         TInt          aPageSize,
       
    90         TInt          aPageStart,
       
    91         TInt          aStructureDepth,
       
    92         TInt          aMetaDataDepth,
       
    93         TInt          aMetaDataPerLevel,
       
    94         const MDesC16Array& aIncludedElements,
       
    95         const MDesC16Array& aExcludedElements );
       
    96     
       
    97 public:
       
    98     static CNcdRequestBrowseSearch* NewL();
       
    99     static CNcdRequestBrowseSearch* NewLC();
       
   100 
       
   101     void ConstructL();
       
   102     
       
   103     ~CNcdRequestBrowseSearch();
       
   104 
       
   105 private:
       
   106     CNcdRequestBrowseSearch();
       
   107 
       
   108 private:
       
   109     TXmlEngString iName;
       
   110     TXmlEngString iNamespaceUri;
       
   111     TXmlEngString iPrefix;
       
   112     TXmlEngString iType;
       
   113     TBool iDoSearch;    
       
   114     RArray<TNcdRequestRemoteEntity> iEntities;
       
   115     
       
   116     TNcdRequestEntityFilter iEntityFilter;
       
   117     TBool iEntityFilterEnabled;
       
   118     
       
   119     TNcdRequestResponseFilter iResponseFilter;
       
   120     TBool iResponseFilterEnabled;
       
   121     
       
   122     };
       
   123 
       
   124 #endif //CNCDREQUESTBROWSESEARCH_HH
       
   125