Subversion Repositories Kolibri OS

Rev

Rev 6535 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6535 Rev 6898
1
format coff
1
format coff
2
use32                                   ; Tell compiler to use 32 bit instructions
2
use32                                   ; Tell compiler to use 32 bit instructions
3
	
3
	
4
section '.flat' code			; Keep this line before includes or GCC messes up call addresses
4
section '.flat' code			; Keep this line before includes or GCC messes up call addresses
5
 
5
 
6
include '../../../programs/struct.inc'
6
include '../../../programs/struct.inc'
7
include '../../../programs/proc32.inc'
7
include '../../../programs/proc32.inc'
8
include '../../../programs/macros.inc'
8
include '../../../programs/macros.inc'
9
purge section,mov,add,sub
9
purge section,mov,add,sub
10
 
10
 
11
include '../../../programs/network.inc'
11
include '../../../programs/network.inc'
12
include '../../../programs/develop/libraries/http/http.inc'
12
include '../../../programs/develop/libraries/http/http.inc'
13
include '../../../programs/dll.inc'
13
include '../../../programs/dll.inc'
14
	
14
	
15
virtual at 0
15
virtual at 0
16
        http_msg http_msg
16
        http_msg http_msg
17
end virtual
17
end virtual
18
 
18
 
19
public init_network as '_kolibri_http_init'
19
public init_network as '_init_network_asm'
20
	
20
	
21
;;; Returns 0 on success. -1 on failure.
21
;;; Returns 0 on success. -1 on failure.
22
 
22
 
23
proc init_network
23
proc init_network
24
	pusha
-
 
25
	mcall 68,11
-
 
26
	stdcall dll.Load, @IMPORT
24
	stdcall dll.Load, @IMPORT
-
 
25
	test    eax, eax
-
 
26
	jnz     error
-
 
27
 
-
 
28
	mov eax, 0
27
	popa
29
	ret
-
 
30
 
-
 
31
error:
-
 
32
	mov eax, -1
28
	ret
33
	ret
29
endp	
34
endp
30
	
35
 
31
@IMPORT:
36
@IMPORT:
32
 
37
 
33
library lib_http,               'http.obj'
38
library lib_http,               'http.obj'
34
 
39
 
35
import  lib_http, \
40
import  lib_http, \
36
	HTTP_get                , 'get'                 , \
41
        HTTP_get                , 'get'                 , \
37
        HTTP_head               , 'head'                , \
42
        HTTP_head               , 'head'                , \
38
        HTTP_post               , 'post'                , \
43
        HTTP_post               , 'post'                , \
39
        HTTP_find_header_field  , 'find_header_field'   , \
44
        HTTP_find_header_field  , 'find_header_field'   , \
40
        HTTP_send               , 'send'                , \
45
        HTTP_send               , 'send'                , \
41
        HTTP_receive            , 'receive'             , \
46
        HTTP_receive            , 'receive'             , \
42
        HTTP_disconnect         , 'disconnect'          , \
47
        HTTP_disconnect         , 'disconnect'          , \
43
        HTTP_free               , 'free'                , \
48
        HTTP_free               , 'free'                , \
44
        HTTP_escape             , 'escape'              , \
49
        HTTP_escape             , 'escape'              , \
45
        HTTP_unescape           , 'unescape'
50
        HTTP_unescape           , 'unescape'
46
	
51
 
47
public HTTP_get as '_http_get_asm'
52
public HTTP_get as '_http_get_asm'
48
public HTTP_head as '_http_head_asm'
53
public HTTP_head as '_http_head_asm'
49
public HTTP_post as '_http_post_asm'
54
public HTTP_post as '_http_post_asm'
50
public HTTP_find_header_field as '_http_find_header_field_asm'
55
public HTTP_find_header_field as '_http_find_header_field_asm'
51
public HTTP_send as '_http_send_asm'
56
public HTTP_send as '_http_send_asm'
52
public HTTP_receive as '_http_receive_asm'
57
public HTTP_receive as '_http_receive_asm'
53
public HTTP_disconnect as '_http_disconnect_asm'
58
public HTTP_disconnect as '_http_disconnect_asm'
54
public HTTP_free as '_http_free_asm'
59
public HTTP_free as '_http_free_asm'
55
public HTTP_escape as '_http_escape_asm'
60
public HTTP_escape as '_http_escape_asm'
56
public HTTP_unescape as '_http_unescape_asm'
61
public HTTP_unescape as '_http_unescape_asm'