inc/mmssendingchain.h
changeset 31 ebfee66fde93
parent 23 238255e8b033
equal deleted inserted replaced
30:6a20128ce557 31:ebfee66fde93
       
     1 /*
       
     2 * Copyright (c) 2003-2007 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:   Structure to hold MMS encapsulation 1.1 version
       
    15 *                previoulsy-sent-by and previously-sent-date information  
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 #ifndef MMSSENDINGCHAIN_H
       
    23 #define MMSSENDINGCHAIN_H
       
    24 
       
    25 //  INCLUDES
       
    26 #include <e32base.h>
       
    27 #include <mtclbase.h>
       
    28 
       
    29 // CONSTANTS
       
    30 
       
    31 // MACROS
       
    32 
       
    33 // DATA TYPES
       
    34 
       
    35 // FUNCTION PROTOTYPES
       
    36 
       
    37 // FORWARD DECLARATIONS
       
    38 
       
    39 // CLASS DECLARATION
       
    40 
       
    41 /**
       
    42 *  Object for storing previously-sent-by objects.
       
    43 *
       
    44 *  @lib mmsutil.lib
       
    45 *  @since 2.1
       
    46 */
       
    47 class CMmsSendingChain : public CBase
       
    48     {
       
    49     public:  // Constructors and destructor
       
    50         
       
    51         /**
       
    52         * C++ default constructor.
       
    53         */
       
    54         CMmsSendingChain();
       
    55 
       
    56         /**
       
    57         * Destructor.
       
    58         */
       
    59         virtual ~CMmsSendingChain();
       
    60 
       
    61     public: // New functions
       
    62         
       
    63         /**
       
    64         * Ordering function.
       
    65         * @since 2.1
       
    66         * @param aFirst first item to be compared
       
    67         * @param aSecond second item to be compared
       
    68         * @return 1 if aFirst > aSecond, -1 if aFirst < aSecond, 0 if aFirst == aSecond
       
    69         */
       
    70         static TInt Compare( const CMmsSendingChain& aFirst, const CMmsSendingChain& aSecond );
       
    71 
       
    72         /**
       
    73         * Internalize.
       
    74         * @since 2.1
       
    75         * @param aStream opened read stream
       
    76         */
       
    77         void InternalizeL( RMsvReadStream& aStream );
       
    78 
       
    79         /**
       
    80         * Externalize.
       
    81         * @since 2.1
       
    82         * @param aStream opened write stream
       
    83         */
       
    84         void ExternalizeL( RMsvWriteStream& aStream ) const;
       
    85 
       
    86         /**
       
    87         * Order accessor.
       
    88         * @since 2.1
       
    89         * @return iOrder
       
    90         */
       
    91         inline TUint Order() const;
       
    92 
       
    93         /**
       
    94         * Order mutator.
       
    95         * @since 2.1
       
    96         * @param sets iOrder
       
    97         */
       
    98         inline void SetOrder( TUint aOrder );
       
    99 
       
   100         /**
       
   101         * Date accessor.
       
   102         * @since 2.1
       
   103         * @return date in seconds from 1970-01-01.
       
   104         */
       
   105         inline TInt64 Date() const;
       
   106 
       
   107         /**
       
   108         * Date mutator. 
       
   109         * @since 2.1
       
   110         * @param aDate date in seconds from 1970-01-01.
       
   111         */
       
   112         inline void SetDate( const TInt64 aDate );
       
   113 
       
   114         /**
       
   115         * Sender accessor.
       
   116         * @since 2.1
       
   117         * @return Real address of sender (for example phone number).
       
   118         */
       
   119         IMPORT_C TPtrC Sender() const;
       
   120 
       
   121         /**
       
   122         * Sender mutator.
       
   123         * @since 2.1
       
   124         * @param aSender
       
   125         */
       
   126         IMPORT_C void SetSenderL( const TDesC& aSender );
       
   127 
       
   128         /*
       
   129         * How much room this needs on disk
       
   130         * @since 2.1
       
   131         * @return amount of bytes the data in this item needs
       
   132         */
       
   133         TInt Size() const;
       
   134 
       
   135     public: // Functions from base classes
       
   136 
       
   137     protected:  // New functions
       
   138         
       
   139     protected:  // Functions from base classes
       
   140         
       
   141     private:
       
   142 
       
   143     public:     // Data
       
   144     
       
   145     protected:  // Data
       
   146 
       
   147     private:    // Data
       
   148         
       
   149         // sending order
       
   150         TUint32  iOrder;
       
   151         // sending date as seconds from 1.1.1970
       
   152         TInt64  iDate;
       
   153         // the address of the sender
       
   154         HBufC*  iSender;
       
   155 
       
   156     public:     // Friend classes
       
   157 
       
   158     protected:  // Friend classes
       
   159 
       
   160     private:    // Friend classes
       
   161 
       
   162     };
       
   163 
       
   164 #include "mmssendingchain.inl"
       
   165 
       
   166 #endif      // MMSSENDINGCHAIN_H   
       
   167             
       
   168 // End of File