HttpTreeAddEntry


int HttpTreeAddEntry ( HttpTreeHandle hTree , const char *pName , int iMode = HTTP_TREE_ENTRY  , const char *pName = 0 )




 
Adds an entry to an existing tree.

 
hTree handel of the tree.
 
pName is the name of the entry. it is possible to add an url to the name. (i.e. "test.html" or "test.html#/my_test.html")
 
iMode is the insert mode
 
HTTP_TREE_ENTRY    insert common entry on the current level
 
+1...0...-7 insert a folder in on the delta level
 
pUrl is the url for the entry, if pUrl is zero the url will be taken from pName.
 
 

Returns 0 if the entry was inserted or an error number:

2 tree not exist
4 url too long
5 name too long
7 wrong mode
8 tree data is full

 

i.e.

	HttpTreeAddEntry(hTree,"Abc",HTTP_TREE_ENTRY);
	HttpTreeAddEntry(hTree,"Folder1",0);
	HttpTreeAddEntry(hTree,"Folder2",1);
	HttpTreeAddEntry(hTree,"Folder3",1,"/MyFolder");
	HttpTreeAddEntry(hTree,"Xyz",HTTP_TREE_ENTRY,"/Xyz.html");
	HttpTreeAddEntry(hTree,"Mno#/Mno.html",HTTP_TREE_ENTRY);
	HttpTreeAddEntry(hTree,"Folder4",-2);
	

 

 

see also:

AzHttp Overview | HttpRegisterTree | HttpTreeAddPath | HttpTreeBackground | HttpTreeCreate