|
1 // Copyright (c) 2008-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 // |
|
15 |
|
16 |
|
17 |
|
18 /** |
|
19 @file |
|
20 @internalTechnology |
|
21 @released |
|
22 */ |
|
23 |
|
24 #ifndef REMCONQUEUEMESSAGE_H_ |
|
25 #define REMCONQUEUEMESSAGE_H_ |
|
26 |
|
27 #include <e32base.h> |
|
28 |
|
29 class CRemConQueuedMessage; |
|
30 |
|
31 /** |
|
32 A queue for RemCon request command messages. |
|
33 */ |
|
34 NONSHARABLE_CLASS(TRemConMessageQueue) |
|
35 { |
|
36 public: |
|
37 IMPORT_C TRemConMessageQueue(); |
|
38 IMPORT_C void Reset(); |
|
39 IMPORT_C void AddLast(CRemConQueuedMessage& aMsg); |
|
40 IMPORT_C TBool IsEmpty(); |
|
41 IMPORT_C CRemConQueuedMessage* First() const; |
|
42 IMPORT_C void Remove(CRemConQueuedMessage& aMsg); |
|
43 IMPORT_C const CRemConQueuedMessage* Find(TUid aInterfaceUid |
|
44 ,TInt aOperationId |
|
45 ); |
|
46 private: |
|
47 TSglQue<CRemConQueuedMessage> iQueue; |
|
48 TSglQueIter<CRemConQueuedMessage> iIter; |
|
49 }; |
|
50 |
|
51 /** |
|
52 A data encapsulation class for a request. |
|
53 |
|
54 The object contains the data of the request and the type of the request, which |
|
55 will be put in a queue. |
|
56 */ |
|
57 NONSHARABLE_CLASS(CRemConQueuedMessage) : public CBase |
|
58 { |
|
59 public: |
|
60 IMPORT_C static CRemConQueuedMessage* NewL(TUid aInterfaceUid |
|
61 ,const TDesC8& aData |
|
62 ,TInt aOperationId |
|
63 ); |
|
64 |
|
65 IMPORT_C ~CRemConQueuedMessage(); |
|
66 IMPORT_C const TDesC8& Data(); |
|
67 |
|
68 private: |
|
69 CRemConQueuedMessage(TUid aInterfaceUid, TInt aOperationId); |
|
70 void ConstructL(const TDesC8& aData); |
|
71 |
|
72 public: |
|
73 TSglQueLink iLink; |
|
74 TUid iInterfaceUid; |
|
75 TInt iOperationId; |
|
76 |
|
77 private: |
|
78 RBuf8 iData; |
|
79 }; |
|
80 |
|
81 |
|
82 #endif /*REMCONQUEUEMESSAGE_H_*/ |