|
1 // Copyright (c) 2006-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 // Definition of network request channel component. |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @internalTechnology |
|
21 @released |
|
22 */ |
|
23 |
|
24 #ifndef REQUESTMESSGAEBUFFER_H_ |
|
25 #define REQUESTMESSGAEBUFFER_H_ |
|
26 |
|
27 #include <e32hashtab.h> |
|
28 #include "lbsnrhngmsgs.h" |
|
29 #include "lbsnetinternalapi.h" |
|
30 |
|
31 |
|
32 |
|
33 /** Buffer used by CNetworkRequestChannel and CPsyRequestChannel for non-emergency requests. |
|
34 |
|
35 LBS processes location and privacy requests and buffers them dynamically |
|
36 when an outstanding request is being processed by the NRH. |
|
37 |
|
38 This buffer allocates memory at run-time, making it unsafe in an OOM |
|
39 situation. |
|
40 */ |
|
41 class CRequestMessageBuffer : public CBase |
|
42 { |
|
43 public: |
|
44 static CRequestMessageBuffer* NewL(); |
|
45 ~CRequestMessageBuffer(); |
|
46 |
|
47 TInt BufferMessage(const TLbsNetInternalMsgBase& aMessage); |
|
48 const TLbsNetInternalMsgBase* PeekNextMessage(); |
|
49 void RemoveMessage(const TLbsNetInternalMsgBase* aMessage); |
|
50 |
|
51 static TBool IsMsgTypeEqual( |
|
52 const TLbsNetInternalMsgBase::TLbsNetInternalMsgType* aType, |
|
53 const TLbsNetInternalMsgBase& aData); |
|
54 |
|
55 static TBool IsMsgEqual( |
|
56 const TLbsNetInternalMsgBase& aData1, |
|
57 const TLbsNetInternalMsgBase& aData2); |
|
58 |
|
59 private: |
|
60 CRequestMessageBuffer() {} |
|
61 CRequestMessageBuffer(const CRequestMessageBuffer&); |
|
62 |
|
63 void ConstructL(); |
|
64 |
|
65 private: |
|
66 RPointerArray<TLbsNetInternalMsgBase> iBuffer; |
|
67 }; |
|
68 |
|
69 #endif // REQUESTMESSGAEBUFFER_H_ |