omads/omadsextensions/adapters/mediads/inc/playlistitem.h
branchRCL_3
changeset 52 4f0867e42d62
parent 51 8e7494275d3a
child 56 3e6957da2ff8
equal deleted inserted replaced
51:8e7494275d3a 52:4f0867e42d62
     1 /*
       
     2 * Copyright (c) 2009 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:  Part of SyncML Data Synchronization Plug In Adapter
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef PLAYLISTITEM_H_
       
    20 #define PLAYLISTITEM_H_
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <s32mem.h>
       
    24 #include <BADESCA.H>
       
    25 
       
    26 class CPlaylistItem : public CBase
       
    27     {
       
    28 public:
       
    29     static CPlaylistItem* NewLC();
       
    30     ~CPlaylistItem();
       
    31     
       
    32     void SetId( TInt aId );
       
    33     TInt Id() const;
       
    34     
       
    35     void SetTitleL( const TDesC& aTitle );
       
    36     const TDesC& Title() const;
       
    37     
       
    38     void SetUrlL( const TDesC& aUrl );
       
    39     const TDesC& Url() const;
       
    40     
       
    41     void AddItemL( const TDesC& aSongUri );
       
    42     TInt ItemCount() const;
       
    43     TPtrC16 ItemAt( TInt aIndex ) const;
       
    44     TInt FindItem( const TDesC16& aPtr, TInt& aPos, TKeyCmpText aTextComparisonType=ECmpFolded ) const;
       
    45     
       
    46     void ExportL( RBufWriteStream& aStream ) const;
       
    47     void ImportL( const TDesC& aBuffer );
       
    48     
       
    49 private:
       
    50     CPlaylistItem();
       
    51     void ConstructL();
       
    52     
       
    53 private:
       
    54     
       
    55     TInt ReadNextLine( const TDesC& aBuffer, TPtrC& aLine );
       
    56     
       
    57 private:
       
    58     TInt iId;
       
    59     HBufC* iTitle;
       
    60     HBufC* iUrl;
       
    61 
       
    62     CDesCArrayFlat* iDescArray;
       
    63     };
       
    64 
       
    65 #endif /* PLAYLISTITEM_H_ */