mmsengine/mmsmessage/inc/mmsmmboxviewheaders.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:   Headers related to MMbox view
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef MMSMMBOXVIEWHEADERS_H
       
    22 #define MMSMMBOXVIEWHEADERS_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 *  Headers in MMBox view requests and view confirmations
       
    43 *
       
    44 *  @lib mmsutil.lib
       
    45 *  @since 2.6
       
    46 */
       
    47 class CMmsMMBoxViewHeaders : public CBase
       
    48     {
       
    49     public:  // Constructors and destructor
       
    50         
       
    51         /**
       
    52         * C++ default constructor.
       
    53         */
       
    54         CMmsMMBoxViewHeaders();
       
    55 
       
    56         /**
       
    57         * Destructor.
       
    58         */
       
    59         virtual ~CMmsMMBoxViewHeaders();
       
    60 
       
    61     public: // New functions
       
    62         
       
    63         /**
       
    64         * Internalize.
       
    65         * @since 2.6
       
    66         * @param aStream opened read stream
       
    67         */
       
    68         void InternalizeL( RMsvReadStream& aStream );
       
    69 
       
    70         /**
       
    71         * Externalize.
       
    72         * @since 2.6
       
    73         * @param aStream opened write stream
       
    74         */
       
    75         void ExternalizeL( RMsvWriteStream& aStream ) const;
       
    76 
       
    77         /*
       
    78         * How much room this needs on disk
       
    79         * @since 2.6
       
    80         * @return amount of bytes the data in this item needs
       
    81         */
       
    82         TInt Size() const;
       
    83 
       
    84         /**
       
    85         * MmsStart accessor
       
    86         * @since 2.6
       
    87         * @return Index of first MM to have information returned
       
    88         */
       
    89         inline TUint MmsStart() const;
       
    90 
       
    91         /**
       
    92         * MmsStart mutator
       
    93         * @since 2.6
       
    94         * @param aMmsStart Index of first MM to have information returned
       
    95         */
       
    96         inline void SetMmsStart ( TUint aMmsStart );
       
    97 
       
    98         /**
       
    99         * MmsLimit accessor
       
   100         * @since 2.6
       
   101         * @return Maximum number of selected messages
       
   102         *     0 = No Message related information returned in MMS View confirmation
       
   103         *         ( Quotas and totals only )
       
   104         *     KMaxTUint32 = Information for all remaining messages SHALL be returned
       
   105         *         ( header will be absent from request )
       
   106         *     0 < limit < KMaxTUint32 = return info for specified number of messages
       
   107         */
       
   108         inline TUint MmsLimit() const;
       
   109 
       
   110         /**
       
   111         * MmsLimit mutator
       
   112         * @since 2.6
       
   113         * @param aMmsLimit Maximum number of selected messages
       
   114         *     0 = No Message related information returned in MMS View confirmation
       
   115         *         ( Quotas and totals only )
       
   116         *     KMaxTUint32 = Information for all remaining messages SHALL be returned
       
   117         *         ( header will be absent from request )
       
   118         *     0 < aMmsLimit < KMaxTUint32 = return info for specified number of messages
       
   119         */
       
   120         inline void SetMmsLimit ( TUint aMmsLimit );
       
   121 
       
   122         /**
       
   123         * MmsTotals accessor
       
   124         * @since 2.6
       
   125         * @return MMBox totals requested header (KMmsYes/KmmsNo)
       
   126         */
       
   127         inline TInt MmsTotals() const;
       
   128 
       
   129         /**
       
   130         * MmsTotals mutator
       
   131         * @since 2.6
       
   132         * @param aMmsTotals MMBox totals requested header (KMmsYes/KmmsNo)
       
   133         */
       
   134         inline void SetMmsTotals ( TInt aMmsTotals );
       
   135 
       
   136         /**
       
   137         * MmsQuotas accessor
       
   138         * @since 2.6
       
   139         * @return MMBox quota requested header (KMmsYes/KmmsNo)
       
   140         */
       
   141         inline TInt MmsQuotas() const;
       
   142 
       
   143         /**
       
   144         * MmsQuotas mutator
       
   145         * @since 2.6
       
   146         * @param aMmsQuotas MMBox quota requested header (KMmsYes/KmmsNo)
       
   147         */
       
   148         inline void SetMmsQuotas ( TInt aMmsQuotas );
       
   149 
       
   150         /**
       
   151         * MmsMessageCount accessor
       
   152         * @since 2.6
       
   153         * @return Number of messages in MMbox view confirmation PDU
       
   154         */
       
   155         inline TUint MmsMessageCount() const;
       
   156 
       
   157         /**
       
   158         * MmsMessageCount mutator
       
   159         * @since 2.6
       
   160         * @param aMmsMessageCount Number of messages in MMbox view confirmation PDU
       
   161         */
       
   162         inline void SetMmsMessageCount ( TUint aMmsMessageCount );
       
   163 
       
   164         /**
       
   165         * MMBoxTotalNumber accessor
       
   166         * @since 2.6
       
   167         * @return Total number of messages in user's MMBox
       
   168         */
       
   169         inline TUint MMBoxTotalNumber() const;
       
   170 
       
   171         /**
       
   172         * MMBoxTotalNumber mutator
       
   173         * @since 2.6
       
   174         * @param aMMBoxTotalNumber Total number of messages in user's MMBox
       
   175         */
       
   176         inline void SetMMBoxTotalNumber ( TUint aMMBoxTotalNumber );
       
   177 
       
   178         /**
       
   179         * MMBoxTotalSize accessor
       
   180         * @since 2.6
       
   181         * @return Total size of messages in user's MMBox
       
   182         */
       
   183         inline TUint MMBoxTotalSize() const;
       
   184 
       
   185         /**
       
   186         * MMBoxTotalSize mutator
       
   187         * @since 2.6
       
   188         * @param aMMBoxTotalSize Total size of messages in user's MMBox
       
   189         */
       
   190         inline void SetMMBoxTotalSize( TUint aMMBoxTotalSize );
       
   191 
       
   192         /**
       
   193         * MMBoxQuotaNumber accessor
       
   194         * @since 2.6
       
   195         * @return Quota defined for user's MMBox, number of messages.
       
   196         */
       
   197         inline TUint MMBoxQuotaNumber() const;
       
   198 
       
   199         /**
       
   200         * MMBoxQuotaNumber mutator
       
   201         * @since 2.6
       
   202         * @param aMMBoxQuotaNumber Quota defined for user's MMBox, number of messages.
       
   203         */
       
   204         inline void SetMMBoxQuotaNumber ( TUint aMMBoxQuotaNumber );
       
   205 
       
   206         /**
       
   207         * MMBoxQuotaSize accessor
       
   208         * @since 2.6
       
   209         * @return Quota defined for user's MMBox, total size.
       
   210         */
       
   211         inline TUint MMBoxQuotaSize() const;
       
   212 
       
   213         /**
       
   214         * MMBoxQuotaSize mutator
       
   215         * @since 2.6
       
   216         * @param aMMBoxQuotaSize Quota defined for user's MMBox, total size.
       
   217         */
       
   218         inline void SetMMBoxQuotaSize ( TUint aMMBoxQuotaSize );
       
   219 
       
   220         /**
       
   221         * Attribute array accessor
       
   222         * Use standard RArray functions to manipulate the array.
       
   223         * @since 2.6
       
   224         * @return reference to the information element array.
       
   225         *     The elements must be assigned numbers as defined in Table 21
       
   226         *     in MMS encapsulation document version 1.2 or later.
       
   227         *     (All values will have the high byte set)
       
   228         */
       
   229         inline RArray<TUint>& AttributeArray();
       
   230 
       
   231         /**
       
   232         * Message state array accessor.
       
   233         * These are states used to filter wanted messages in a MMbox view request
       
   234         * Use standard RArray functions to manipulate the array.
       
   235         * Entries are message MMBox States: Draft/Sent/New/Retrieved/Forwarded
       
   236         * @since 2.6
       
   237         * @return reference to the information element array.
       
   238         *     The elements must be assigned numbers:
       
   239         *     KMmsDraft, KMmsSent, KMmsNew, KMmsRetrieved, KMmsForwarded
       
   240         */
       
   241         inline RArray<TInt>& MMStateArray();
       
   242 
       
   243 
       
   244     public: // Functions from base classes
       
   245 
       
   246        
       
   247     protected:  // New functions
       
   248         
       
   249     protected:  // Functions from base classes
       
   250         
       
   251     private:
       
   252 
       
   253     public:     // Data
       
   254    
       
   255     protected:  // Data
       
   256 
       
   257     private:    // Data
       
   258         // Index of first message in view request
       
   259         TUint32  iMmsStart;
       
   260         // Maximum number of message info PDUs to be returned
       
   261         TUint32  iMmsLimit;
       
   262         // Total number requested
       
   263         TInt32  iMmsTotals; // Yes/No, default No
       
   264         // MMBox Quota requested
       
   265         TInt32  iMmsQuotas; // Yes/No, default No
       
   266         // Message count in content of view confirmation PDU
       
   267         TUint32  iMmsMessageCount;
       
   268         // Total number of messages in MMBox
       
   269         TUint32  iMMBoxTotalNumber;
       
   270         // total size of messages in MMBox
       
   271         TUint32  iMMBoxTotalSize;
       
   272         // Message number quota in MMBox
       
   273         TUint32  iMMBoxQuotaNumber;
       
   274         // Message size quota in MMBox
       
   275         TUint32  iMMBoxQuotaSize;
       
   276         // Attributes array, list of information elements for each message
       
   277         // Use InsertInOrder(), FindInOrder() Remove(), and [] operator to access entries.
       
   278         // Call Reset() to clear the array, Count() to find number of items
       
   279         RArray<TUint> iAttributes;
       
   280         // State array. These values correspond to iMmsMMState member in
       
   281         // CMmsMmBoxMessageHeaders class, but in a view request or view confirmation 
       
   282         // the states form an array, and the corresponding header may appear multiple
       
   283         // times. Therefore an array is needed.
       
   284         // The single state should not be used when constructing MMBox view requests or
       
   285         // handling MMBox view responses
       
   286         // Use InsertInOrder(), FindInOrder() Remove(), and [] operator to access entries.
       
   287         // Call Reset() to clear the array, Count() to find number of items
       
   288         RArray<TInt> iMmsMMStates;
       
   289 
       
   290          
       
   291     public:     // Friend classes
       
   292     protected:  // Friend classes
       
   293     private:    // Friend classes
       
   294 
       
   295     };
       
   296 
       
   297 #include "mmsmmboxviewheaders.inl"
       
   298 
       
   299 #endif      // MMSMMBOXVIEWHEADERS_H   
       
   300             
       
   301 // End of File