mmsengine/mmsmessage/inc/mmselementdescriptor.h
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 /*
       
     2 * Copyright (c) 2004 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:   M-Mms-Element-Descriptor header
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef MMSELEMENTDESCRIPTOR_H
       
    22 #define MMSELEMENTDESCRIPTOR_H
       
    23 
       
    24 //  INCLUDES
       
    25 #include <e32base.h>
       
    26 
       
    27 // CONSTANTS
       
    28 
       
    29 // MACROS
       
    30 
       
    31 // DATA TYPES
       
    32 
       
    33 // FUNCTION PROTOTYPES
       
    34 
       
    35 // FORWARD DECLARATIONS
       
    36 class RMsvReadStream;
       
    37 class RMsvWriteStream;
       
    38 
       
    39 // CLASS DECLARATION
       
    40 
       
    41 /**
       
    42 *  Object for storing X-Mms-Element-Descriptor header
       
    43 *  Only present in a notification
       
    44 *
       
    45 *  @lib mmsutil.lib
       
    46 *  @since 2.6
       
    47 */
       
    48 class CMmsElementDescriptor : public CBase
       
    49     {
       
    50     public:  // Constructors and destructor
       
    51         
       
    52         /**
       
    53         * C++ default constructor.
       
    54         */
       
    55         CMmsElementDescriptor();
       
    56 
       
    57         /**
       
    58         * Destructor.
       
    59         */
       
    60         virtual ~CMmsElementDescriptor();
       
    61 
       
    62     public: // New functions
       
    63         
       
    64         /**
       
    65         * Internalize.
       
    66         * @since 2.6
       
    67         * @param aStream opened read stream
       
    68         */
       
    69         void InternalizeL( RMsvReadStream& aStream );
       
    70 
       
    71         /**
       
    72         * Externalize.
       
    73         * @since 2.6
       
    74         * @param aStream opened write stream
       
    75         */
       
    76         void ExternalizeL( RMsvWriteStream& aStream ) const;
       
    77 
       
    78         /*
       
    79         * How much room this needs on disk
       
    80         * @since 2.6
       
    81         * @return amount of bytes the data in this item needs
       
    82         */
       
    83         TInt Size() const;
       
    84 
       
    85         /*
       
    86         * Content reference accessor
       
    87         * @since 2.6
       
    88         * @return reference to content reference
       
    89         */
       
    90         IMPORT_C TPtrC ContentReference() const;
       
    91 
       
    92         /*
       
    93         * Content reference mutator
       
    94         * @since 2.6
       
    95         * @param aContentReference Content reference from X-Mms-Element-Descriptor header
       
    96         */
       
    97         IMPORT_C void SetContentReferenceL( const TDesC& aContentReference );
       
    98 
       
    99         /*
       
   100         * Content type accessor
       
   101         * @since 2.6
       
   102         * @return reference to content type
       
   103         */
       
   104         IMPORT_C TPtrC8 ContentType() const;
       
   105 
       
   106         /*
       
   107         * Content reference mutator
       
   108         * @since 2.6
       
   109         * @param aContentType Content type from X-Mms-Element-Descriptor header
       
   110         */
       
   111         IMPORT_C void SetContentTypeL( const TDesC8& aContentType );
       
   112 
       
   113 
       
   114     public: // Functions from base classes
       
   115 
       
   116     protected:  // New functions
       
   117         
       
   118     protected:  // Functions from base classes
       
   119         
       
   120     private:
       
   121 
       
   122     public:     // Data
       
   123     
       
   124     protected:  // Data
       
   125 
       
   126     private:    // Data
       
   127         // Content reference
       
   128         HBufC*  iContentReference; // text-string, actual meaning unknown
       
   129         // Content type of the top level message
       
   130         HBufC8* iContentType;      // text string like in mime headers
       
   131         // More parameters to be defined later.
       
   132         // There could be an array of strings depicting parameter-name
       
   133         // parameter-value pairs, but at the moment they have no use.
       
   134          
       
   135 
       
   136     public:     // Friend classes
       
   137     protected:  // Friend classes
       
   138     private:    // Friend classes
       
   139 
       
   140     };
       
   141 
       
   142 #endif      // MMSELEMENTDESCRIPTOR_H   
       
   143             
       
   144 // End of File