upnpsharing/upnpgstwrapper/inc/upnprenderercfg.h
branchIOP_Improvements
changeset 40 08b5eae9f9ff
equal deleted inserted replaced
39:6369bfd1b60d 40:08b5eae9f9ff
       
     1 /*
       
     2 * Copyright (c) 2010 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:  UPnP Renderer config container class
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef C_UPNPRENDERERCFG_H
       
    19 #define C_UPNPRENDERERCFG_H
       
    20 
       
    21 #include <e32base.h>
       
    22 
       
    23 class CUpnpRendererCfg : public CBase
       
    24     {
       
    25     
       
    26 public:
       
    27 
       
    28     /**
       
    29      * Static NewL
       
    30      *
       
    31      * @param aConfigFile Reference to config file descriptor
       
    32      * @param aModelName Reference to model name 8-bit descriptor
       
    33      * @param aSrcMimeType Reference to source mime type 8-bit descriptor
       
    34      * 
       
    35      * @return instance to CUpnpRendererCfg
       
    36      */
       
    37     IMPORT_C static CUpnpRendererCfg* NewL( const TDesC& aConfigFile, 
       
    38             const TDesC8& aModelName, const TDesC8& aSrcMimeType );
       
    39     
       
    40     /**
       
    41      * Static NewLC
       
    42      *
       
    43      * @param aConfigFile Reference to config file descriptor
       
    44      * @param aModelName Reference to model name 8-bit descriptor
       
    45      * @param aSrcMimeType Reference to source mime type 8-bit descriptor
       
    46      * 
       
    47      * @return instance to CUpnpRendererCfg
       
    48      */
       
    49     IMPORT_C static CUpnpRendererCfg* NewLC( const TDesC& aConfigFile, 
       
    50             const TDesC8& aModelName, const TDesC8& aSrcMimeType );
       
    51     
       
    52     IMPORT_C ~CUpnpRendererCfg();
       
    53     
       
    54 private:
       
    55     
       
    56     /**
       
    57      * Destructor
       
    58      */
       
    59     CUpnpRendererCfg();
       
    60    
       
    61     /**
       
    62      * 2nd phrase Constructor
       
    63      */
       
    64     void ConstructL( const TDesC& aConfigFile, const TDesC8& aModelName,
       
    65             const TDesC8& aSrcMimeType );
       
    66     
       
    67 public:
       
    68     
       
    69     /*
       
    70      * Return pipeline descriptor
       
    71      * 
       
    72      * @return Reference to pipeline descriptor if pipeline set, otherwise 
       
    73      *         KNullDesC8
       
    74      */
       
    75     IMPORT_C const TDesC8& Pipeline() const;
       
    76 
       
    77     /*
       
    78      * Return protocol info descriptor
       
    79      * 
       
    80      * @return Reference to protocol info descriptor if pipeline set, 
       
    81      *         otherwise KNullDesC8
       
    82      */
       
    83 
       
    84     IMPORT_C const TDesC8& ProtocolInfo() const;
       
    85     
       
    86     /*
       
    87      * Return protocol info descriptor
       
    88      * 
       
    89      * @return Size multiplier if set, otherwise KErrNotFound
       
    90      */    
       
    91     IMPORT_C TReal SizeMultiplier() const;
       
    92     
       
    93 private:
       
    94     
       
    95     HBufC*  iConfigFile;  //owned
       
    96     HBufC8* iModelName;   //owned
       
    97     HBufC8* iSrcMimeType; //owned
       
    98     
       
    99     HBufC8* iPipeline;       //owned
       
   100     HBufC8* iProtocolInfo;   //owned
       
   101     TReal   iSizeMultiplier;
       
   102     
       
   103 private:
       
   104     
       
   105     /*
       
   106      * CUpnpRendererCfgParser sets directly following private member 
       
   107      * variables, if found from renderer config xml:
       
   108      * - iPipeline
       
   109      * - iProtocolInfo
       
   110      * - iSizeMultiplier
       
   111      */
       
   112     friend class CUpnpRendererCfgParser;
       
   113     
       
   114     };
       
   115 
       
   116 #endif // C_UPNPRENDERERCFG_H
       
   117