|
1 /* |
|
2 * Copyright (c) 2004-2008 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 __RTPSENDITEM_H |
|
22 #define __RTPSENDITEM_H |
|
23 |
|
24 #include <e32def.h> |
|
25 #include "rtputil.h" |
|
26 /** |
|
27 * Holds an a packet and request status for buffering if socket is busy. |
|
28 * |
|
29 * @lib RtpService.dll |
|
30 */ |
|
31 class CRtpSendItem: public CBase |
|
32 { |
|
33 public: |
|
34 |
|
35 /** |
|
36 Allocates and constructs a new item for RtpCommSend. |
|
37 @cat Construction and destruction |
|
38 @return New sendItem object |
|
39 @param aData Data for rtpSendItem |
|
40 */ |
|
41 static CRtpSendItem* NewL(const TDesC8& aPacket, TRequestStatus& aStatus); |
|
42 |
|
43 /** |
|
44 Allocates and constructs a new item for RtpCommSend. |
|
45 @cat Construction and destruction |
|
46 @return New sendItem object |
|
47 @param aData Data for rtpSendItem |
|
48 */ |
|
49 static CRtpSendItem* NewLC(const TDesC8& aPacket, TRequestStatus& aStatus); |
|
50 |
|
51 /** |
|
52 * Allocates and constructs a new item for RtpCommSend. |
|
53 * Stores client's request status while packet is in queue. |
|
54 * @since S60 3.2.3 |
|
55 * @param aPacket rtp packet |
|
56 * @param aStatus Queue owner's request status |
|
57 * @param aClientStatus request status of the client's active class |
|
58 * @return New sendItem object |
|
59 */ |
|
60 static CRtpSendItem* NewL( const TDesC8& aPacket, |
|
61 TRequestStatus& aStatus, TRequestStatus& aClientStatus ); |
|
62 |
|
63 /** |
|
64 * Allocates and constructs a new item for RtpCommSend. |
|
65 * Stores client's request status while packet is in queue. |
|
66 * @since S60 3.2.3 |
|
67 * @param aPacket rtp packet |
|
68 * @param aStatus Queue owner's request status |
|
69 * @param aClientStatus request status of the client's active class |
|
70 * @return New sendItem object |
|
71 */ |
|
72 static CRtpSendItem* NewLC( const TDesC8& aPacket, |
|
73 TRequestStatus& aStatus, TRequestStatus& aClientStatus ); |
|
74 |
|
75 /** |
|
76 Destructor. |
|
77 */ |
|
78 ~CRtpSendItem(); |
|
79 const TDesC8& GetData(); |
|
80 TRequestStatus& iStatus; |
|
81 |
|
82 /** |
|
83 * Return client status pointer. |
|
84 * @since S60 3.2.3 |
|
85 * @return status pointer |
|
86 */ |
|
87 TRequestStatus* ClientStatus(); |
|
88 |
|
89 public: |
|
90 static const TInt iOffset; |
|
91 private: |
|
92 /** |
|
93 Constructor. |
|
94 @cat Construction and destruction |
|
95 */ |
|
96 CRtpSendItem( TRequestStatus& aStatus ); |
|
97 CRtpSendItem( TRequestStatus& aStatus, TRequestStatus& aClientStatus ); |
|
98 |
|
99 /** |
|
100 Second phase constructor. |
|
101 @param aData Data for sendItem |
|
102 */ |
|
103 void ConstructL( const TDesC8& aData ); |
|
104 |
|
105 private: |
|
106 /** Data for the RTPSend */ |
|
107 HBufC8* iPacket; |
|
108 |
|
109 /** Allows objects to be part of a linked list of sendItem */ |
|
110 TSglQueLink iLink; |
|
111 |
|
112 /** |
|
113 * Holds client's status as long as packet is in queue. If NULL, the |
|
114 * sending operation is synchronous. |
|
115 * Not own. |
|
116 */ |
|
117 TRequestStatus* iClientStatus; |
|
118 }; |
|
119 |
|
120 #endif // RTPSENDITEM_H |