epoc32/include/cnode.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
permissions -rw-r--r--
Final list of Symbian^2 public API header files
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
     1
/// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
     2
/// All rights reserved.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
     3
/// This component and the accompanying materials are made available
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
     4
/// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
     5
/// which accompanies this distribution, and is available
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
     6
/// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
     7
///
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
     8
/// Initial Contributors:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
     9
/// Nokia Corporation - initial contribution.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    10
///
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    11
/// Contributors:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    12
///
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    13
/// Description:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    14
/// All rights reserved.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    15
/// This component and the accompanying materials are made available
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    16
/// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    17
/// which accompanies this distribution, and is available
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    18
/// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    19
/// Initial Contributors:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    20
/// Nokia Corporation - initial contribution.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    21
/// Contributors:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    22
/// This contains the definitions of CDataDelete, CDataNoDelete, CIntAttribute, CNode, and CTypedNode.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    23
/// CDataNoDelete is a base class to CDataDelete and are essentially a wrapper around an HBufC16.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    24
/// The node owns the data that is added to it and therefore is responsible for deleting all its data,
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    25
/// hence theses two classes allow a user to have non deletable data. Internally to the node it is also 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    26
/// sometimes necessary to change the data into either deletable or non-deletable data api's are provided
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    27
/// for this.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    28
/// CIntAttribute is wrapper around a TInt, this is provided as the nodes attribute value is a CBase* however
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    29
/// it might be desirable to store integer's in here. Attribute value is owned by the node therefore the node is
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    30
/// responsible for deleting it.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    31
/// CNode is the basis for constructing a tree. It consists of an array of child nodes, node type, a parent node,
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    32
/// an array of attributes, and a data member. Internally the data member is defined as CDataNoDelete however
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    33
/// to the user all the exported api's take an HBufC16*. Data is owned by the node and is destroyed by the node,
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    34
/// However in certain circumstances this is not desirable hence the api's to make the data non-deletable. The
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    35
/// node type is defined as a TAny* however normal usage would use the templated node - CTypedNode. The node type
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    36
/// is used to identify groups of nodes. The attribute array is fairy simple and consists of AttributeType and 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    37
/// AttributeValue. AttributeType can be defined by using the templated class and should be a 32bit value. AttributeValue
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    38
/// can be any object derived from CBase and the node takes ownership therefore the node delete's it.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    39
/// Basic usage should be to use the templated class in order to make use of the templated types (TNodeType,TAttributeType).
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    40
/// Create a node for example:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    41
/// CTypedNode<CNode*, const TDesC*> *tree = CTypedNode<CNode*, const TDesC*>::NewL(0,0);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    42
/// add a new child:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    43
/// CNODE *TestChildNode1 = tree->AppendNodeL(aTempNodeForNodeType);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    44
/// add some data:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    45
/// TestChildNode1->SetDataL(aHBufC16);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    46
/// add an attribute:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    47
/// TestChildNode1->->AddAttributeL(aTAttributeType,aCBasePointerAttributeValue);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    48
/// Explanation of individual api's is documented below.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    49
///
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    50
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    51
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    52
 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    53
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    54
#ifndef __CNODE_H__
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    55
#define __CNODE_H__
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    56
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    57
#include <e32base.h>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    58
#include <f32file.h>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    59
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    60
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    61
/**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    62
	@file
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    63
	@publishedAll
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    64
	@released
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    65
*/
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    66
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    67
//Granularity of arrays
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    68
const TInt KGranularity = 5;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    69
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    70
//enum of panic reasons
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    71
enum TNodePanic
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    72
	{
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    73
	ENodeBadArgument,
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    74
	ENodeNoChildren,
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    75
	ENoData,
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    76
	EAttributeFailure
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    77
	};
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    78
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    79
//node panic function
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    80
inline void Panic(TNodePanic aPanic);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    81
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    82
//Wrapper around an HBufC16 doesn't delete data
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    83
//##ModelId=3B666BCC0303
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    84
class CDataNoDelete : public CBase
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    85
/** Provides a wrapper around an HBufC16: the buffer is not deleted when the object is deleted.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    86
*/
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    87
	{
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    88
public:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    89
	//##ModelId=3B666BCC032D
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    90
	CDataNoDelete(HBufC16* aData);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    91
	//##ModelId=3B666BCC032C
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    92
	virtual ~CDataNoDelete();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    93
	//##ModelId=3B666BCC0324
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    94
	HBufC16* SetData(HBufC16* aData);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    95
	//##ModelId=3B666BCC0322
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    96
	virtual void ResetDataPointer(HBufC16* aData);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    97
	//##ModelId=3B666BCC0321
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    98
	HBufC16* Data();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    99
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   100
protected:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   101
	/** The wrapped buffer. */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   102
	//##ModelId=3B666BCC0319
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   103
	HBufC16* iData;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   104
	};
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   105
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   106
//Wrapper around an HBufC16 does delete data
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   107
//##ModelId=3B666BCC0399
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   108
class CDataDelete : public CDataNoDelete
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   109
/** Provides a wrapper around an HBufC16: the buffer is deleted when the 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   110
object is deleted.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   111
*/
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   112
	{
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   113
public:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   114
	//##ModelId=3B666BCC03B7
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   115
	CDataDelete(HBufC16* aData);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   116
	//##ModelId=3B666BCC03B0
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   117
	virtual ~CDataDelete();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   118
	//##ModelId=3B666BCC03AE
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   119
	virtual void ResetDataPointer(HBufC16* aData);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   120
	};
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   121
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   122
//Wrapper around an HBufC16 does delete data (FileName)
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   123
// After Removing referenced File 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   124
//##ModelId=3B666BC7026F
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   125
class CFileDataDelete : public CDataNoDelete
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   126
/** Provides a wrapper around a filename: the referenced file is deleted when the object is deleted.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   127
*/
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   128
	{
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   129
public:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   130
	//##ModelId=3B666BC7028F
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   131
	CFileDataDelete(HBufC16* aData);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   132
	//##ModelId=3B666BC7028E
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   133
	virtual ~CFileDataDelete();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   134
	//##ModelId=3B666BC70285
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   135
	virtual void ResetDataPointer(HBufC16* aData);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   136
private:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   137
	//##ModelId=3B666BC70284
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   138
	void RemoveFile();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   139
	};
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   140
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   141
//Wrapper around a TInt used for attribute values in order to allow the node to call a dtor
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   142
//##ModelId=3B666BC6023E
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   143
class CIntAttribute : public CBase
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   144
/** Provides an object wrapper around a TInt value. */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   145
	{
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   146
public:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   147
	//##ModelId=3B666BC6025B
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   148
	inline CIntAttribute(TInt aInteger);		
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   149
	//##ModelId=3B666BC6025A
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   150
	inline TInt Int() const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   151
private:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   152
	//##ModelId=3B666BC60264
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   153
	CIntAttribute();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   154
	//##ModelId=3B666BC60253
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   155
	TInt iInteger;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   156
	};
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   157
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   158
//
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   159
// Node class
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   160
// Normal usage would be to use CTypedNode in order to use specific templated types
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   161
//
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   162
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   163
//##ModelId=3B666BCD02D2
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   164
class CNode : public CBase 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   165
	{
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   166
public:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   167
	//##ModelId=3B666BCE0139
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   168
	IMPORT_C ~CNode();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   169
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   170
	//NewL parameters aType to indentify the type of node, CNode* to set the parent of this node
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   171
	//##ModelId=3B666BCE0125
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   172
	IMPORT_C static CNode* NewL(TAny* aType,CNode* aParent);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   173
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   174
	//Deletes a child node which is passed in as a parameter
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   175
	//##ModelId=3B666BCE011C
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   176
	IMPORT_C void DeleteChildNode(CNode* aNode);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   177
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   178
	//Deletes all the child nodes haging of this node
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   179
	//##ModelId=3B666BCE011B
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   180
	IMPORT_C void DeleteAllChildNodes();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   181
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   182
	//Creates a new node and adds it to the childlist, reference to new node is returned. Can leave if it can't allocate memory for a new node
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   183
	//Type of node is the parameter
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   184
	//##ModelId=3B666BCE0108
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   185
	IMPORT_C CNode& AppendNodeL(TAny* aType = 0);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   186
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   187
	//Appends a node which is passed in as a parameter to this node, so its added to the childlist
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   188
	//##ModelId=3B666BCE00FD
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   189
	IMPORT_C void AppendNodeToThisNodeL(CNode* aNode);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   190
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   191
	//Sets the data in the node to the parameter that is passed in. It's deletable and the node will delete it in dtor
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   192
	//Push aDataNowNodeOwns onto the CleanupStack before calling then pop off on return
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   193
	//##ModelId=3B666BCE00F3
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   194
	IMPORT_C void SetDataL(HBufC16* aDataNowNodeOwns);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   195
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   196
	//returns the data stored in the node, which is returned as an HBufC16*
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   197
	//##ModelId=3B666BCE00EB
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   198
	IMPORT_C HBufC16* Data() const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   199
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   200
	//WARNING this function can leave as it deletes the wrapper object and then creates
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   201
	//a new non deletable wrapper object and sets the data pointer inside the new object
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   202
	//IF THIS LEAVES YOU WILL LOSE YOUR DATA
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   203
	//##ModelId=3B666BCE00EA
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   204
	IMPORT_C void SetDataNoDeleteL();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   205
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   206
	//WARNING this function can leave as it deletes the wrapper object and then creates
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   207
	//a new deletable wrapper object then sets the pointer in the new object
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   208
	//##ModelId=3B666BCE00E9
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   209
	IMPORT_C void ClearSetDataNoDeleteL();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   210
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   211
	// Sets the data in the node to the FileName parameter that is passed in. 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   212
	// It's deletable and the node will delete it, and the file it refers to in dtor
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   213
	// Push aDataLocationNowNodeOwns onto the CleanupStack before calling then pop off on return
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   214
	//##ModelId=3B666BCE00DF
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   215
	IMPORT_C void SetFileDataL(HBufC16* aFileDataLocationNowNodeOwns);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   216
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   217
	//Resets the data pointer to point to aData parameter will delete the data that is owned by the node
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   218
	//##ModelId=3B666BCE00D5
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   219
	IMPORT_C void ResetDataPointer(HBufC16* aData);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   220
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   221
	//returns a reference to the absolute root of the tree
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   222
	//##ModelId=3B666BCE00CB
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   223
	IMPORT_C const CNode& Root() const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   224
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   225
	//returns a child node which is stored in the array of children. The child node is accessed by the index that is the parameter.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   226
	//##ModelId=3B666BCE00C1
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   227
	IMPORT_C CNode* Child(TInt aByIndex) const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   228
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   229
	//Returns either the first child of this node if the parameter is NULL. Or it returns the next chld in the array after
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   230
	//the child passed in as a parameter
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   231
	//##ModelId=3B666BCE00AE
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   232
	IMPORT_C CNode* NextChild(const CNode* aNode = NULL) const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   233
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   234
	//returns the previous child to the child passed in as a parameter. The node parameter is a reference because its the child previous
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   235
	//to the node passed in which obviously must exist
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   236
	//##ModelId=3B666BCE00A4
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   237
	IMPORT_C CNode* PrevChild(const CNode& aNode) const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   238
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   239
	//Returns the parent of this node
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   240
	//##ModelId=3B666BCE00A3
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   241
	IMPORT_C CNode* Parent() const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   242
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   243
	//WARNING this function can leave as it calls AppendNodeToThisNode. The aParent parameter is the node to which you would like to make
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   244
	//the parent of 'this' node.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   245
	//It removes itself from the childlist of it's current parent
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   246
	//##ModelId=3B666BCE0099
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   247
	IMPORT_C void ReparentL(CNode* aParent);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   248
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   249
	//Returns the next sibling which means in effect that it asks for the next child of its parent.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   250
	//Sibling means brother or sister.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   251
	//##ModelId=3B666BCE0090
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   252
	IMPORT_C CNode* NextSibling() const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   253
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   254
	//Returns the previous sibling which means in effect that it asks for the previous child of its parent.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   255
	//Sibling means brother or sister.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   256
	//##ModelId=3B666BCE008F
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   257
	IMPORT_C CNode* PrevSibling() const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   258
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   259
	//returns the number of children that this node has
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   260
	//##ModelId=3B666BCE0085
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   261
	IMPORT_C TInt NumberImmediateChildren() const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   262
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   263
	//Deletes the attribute of which is of aAttributeType (the parameter)
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   264
	//WARNING Attribute values of nodes will be deleted as the node owns them if you don't want it deleted then use a wrapper
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   265
	//##ModelId=3B666BCE007C
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   266
	IMPORT_C void DeleteAttribute(TAny* aAttributeType);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   267
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   268
	//Deletes all the attributes of this node
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   269
	//WARNING Attribute values of nodes will be deleted as the node owns them if you don't want it deleted then use a wrapper
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   270
	//##ModelId=3B666BCE007B
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   271
	IMPORT_C void DeleteAllAttributes();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   272
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   273
	//remove an attribute without deleting it, this is done by simply setting the attributeValue pointer to NULL
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   274
	//WARNING you are now responsiblefor the destruction of this attribute value
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   275
	//##ModelId=3B666BCE0071
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   276
	IMPORT_C void RemoveAttributeNoDelete(TAny* aAttributeType);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   277
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   278
	// Returns the number of attributes that this node has
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   279
	//##ModelId=3B666BCE0067
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   280
	IMPORT_C TInt AttributeCount() const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   281
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   282
	//Returns the type of attribute (AttributeType) at a given index...NOT the attributeValue
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   283
	//##ModelId=3B666BCE005D
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   284
	IMPORT_C TAny* AttributeTypeByIndex(TInt aIndex) const; 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   285
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   286
	//Returns the value of an attribute (AttributeValue) at a given index...NOT the attributeType
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   287
	//##ModelId=3B666BCE003F
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   288
	IMPORT_C CBase* AttributeByIndex(TInt aIndex) const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   289
	//##ModelId=3B666BCE0049
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   290
	IMPORT_C CBase* AttributeByIndex(TInt aIndex,TAny*& aType) const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   291
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   292
	//Adds an attribute, parameters are the type of attribute and its value
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   293
	//WARNING node takes ownership of aAttributeValue
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   294
	////Push aAttributeValue onto the CleanupStack before calling then pop off on return
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   295
	//##ModelId=3B666BCE002B
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   296
	IMPORT_C void AddAttributeL(TAny* AttributeType, CBase* aAttributeValue);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   297
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   298
	//Adds data to the node and also adds an attribute, parameters are the Data to be added, the type of attribute and its value
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   299
	//WARNING node takes ownership of aData and aAttributeValue
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   300
	////Push aAttributeValue and aData onto the CleanupStack before calling then pop off on return
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   301
	//##ModelId=3B666BCE000D
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   302
	IMPORT_C void AddDataAndAttributeL(HBufC16 *aData, TAny* AttributeType, CBase* aAttributeValue);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   303
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   304
	//Returns an attribute value for the given AttributeType(the parameter)
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   305
	//##ModelId=3B666BCE0003
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   306
	IMPORT_C CBase* Attribute(TAny* AttributeType) const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   307
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   308
	//Returns TRUE if the attribute of the given type exists
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   309
	//##ModelId=3B666BCD03E1
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   310
	IMPORT_C TBool AttributeExists(TAny* aAttributeType) const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   311
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   312
	//Returns the node type
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   313
	//##ModelId=3B666BCD03D7
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   314
	IMPORT_C TAny* Type() const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   315
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   316
	//Sets the node type to be aType (the parameter)
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   317
	//##ModelId=3B666BCD03CD
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   318
	IMPORT_C void SetType(TAny* aType);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   319
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   320
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   321
protected:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   322
	//ctor
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   323
	//##ModelId=3B666BCD03B9
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   324
	CNode(TAny* aType, CNode* aParent);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   325
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   326
	//internal finds a child which is passed in as a parameter
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   327
	//##ModelId=3B666BCD03AF
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   328
	TInt FindChild(const CNode* aNode) const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   329
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   330
	//##ModelId=3B666BCD03A7
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   331
	HBufC16* SetupDeletableOrNonDeleteableDataLC();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   332
	//##ModelId=3B666BCD03A6
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   333
	void AdjustBasePointers();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   334
private:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   335
	// Reserved for future expansion
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   336
	//##ModelId=3B666BCD039B
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   337
	virtual void Reserved1();			
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   338
	//##ModelId=3B666BCD03A5
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   339
	virtual void Reserved1() const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   340
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   341
protected:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   342
	//the Type of Node
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   343
	//##ModelId=3B666BCD0392
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   344
	TAny* iType;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   345
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   346
	//This Nodes parent
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   347
	//##ModelId=3B666BCD037E
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   348
	CNode *iParent;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   349
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   350
	// stores attribute type and value. iTypes must be Flat array
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   351
	//##ModelId=3B666BCD0372
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   352
	CArrayPtrFlat<CBase> iValues;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   353
	//##ModelId=3B666BCD034C
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   354
	CArrayPtrFlat<TAny> iTypes;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   355
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   356
	//##ModelId=3B666BCD0324
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   357
	TInt32* iTypesBasePtr;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   358
	//##ModelId=3B666BCD0310
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   359
	CDataNoDelete* iDataValue;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   360
//
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   361
	//An array of child nodes
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   362
	//##ModelId=3B666BCD02FC
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   363
	CArrayPtr<CNode> *iChildList;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   364
private:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   365
	//##ModelId=3B666BCD02DF
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   366
	TAny*	iReserved;						// Reserved for future expansion
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   367
	};
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   368
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   369
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   370
//CTypedNode is derived from CNode and is a thin template. TNodeType you should define as a 32 bit value
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   371
//TAttributeType should be defined as a 32 bit value
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   372
//FOR EXPLANATION OF API'S SEE ABOVE 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   373
//##ModelId=3B666BCC01A4
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   374
template <class TNodeType, class TAttributeType>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   375
class CTypedNode : public CNode 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   376
/** Template class for a node in a node tree.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   377
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   378
The node type is set to the template parameter TNodeType and the attribute type to 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   379
TAttributeType. These parameters should be pointers to the type required to store 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   380
the type value: e.g. for a string, a const TDesC*.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   381
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   382
The class is thin template over CNode. */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   383
	{
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   384
public:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   385
	//##ModelId=3B666BCC024A
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   386
	inline static CTypedNode* NewL(TNodeType aType,CNode* aParent);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   387
	//##ModelId=3B666BCC0248
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   388
	inline void DeleteChildNode(CNode* aNode);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   389
	//##ModelId=3B666BCC0247
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   390
	inline void DeleteAllChildNodes();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   391
	//##ModelId=3B666BCC0245
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   392
	inline CTypedNode<TNodeType,TAttributeType>& AppendNodeL(TNodeType aType);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   393
	//##ModelId=3B666BCC023B
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   394
	inline void AppendNodeToThisNodeL(CNode* aNode);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   395
	//##ModelId=3B666BCC0228
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   396
	inline void SetDataL(HBufC16* aDataNowNodeOwns);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   397
	//##ModelId=3B666BCC0227
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   398
	inline void SetDataNoDeleteL();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   399
	//##ModelId=3B666BCC0221
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   400
	inline void ClearSetDataNoDeleteL();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   401
	//##ModelId=3B666BCC021F
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   402
	inline void SetFileDataL(HBufC16* aFileDataLocationNowNodeOwns);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   403
	//##ModelId=3B666BCC021D
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   404
	inline void ResetDataPointer(HBufC16* aData);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   405
	//##ModelId=3B666BCC0215
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   406
	inline HBufC16* Data() const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   407
	//##ModelId=3B666BCC0214
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   408
	inline const CTypedNode& Root() const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   409
	//##ModelId=3B666BCC020B
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   410
	inline CTypedNode* Child(TInt aByIndex) const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   411
	//##ModelId=3B666BCC0209
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   412
	inline CTypedNode* NextChild(const CNode* aNode = NULL) const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   413
	//##ModelId=3B666BCC0201
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   414
	inline CTypedNode* PrevChild( const CNode& aNode) const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   415
	//##ModelId=3B666BCC0200
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   416
	inline CTypedNode* Parent() const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   417
	//##ModelId=3B666BCC01FE
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   418
	inline void ReparentL(CNode* aParent);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   419
	//##ModelId=3B666BCC01F5
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   420
	inline CTypedNode* NextSibling() const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   421
	//##ModelId=3B666BCC01F4
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   422
	inline CTypedNode* PrevSibling() const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   423
	//##ModelId=3B666BCC01EE
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   424
	inline TInt NumberImmediateChildren() const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   425
	//##ModelId=3B666BCC01EC
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   426
	inline void DeleteAttribute(TAttributeType aAttributeType);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   427
	//##ModelId=3B666BCC01EB
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   428
	inline void DeleteAllAttributes();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   429
	//##ModelId=3B666BCC01E5
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   430
	inline void RemoveAttributeNoDelete(TAttributeType aAttributeType);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   431
	//##ModelId=3B666BCC01E4
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   432
	inline TInt AttributeCount() const; // Returns the number of attributes
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   433
	//##ModelId=3B666BCC01E2
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   434
	inline TAttributeType AttributeTypeByIndex(TInt aIndex) const; 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   435
	//##ModelId=3B666BCC01DC
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   436
	inline CBase* AttributeByIndex(TInt aIndex) const; 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   437
	//##ModelId=3B666BCC01DE
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   438
	inline CBase* AttributeByIndex(TInt aIndex,TAttributeType& aType) const; 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   439
	//##ModelId=3B666BCC01D9
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   440
	inline void AddAttributeL(TAttributeType aAttributeType, CBase* aAttributeValue);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   441
	//##ModelId=3B666BCC01D0
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   442
	inline void AddDataAndAttributeL(HBufC16 *aData, TAttributeType aAttributeType, CBase* aAttributeValue);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   443
	//##ModelId=3B666BCC01CE
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   444
	inline CBase* Attribute(TAttributeType aAttributeType) const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   445
	//##ModelId=3B666BCC01CC
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   446
	inline TBool AttributeExists(TAttributeType aAttributeType) const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   447
	//##ModelId=3B666BCC01C9
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   448
	inline TNodeType Type() const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   449
	//##ModelId=3B666BCC01C7
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   450
	inline void SetType(TNodeType aType);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   451
protected:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   452
	//##ModelId=3B666BCC01C4
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   453
	CTypedNode(TNodeType aType, CNode* aParent);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   454
	};
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   455
#include <cnode.inl>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   456
#endif