mmsengine/mmsmessage/inc/mmselementdescriptor.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 19 Feb 2010 22:47:38 +0200
branchRCL_3
changeset 9 1d7827e39b52
parent 0 72b543305e3a
permissions -rw-r--r--
Revision: 201003 Kit: 201007

/*
* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:   M-Mms-Element-Descriptor header
*
*/




#ifndef MMSELEMENTDESCRIPTOR_H
#define MMSELEMENTDESCRIPTOR_H

//  INCLUDES
#include <e32base.h>

// CONSTANTS

// MACROS

// DATA TYPES

// FUNCTION PROTOTYPES

// FORWARD DECLARATIONS
class RMsvReadStream;
class RMsvWriteStream;

// CLASS DECLARATION

/**
*  Object for storing X-Mms-Element-Descriptor header
*  Only present in a notification
*
*  @lib mmsutil.lib
*  @since 2.6
*/
class CMmsElementDescriptor : public CBase
    {
    public:  // Constructors and destructor
        
        /**
        * C++ default constructor.
        */
        CMmsElementDescriptor();

        /**
        * Destructor.
        */
        virtual ~CMmsElementDescriptor();

    public: // New functions
        
        /**
        * Internalize.
        * @since 2.6
        * @param aStream opened read stream
        */
        void InternalizeL( RMsvReadStream& aStream );

        /**
        * Externalize.
        * @since 2.6
        * @param aStream opened write stream
        */
        void ExternalizeL( RMsvWriteStream& aStream ) const;

        /*
        * How much room this needs on disk
        * @since 2.6
        * @return amount of bytes the data in this item needs
        */
        TInt Size() const;

        /*
        * Content reference accessor
        * @since 2.6
        * @return reference to content reference
        */
        IMPORT_C TPtrC ContentReference() const;

        /*
        * Content reference mutator
        * @since 2.6
        * @param aContentReference Content reference from X-Mms-Element-Descriptor header
        */
        IMPORT_C void SetContentReferenceL( const TDesC& aContentReference );

        /*
        * Content type accessor
        * @since 2.6
        * @return reference to content type
        */
        IMPORT_C TPtrC8 ContentType() const;

        /*
        * Content reference mutator
        * @since 2.6
        * @param aContentType Content type from X-Mms-Element-Descriptor header
        */
        IMPORT_C void SetContentTypeL( const TDesC8& aContentType );


    public: // Functions from base classes

    protected:  // New functions
        
    protected:  // Functions from base classes
        
    private:

    public:     // Data
    
    protected:  // Data

    private:    // Data
        // Content reference
        HBufC*  iContentReference; // text-string, actual meaning unknown
        // Content type of the top level message
        HBufC8* iContentType;      // text string like in mime headers
        // More parameters to be defined later.
        // There could be an array of strings depicting parameter-name
        // parameter-value pairs, but at the moment they have no use.
         

    public:     // Friend classes
    protected:  // Friend classes
    private:    // Friend classes

    };

#endif      // MMSELEMENTDESCRIPTOR_H   
            
// End of File