Subversion Repositories Kolibri OS

Rev

Rev 7764 | Rev 7972 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
7764 leency 1
 
2
{
3
	dword current_page_buf;
4
	dword current_page_size;
5
	collection url;
6
	collection data; //it has to be int
7
	collection size; //it has to be int
8
	void add();
9
	bool has();
10
	void clear();
7770 leency 11
} pages_cache;
7764 leency 12
13
 
14
{
15
	dword data_pointer;
16
	data_pointer = malloc(_size);
17
	memmov(data_pointer, _data, _size);
18
	data.add(itoa(data_pointer));
19
20
 
21
	size.add(itoa(_size));
22
}
23
24
 
25
{
26
	int pos;
27
	pos = url.get_pos_by_name(_link);
28
	if (pos != -1) {
29
		current_page_buf = atoi(data.get(pos));
30
		current_page_size = atoi(size.get(pos));
31
		return true;
32
	}
33
	return false;
34
}
7770 leency 35
36
 
37
{
38
	url.drop();
39
	data.drop();
40
	size.drop();
41
	current_page_buf = NULL;
42
	current_page_size = NULL;
43
}
7764 leency 44