|
1 /* |
|
2 * Copyright (c) 2002-2005 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 |
|
22 |
|
23 |
|
24 |
|
25 #include "senhostletrequest.h" |
|
26 |
|
27 #include "senidentifier.h" // internal, Utils\inc |
|
28 #include "senchunk.h" // internal, Utils\inc |
|
29 |
|
30 EXPORT_C CSenHostletRequest* CSenHostletRequest::NewL(const TInt aRequestId, |
|
31 const TDesC8& aRequestUtf8, |
|
32 RThread aThread, |
|
33 const CSenIdentifier& aConsumerId, |
|
34 CSenChunk* apChunk) |
|
35 { |
|
36 CSenHostletRequest* pNew = CSenHostletRequest::NewLC(aRequestId, |
|
37 aRequestUtf8, |
|
38 aThread, |
|
39 aConsumerId, |
|
40 apChunk); |
|
41 CleanupStack::Pop(); |
|
42 return pNew; |
|
43 } |
|
44 |
|
45 EXPORT_C CSenHostletRequest* CSenHostletRequest::NewLC(const TInt aRequestId, |
|
46 const TDesC8& aRequestUtf8, |
|
47 RThread aThread, |
|
48 const CSenIdentifier& aConsumerId, |
|
49 CSenChunk* apChunk) |
|
50 { |
|
51 CSenHostletRequest* pNew = |
|
52 new(ELeave) CSenHostletRequest(aRequestId, aRequestUtf8, aThread, aConsumerId, apChunk); |
|
53 CleanupStack::PushL(pNew); |
|
54 pNew->ConstructL(); |
|
55 return pNew; |
|
56 } |
|
57 |
|
58 CSenHostletRequest::CSenHostletRequest(const TInt aRequestId, |
|
59 const TDesC8& aRequestUtf8, |
|
60 RThread aThread, |
|
61 const CSenIdentifier& aConsumerId, |
|
62 CSenChunk* apChunk) |
|
63 : iRequestId(aRequestId), |
|
64 iRequestUtf8(aRequestUtf8), |
|
65 iThread(aThread), |
|
66 iConsumerIdentifier(aConsumerId), |
|
67 ipChunk(apChunk) |
|
68 { |
|
69 } |
|
70 |
|
71 EXPORT_C CSenHostletRequest::~CSenHostletRequest() |
|
72 { |
|
73 } |
|
74 |
|
75 void CSenHostletRequest::ConstructL() |
|
76 { |
|
77 |
|
78 } |
|
79 |
|
80 EXPORT_C TPtrC8 CSenHostletRequest::RequestUtf8() const |
|
81 { |
|
82 return iRequestUtf8; |
|
83 } |
|
84 |
|
85 |
|
86 EXPORT_C TPtrC CSenHostletRequest::ThreadId() const |
|
87 { |
|
88 return iThread.FullName(); |
|
89 } |
|
90 |
|
91 EXPORT_C TPtrC8 CSenHostletRequest::ConsumerId() const |
|
92 { |
|
93 return iConsumerIdentifier.Value(); |
|
94 } |
|
95 |
|
96 EXPORT_C TInt CSenHostletRequest::RequestId() const |
|
97 { |
|
98 return iRequestId; |
|
99 } |
|
100 |
|
101 |
|
102 EXPORT_C TPtrC8 CSenHostletRequest::Properties(MSenProperties::TSenPropertiesClassType& aType) const |
|
103 { |
|
104 |
|
105 if(!ipChunk) |
|
106 { |
|
107 aType = MSenProperties::ENotInUse; |
|
108 return KNullDesC8(); |
|
109 } |
|
110 |
|
111 aType = ipChunk->ChunkHeader().PropertiesType(); |
|
112 TPtrC8 properties; |
|
113 ipChunk->DescFromChunk(properties, 1); |
|
114 return properties; |
|
115 } |
|
116 |
|
117 |
|
118 // END OF FILE |
|
119 |
|
120 |
|
121 |
|
122 |
|
123 |