mtpdataproviders/mtpplaybackcontroldp/mtpplaybackinterface/inc/cmtpplaybackparam.h
branchRCL_3
changeset 20 4a793f564d72
parent 19 0aa8cc770c8a
child 21 74aa6861c87d
equal deleted inserted replaced
19:0aa8cc770c8a 20:4a793f564d72
     1 // Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 /**
       
    17  @file
       
    18  @internalComponent
       
    19 */
       
    20 
       
    21 #ifndef CMTPPLAYBACKPARAM_H
       
    22 #define CMTPPLAYBACKPARAM_H
       
    23 
       
    24 #include "mtpdebug.h"
       
    25 
       
    26 /**
       
    27  Category identifier
       
    28 */
       
    29 enum TMTPPbCategory
       
    30     {
       
    31     /** Init value **/
       
    32     EMTPPbCatNone=0,
       
    33     /** SingleMusic **/
       
    34     EMTPPbCatMusic=1,
       
    35     /** PlayList**/
       
    36     EMTPPbCatPlayList = 2,
       
    37     /** Ablum **/
       
    38     EMTPPbCatAlbum = 3       
       
    39     };
       
    40 
       
    41 enum TMTPPbDataType
       
    42     {
       
    43     EMTPPbTypeNone,
       
    44     EMTPPbInt32,
       
    45     EMTPPbUint32,
       
    46     EMTPPbSuidSet,
       
    47     EMTPPbVolumeSet,
       
    48     EMTPPbTypeEnd
       
    49     };
       
    50 
       
    51 class TMTPPbDataSuid
       
    52     {
       
    53 public:
       
    54     TMTPPbDataSuid(TMTPPbCategory aCategory, const TDesC& aSuid);
       
    55 
       
    56     TMTPPbCategory Category() const;
       
    57     const TDesC& Suid() const;
       
    58 
       
    59 private:
       
    60     //The category
       
    61     TMTPPbCategory iPlayCategory;
       
    62     //The suid of object for initialization    
       
    63     TFileName iSuid;
       
    64     };
       
    65 
       
    66 /**
       
    67 * Encapsulates parameter for playback commands and events.
       
    68 */
       
    69 class CMTPPbParamBase : public CBase
       
    70     {
       
    71 public:
       
    72     virtual const TMTPPbDataSuid& SuidSetL() const;
       
    73     virtual TInt32 Int32L() const;
       
    74     virtual TUint32 Uint32L() const;
       
    75     virtual ~CMTPPbParamBase();
       
    76     TMTPPbDataType Type() const;
       
    77 
       
    78 protected:
       
    79     /**
       
    80      * The constuctor.
       
    81      * @param aCategory, category of object for initialization,
       
    82      */
       
    83     CMTPPbParamBase();
       
    84     CMTPPbParamBase(TInt32 aValue);
       
    85     CMTPPbParamBase(TUint32 aValue);
       
    86     CMTPPbParamBase(TMTPPbCategory aCategory, const TDesC& aSuid);
       
    87 
       
    88     void ConstructL(TMTPPbCategory aCategory, const TDesC& aSuid);
       
    89     void ConstructL(TInt32 aValue);
       
    90     void ConstructL(TUint32 aValue);
       
    91     void ConstructL(const CMTPPbParamBase& aParam);
       
    92     void SetType(TMTPPbDataType);
       
    93     TAny* GetData() const;
       
    94     void SetData(TAny* aData);
       
    95 
       
    96 private:
       
    97     __FLOG_DECLARATION_MEMBER;
       
    98 
       
    99     TMTPPbDataType  iParamType;
       
   100     TAny*       iData;
       
   101     };
       
   102 
       
   103 #endif //CMTPPLAYBACKPARAM_H
       
   104