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