multimediacommscontroller/mmccamrpayloadformat/inc/amrtocentryoa.h
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2006 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:    
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef AMRTOCENTRYOA_H
       
    22 #define AMRTOCENTRYOA_H
       
    23 
       
    24 #include <e32std.h>
       
    25 #include "amrtocentry.h" 
       
    26 
       
    27 /**
       
    28 *  The Amr payload `table of contents' ( TOC ) entry in octet aligned ( OA )
       
    29 *  mode.
       
    30 *
       
    31 *  @lib      Mccamrplformat.dll
       
    32 *  @since    Series 60 3.1
       
    33 */
       
    34 class CAmrTocEntryOA : public CAmrTocEntry
       
    35     {
       
    36     
       
    37 public:  // Constructors and destructor
       
    38         
       
    39     /**
       
    40     * Two-phased constructor.
       
    41     */
       
    42     static CAmrTocEntryOA* NewL();
       
    43 
       
    44     /**
       
    45     * Destructor.
       
    46     */
       
    47     ~CAmrTocEntryOA( );
       
    48 
       
    49 public: // Functions from CAmrTocEntry
       
    50         
       
    51     // NOTE: Call the original function first and add more logic for OA mode.
       
    52 
       
    53     /**
       
    54     * Encode the `table of contents' ( TOC ) entry fields into a given
       
    55     * buffer at the given position. Values to encode are obtained from the
       
    56     * corresponding fields. Byte and bit positions are updated after
       
    57     * encoding is done.
       
    58     * @since    Series 60 3.1
       
    59     * @param    aBuffer - [output] Buffer to store encoded data.
       
    60     * @param    aByteIndex - [input] Starting byte index ( starts from 
       
    61     *           zero ).
       
    62     *           [output] Byte index updated after encoding.
       
    63     * @param    aBitIndex - [input] Starting bit index 
       
    64     *                        ( starts from zero ).
       
    65     *           [output] Bit index updated after encoding.
       
    66     */
       
    67     virtual void Encode( TUint8* aBuffer, TInt& aByteIndex, TInt& aBitIndex );
       
    68 
       
    69     /**
       
    70     * Decode the `table of contents' ( TOC ) entry fields from a given
       
    71     * buffer at the given position. Decoded values are returned in the
       
    72     * corresponding fields.Byte and bit positions are updated after
       
    73     * decoding is done.
       
    74     * @since    Series 60 3.1
       
    75     * @param    aBuffer - [input] Buffer to decode data from.
       
    76     * @param    aByteIndex - [input] Starting byte index ( starts from
       
    77     *           zero ).
       
    78     *           [output] Byte index updated after decoding.
       
    79     * @param    aBitIndex - [input] Starting bit index 
       
    80     *                        ( starts from zero ).
       
    81     *           [output] Bit index updated after decoding.
       
    82     */
       
    83     virtual void Decode( const TUint8* aBuffer, TInt& aByteIndex,
       
    84         TInt& aBitIndex );
       
    85     
       
    86 private: // Functions
       
    87 
       
    88     /**
       
    89     * Constructor.
       
    90     */
       
    91     CAmrTocEntryOA();
       
    92 
       
    93     };
       
    94 
       
    95 #endif        // AMRTOCENTRYOA_H