upnpavcontroller/upnpavcontrollerclient/inc/upnpavbrowsingsession.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:      session towards a media server
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 #ifndef C_UPNPAVBROWSINGSESSION_H
       
    24 #define C_UPNPAVBROWSINGSESSION_H
       
    25 
       
    26 // INCLUDE FILES
       
    27 #include <e32std.h>
       
    28 #include "upnpavsessionbase.h"
       
    29 
       
    30 // FORWARD DECLARATIONS
       
    31 class MUPnPAVDeviceObserver;
       
    32 class MUPnPAVBrowsingSessionObserver;
       
    33 class MUPnPAVFileObserver;
       
    34 class CUpnpObject;
       
    35 class CUpnpItem;
       
    36 class CUpnpAVDevice;
       
    37 class CUpnpContainer;
       
    38 
       
    39 /**
       
    40  *  AV Controller browsing session interface.
       
    41  *
       
    42  *  This class defines the browsing interface of AV Controller. Includes
       
    43  *  operations to search, browse, copy, create container, delete object and
       
    44  *  to get search capabilities.
       
    45  *
       
    46  *  @lib upnpavcontrollerclient.lib
       
    47  *  @since S60 v3.1
       
    48  */
       
    49 class MUPnPAVBrowsingSession : public MUPnPAVSessionBase
       
    50     {
       
    51 
       
    52 public:
       
    53 
       
    54     /**
       
    55      * Defines the type of browse (metadata or direct children)
       
    56      *
       
    57      * @since Series 60 3.1
       
    58      */
       
    59     enum TBrowseFlag
       
    60         {
       
    61         EDirectChildren = 0,
       
    62         EMetadata
       
    63         };
       
    64 
       
    65     /**
       
    66      * Defines the download location (default, phone memory, memory card or
       
    67      * RAM Drive)
       
    68      *
       
    69      * @since Series 60 3.1
       
    70      */
       
    71     enum TMemoryType
       
    72         {
       
    73         EDefault = 0,
       
    74         EPhone ,
       
    75         EMemoryCard,
       
    76         ERAMDrive
       
    77         };
       
    78 
       
    79     /**
       
    80      * Defines the sharing status of a downloaded item
       
    81      *
       
    82      * @since Series 60 3.1
       
    83      */
       
    84     enum TFileSharing
       
    85         {
       
    86         EFileIsShared = 0,
       
    87         EFileIsNotShared,
       
    88         EShareBySettings
       
    89         };
       
    90 
       
    91     /**
       
    92      * Defines the container type
       
    93      *
       
    94      * @since Series 60 3.1
       
    95      */
       
    96     enum TContainerType
       
    97         {
       
    98         EStorageContainer = 0,      // object.container
       
    99         EPlaylistContainer          // object.container.playlistContainer
       
   100         };
       
   101 
       
   102 public:
       
   103 
       
   104     /**
       
   105      * Sets the browsing session observer
       
   106      *
       
   107      * @since Series 60 3.1
       
   108      * @param aObserver browsing session observer
       
   109      */
       
   110      virtual void SetObserver( MUPnPAVBrowsingSessionObserver&
       
   111         aObserver) = 0;
       
   112      
       
   113     /**
       
   114      * Removes the browsing session observer
       
   115      *
       
   116      * @since Series 60 3.1
       
   117      * @param None
       
   118      */
       
   119     virtual void RemoveObserver() = 0;
       
   120 
       
   121     /**
       
   122      * Returns the browsing session observer
       
   123      *
       
   124      * @since Series 60 3.1
       
   125      * @param None
       
   126      */
       
   127     virtual MUPnPAVBrowsingSessionObserver* Observer() const = 0;
       
   128 
       
   129 public:
       
   130 
       
   131     /**
       
   132      * Browses the content directory of a given Media
       
   133      * Server.
       
   134      *
       
   135      * @since Series 60 3.1
       
   136      * @param aId Container or object id.
       
   137      * @param aFilter TDesC8& filter
       
   138      * @param aBrowseFlag Metadata or DirectChildren
       
   139      * @param aStartIndex TInt start index
       
   140      * @param aRequestedCount TInt requested count
       
   141      * @param aSortCriteria TDesC8& sort criteria
       
   142      */
       
   143     virtual void BrowseL( const TDesC8& aId,
       
   144                           const TDesC8& aFilter,
       
   145                           TBrowseFlag aBrowseFlag,
       
   146                           TInt aStartIndex,
       
   147                           TInt aRequestedCount,
       
   148                           const TDesC8& aSortCriteria ) = 0;
       
   149 
       
   150     /**
       
   151      * Cancels the browse operation (ignores the result set when it
       
   152      * is received).
       
   153      *
       
   154      * @since Series 60 3.1
       
   155      * @param none
       
   156      * @return none
       
   157      */
       
   158     virtual void CancelBrowse() = 0;
       
   159 
       
   160     /**
       
   161      * Searches the content directory of a given Media Server.
       
   162      *
       
   163      * @since Series 60 3.1
       
   164      * @param aId container id
       
   165      * @param aSearchCriteria TDesC8& search criteria
       
   166      * @param aFilter TDesC8& filter
       
   167      * @param aStartIndex TInt start index
       
   168      * @param aRequestedCount TInt requested count
       
   169      * @param aSortCriteria TDesC8& sort criteria
       
   170      */
       
   171     virtual void SearchL(   const TDesC8& aId,
       
   172                             const TDesC8& aSearchCriteria,
       
   173                             const TDesC8& aFilter,
       
   174                             TInt aStartIndex,
       
   175                             TInt aRequestedCount,
       
   176                             const TDesC8& aSortCriteria ) = 0;
       
   177 
       
   178     /**
       
   179      * Cancels the search operation (ignores the result set when it
       
   180      * is received).
       
   181      *
       
   182      * @since Series 60 3.1
       
   183      * @param none
       
   184      */
       
   185     virtual void CancelSearch() = 0;
       
   186 
       
   187     /**
       
   188      * Gets the search capabilities of the Media Server that
       
   189      * has been set as the "source device".
       
   190      *
       
   191      * @since Series 60 3.1
       
   192      * @param None
       
   193      */
       
   194     virtual void GetSearchCapabilitiesL() = 0;
       
   195 
       
   196     /**
       
   197      * Creates a new container to the target Media Server.
       
   198      *
       
   199      * @since Series 60 3.1
       
   200      * @param aTitle (const TDesC8&) title for the new container
       
   201      * @param aParentId (const TDesC8&) container ID of the container into
       
   202      *        which the new container is to be created
       
   203      * @param aContainerType (TContainerType) type of the new container
       
   204      */
       
   205     virtual void CreateContainerL( const TDesC8& aTitle,
       
   206                                    const TDesC8& aParentId,
       
   207                                    TContainerType aContainerType ) = 0;
       
   208 
       
   209     /**
       
   210      * Deletes an UPnP item on the target UPnP media server.
       
   211      *
       
   212      * @since Series 60 3.1
       
   213      * @param aId id of an object to be destroyed 
       
   214      */
       
   215     virtual void DeleteObjectL( const TDesC8& aId ) = 0;
       
   216 
       
   217 
       
   218 protected:
       
   219 
       
   220     virtual ~MUPnPAVBrowsingSession() {};
       
   221 
       
   222     };
       
   223 
       
   224 
       
   225 #endif // C_UPNPAVBROWSINGSESSION_H