|
1 /* |
|
2 * Copyright (c) 2002 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: Class definition of CDmAdRtNode. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __DMADRTNODE_H__ |
|
21 #define __DMADRTNODE_H__ |
|
22 |
|
23 #include <e32base.h> |
|
24 |
|
25 #include "dmadengineexportdef.h" |
|
26 #include "dmadcallback.h" |
|
27 #include "dmadcommand.h" |
|
28 #include "dmadrtnodedataapi.h" |
|
29 |
|
30 //------------------------------------------------------------------------------------------------ |
|
31 // CDmAdRtNode |
|
32 //------------------------------------------------------------------------------------------------ |
|
33 class CDmAdRtNode : public CBase |
|
34 { |
|
35 public: |
|
36 DMAD_IMPORT_C static CDmAdRtNode* NewL(const TDesC8& aUri, const TDesC8& aLuid, MDmAdCallBack* aCallBack, MDmAdRtNodeDataApi* aRtNodeDataApi); |
|
37 DMAD_IMPORT_C ~CDmAdRtNode(); |
|
38 DMAD_IMPORT_C TPtrC8 Uri(void) const; |
|
39 DMAD_IMPORT_C TPtrC8 Luid(void) const; |
|
40 DMAD_IMPORT_C void SetLuidL(const TDesC8& aLuid); |
|
41 static void CleanupOperationDeleteCArrayPtr(TAny* aPtr); |
|
42 void AppendCommandL(CDmAdCommand* aCommand); |
|
43 void AddLeafObjectL(const TDesC8& aUri, const TDesC8& aObject, TInt aStatusRef); |
|
44 void UpdateLeafObjectL(const TDesC8& aUri, const TDesC8& aObject, TInt aStatusRef); |
|
45 TBool IsSomeChild(const TDesC8& aSomeParentUri) const; |
|
46 TBool AreUriTypesSame(const TDesC8& aUri); |
|
47 |
|
48 inline CArrayPtr<CDmAdCommand>* Commands(void) const; |
|
49 inline TBool IsSomeLeafAddedToRtNode(void) const; |
|
50 inline TBool IsJustFetched(void) const; |
|
51 inline CDmAdRtNodeData* Data(void) const; |
|
52 inline void SetSomeLeafAddedToRtNode(TBool aSomeLeafAddedToRtNode); |
|
53 |
|
54 private: |
|
55 CDmAdRtNode(MDmAdRtNodeDataApi* aRtNodeDataApi); |
|
56 void ConstructL(const TDesC8& aUri, const TDesC8& aLuid, MDmAdCallBack* aCallBack); |
|
57 |
|
58 private: |
|
59 MDmAdRtNodeDataApi* iRtNodeDataApi; |
|
60 |
|
61 CArrayPtr<CDmAdCommand>* iCommands; |
|
62 HBufC8* iUri; |
|
63 HBufC8* iLuid; |
|
64 TBool iSomeLeafAddedToRtNode; |
|
65 TBool iJustFetched; |
|
66 CDmAdRtNodeData* iData; |
|
67 }; |
|
68 |
|
69 #include "dmadrtnode.inl" |
|
70 |
|
71 #endif |