omads/omadsextensions/adapters/mediads/inc/omadsfolderobject.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:  COMADSFolderObject class implementation
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef __OMADSFOLDEROBJECT_H__
       
    21 #define __OMADSFOLDEROBJECT_H__
       
    22 
       
    23 #include <e32base.h>
       
    24 
       
    25 const TInt KMaxElementLength = 255;
       
    26 const TInt KMaxXmlLineLength = 1024;
       
    27 
       
    28 class COMADSFolderObject : public CBase
       
    29     {
       
    30 public:
       
    31 
       
    32     static COMADSFolderObject* NewLC();
       
    33     ~COMADSFolderObject();
       
    34 
       
    35     // Set methods
       
    36     inline void SetName( const TDesC& aName ) {iName.Copy(aName);};
       
    37     inline void SetCreatedDate( const TDateTime& aDateTime ) {iCreatedDate = aDateTime;};
       
    38     inline void SetModifiedDate( const TDateTime& aDateTime ) {iModifiedDate = aDateTime;};
       
    39     
       
    40     void ExportFolderXmlL( CBufBase& aBuffer );
       
    41     
       
    42 private:
       
    43     void ExportL(); 
       
    44     void WriteL( const TDesC &aData );
       
    45     
       
    46 private:
       
    47     
       
    48     TBuf8<KMaxXmlLineLength>    iTemp;
       
    49     TPath                       iName;
       
    50     TDateTime                   iCreatedDate;
       
    51     TDateTime                   iModifiedDate;
       
    52     CBufBase*                   iBuffer; // Not owned
       
    53     TInt                        iWriteBufPosition;
       
    54     TInt                        iWriteBufSize;
       
    55     };
       
    56 
       
    57 #endif