|
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 AMRPAYLOADHEADEROA_H |
|
22 #define AMRPAYLOADHEADEROA_H |
|
23 |
|
24 #include "amrpayloadheader.h" |
|
25 |
|
26 // CLASS DECLARATION |
|
27 |
|
28 /** |
|
29 * The Amr payload header in octet aligned ( OA ) mode. |
|
30 * |
|
31 * @lib Mccamrplformat.dll |
|
32 * @since Series 60 3.1 |
|
33 */ |
|
34 class CAmrPayloadHeaderOA : public CAmrPayloadHeader |
|
35 { |
|
36 |
|
37 public: // Constructors and destructor |
|
38 |
|
39 /** |
|
40 * Two-phased constructor. |
|
41 */ |
|
42 static CAmrPayloadHeaderOA* NewL(); |
|
43 |
|
44 /** |
|
45 * Destructor. |
|
46 */ |
|
47 ~CAmrPayloadHeaderOA( ); |
|
48 |
|
49 public: // Functions from CAmrPayloadHeader |
|
50 |
|
51 /** |
|
52 * Encode the payload header fields into a given buffer at the given |
|
53 * position. Values to encode are obtained from the corresponding |
|
54 * header fields. Byte and bit positions are updated after encoding |
|
55 * is done. |
|
56 * @since Series 60 3.1 |
|
57 * @param aBuffer - [output] Buffer to store encoded data. |
|
58 * @param aByteIndex - [input] Starting byte index ( starts from |
|
59 * zero ). |
|
60 * [output] Byte index updated after encoding. |
|
61 * @param aBitIndex - [input] Starting bit index |
|
62 * ( starts from zero ). |
|
63 * [output] Bit index updated after encoding. |
|
64 */ |
|
65 virtual void Encode( TUint8* aBuffer, TInt& aByteIndex, TInt& aBitIndex ); |
|
66 |
|
67 /** |
|
68 * Decode the payload header from a given buffer at the given position. |
|
69 * Decoded values are returned in the corresponding header fields. |
|
70 * Byte and bit positions are updated after decoding is done. |
|
71 * @since Series 60 3.1 |
|
72 * @param aBuffer - [input] Buffer to decode data from. |
|
73 * @param aByteIndex - [input] Starting byte index ( starts from |
|
74 * zero ). |
|
75 * [output] Byte index updated after decoding. |
|
76 * @param aBitIndex - [input] Starting bit index |
|
77 * ( starts from zero ). |
|
78 * [output] Bit index updated after decoding. |
|
79 */ |
|
80 virtual void Decode( const TUint8* aBuffer, TInt& aByteIndex, |
|
81 TInt& aBitIndex ); |
|
82 |
|
83 private: // Functions |
|
84 |
|
85 /** |
|
86 * Constructor. |
|
87 */ |
|
88 CAmrPayloadHeaderOA(); |
|
89 |
|
90 }; |
|
91 |
|
92 #endif // AMRPAYLOADHEADEROA_H |