upnpavcontroller/upnpavcontrollerclient/inc/upnpavbrowserequest.h
changeset 0 7f85d04be362
equal deleted inserted replaced
-1:000000000000 0:7f85d04be362
       
     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:      a data class containing browse-related data
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 #ifndef C_CUPNPAVBROWSEREQUEST_H
       
    24 #define C_CUPNPAVBROWSEREQUEST_H
       
    25 
       
    26 
       
    27 #include <e32base.h>
       
    28 #include <s32mem.h>
       
    29 
       
    30 #include "upnpavbrowsingsession.h"
       
    31 // FORWARD DECLARATIONS
       
    32 
       
    33 // CLASS DECLARATION
       
    34 
       
    35 /**
       
    36 *  UPnP AV Controller Client/Server communication helper class
       
    37 *  
       
    38 *
       
    39 *  @lib - 
       
    40 *  @since Series 60 3.1
       
    41 */
       
    42 
       
    43 class CUpnpAVBrowseRequest : public CBase
       
    44     { 
       
    45     
       
    46 public:  // Constructors and destructor
       
    47         
       
    48     /**
       
    49      * Two-phased constructor.
       
    50      */
       
    51     static inline CUpnpAVBrowseRequest* NewLC();
       
    52     
       
    53     /**
       
    54      * Two-phased constructor.
       
    55      */
       
    56     static inline CUpnpAVBrowseRequest* NewL();
       
    57     
       
    58     /**
       
    59      * Destructor.
       
    60      */
       
    61     inline virtual ~CUpnpAVBrowseRequest();
       
    62     
       
    63 public:
       
    64 
       
    65     /**
       
    66      * Externalizes device information to stream.
       
    67      * Leaves in case of errors.
       
    68      * @since Series 60 3.0
       
    69      * @param reference to RWriteStream
       
    70      * @return none
       
    71      */
       
    72     inline void ExternalizeL( RWriteStream& aStream ) const;
       
    73     
       
    74     /**
       
    75      * Internalizes device information from stream.
       
    76      * Leaves in case of errors.
       
    77      * @since Series 60 3.0
       
    78      * @param reference to RReadStream
       
    79      * @return none
       
    80      */
       
    81     inline void InternalizeL( RReadStream& aStream );
       
    82 
       
    83     /**
       
    84      * Externalizes information to stream and returns the object as a heap
       
    85      * desctiptor.
       
    86      */        
       
    87     inline HBufC8* ToDes8L() const;
       
    88 
       
    89 private: //
       
    90 
       
    91     /**
       
    92      * Constructor
       
    93      */
       
    94     inline CUpnpAVBrowseRequest();
       
    95 
       
    96     /**
       
    97      * Perform the second phase construction
       
    98      */
       
    99     inline void ConstructL();
       
   100 
       
   101 public: // New methods
       
   102 
       
   103     /**
       
   104      * Set Id
       
   105      * @param aId
       
   106      */
       
   107     inline void SetIdL( const TDesC8& aId );
       
   108 
       
   109     /**
       
   110      * Get Id
       
   111      * @return id
       
   112      */    
       
   113     inline const TDesC8& Id();
       
   114 
       
   115     /**
       
   116      * Set search criteria
       
   117      * @param aSearchCriteria
       
   118      */    
       
   119     inline void SetSearchCriteriaL( const TDesC8& aSearchCriteria );
       
   120 
       
   121     /**
       
   122      * Get search criteria
       
   123      * @return search criteria
       
   124      */    
       
   125     inline const TDesC8& SearchCriteria();
       
   126 
       
   127     /**
       
   128      * Set filter
       
   129      * @param aFilter
       
   130      */
       
   131     inline void SetFilterL( const TDesC8& aFilter );
       
   132         
       
   133     /**
       
   134      * Get filter
       
   135      * @return filter
       
   136      */    
       
   137     inline const TDesC8& Filter();
       
   138 
       
   139     /**
       
   140      * Set browse flag
       
   141      * @param aBrowseFlag
       
   142      */    
       
   143     inline void SetBrowseFlag( MUPnPAVBrowsingSession::TBrowseFlag
       
   144         aBrowseFlag );
       
   145     
       
   146     /**
       
   147      * Get browse flag
       
   148      * @return browse flag
       
   149      */    
       
   150     inline MUPnPAVBrowsingSession::TBrowseFlag BrowseFlag();
       
   151 
       
   152     /**
       
   153      * Set start index
       
   154      * @param aStartIndex
       
   155      */    
       
   156     inline void SetStartIndex( TInt aStartIndex );
       
   157     
       
   158     /**
       
   159      * Get start index
       
   160      * @return start index
       
   161      */    
       
   162     inline TInt StartIndex();
       
   163 
       
   164     /**
       
   165      * Set requested count
       
   166      * @param aRequestedCount
       
   167      */
       
   168     inline void SetRequestedCount( TInt aRequestedCount );
       
   169 
       
   170     /**
       
   171      * Get requested count
       
   172      * @return requested count
       
   173      */    
       
   174     inline TInt RequestedCount();
       
   175 
       
   176     /**
       
   177      * Set sort criteria
       
   178      * @param aSortCriteria
       
   179      */
       
   180     inline void SetSortCriteriaL( const TDesC8& aSortCriteria );
       
   181     
       
   182     /**
       
   183      * Get sort criteria
       
   184      * @return sort criteria
       
   185      */    
       
   186     inline const TDesC8& SortCriteria();
       
   187 
       
   188 private:
       
   189     
       
   190     TInt                                iCriteriaLength;
       
   191     HBufC8*                             iId; // Owned
       
   192     HBufC8*                             iSearchCriteria; // Owned
       
   193     HBufC8*                             iFilter; // Owned
       
   194     MUPnPAVBrowsingSession::TBrowseFlag iBrowseFlag;
       
   195     TInt                                iStartIndex;
       
   196     TInt                                iRequestedCount;
       
   197     HBufC8*                             iSortCriteria; // Owned
       
   198     
       
   199     };
       
   200 
       
   201 #include "upnpavbrowserequest.inl"
       
   202 
       
   203 #endif // C_CUPNPAVBROWSEREQUEST_H