equal
deleted
inserted
replaced
|
1 // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Defines the avdtp message base class |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @internalComponent |
|
21 */ |
|
22 |
|
23 #ifndef AVDTPMESSAGE_H |
|
24 #define AVDTPMESSAGE_H |
|
25 |
|
26 #include <es_mbuf.h> |
|
27 |
|
28 NONSHARABLE_CLASS(CAvdtpMessage) : public CBase |
|
29 { |
|
30 public: |
|
31 /** |
|
32 @return KErrNone if successful and data as expected |
|
33 KErrNotReady if data not as expected (N.B. could indicate an abort message) |
|
34 */ |
|
35 virtual TInt NewData(TUint aCount/*RMBufChain& aFragment*/)=0; |
|
36 void AppendDataL(const TDesC8& aData); |
|
37 void AppendDataL(const TChar& aChar); |
|
38 |
|
39 inline RMBufChain& Data(); |
|
40 virtual ~CAvdtpMessage(); |
|
41 |
|
42 protected: |
|
43 void AppendNewData(RMBufChain& aFragment); |
|
44 TPtrC8 DataPtr(TInt aFrom); // MBuf helper (!) which operates on the packet to the end |
|
45 TPtrC8 DataPtr(TInt aFrom, TInt aTo); // MBuf helper (!) which operates on the packet |
|
46 |
|
47 |
|
48 private: |
|
49 RMBufChain iPacket; // new packets might join with this to defrag |
|
50 }; |
|
51 |
|
52 RMBufChain& CAvdtpMessage::Data() |
|
53 { |
|
54 return iPacket; |
|
55 } |
|
56 |
|
57 #endif //AVDTPMESSAGE_H |