Subversion Repositories Kolibri OS

Rev

Rev 6459 | Rev 6535 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6459 Rev 6495
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 '_init_network_asm'
19
public init_network as '_kolibri_http_init'
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
	
-
 
25
	mcall 68,11
24
	mcall 68,11
26
	
-
 
27
	stdcall dll.Load, @IMPORT
25
	stdcall dll.Load, @IMPORT
28
        test    eax, eax
-
 
29
        jnz     error
-
 
30
	
-
 
31
	mov eax, 0
-
 
32
	ret
-
 
33
	
-
 
34
error:	
-
 
35
	mov eax, -1
-
 
36
	ret
26
	ret
37
endp	
27
endp	
38
	
28
	
39
@IMPORT:
29
@IMPORT:
40
 
30
 
41
library lib_http,               'http.obj'
31
library lib_http,               'http.obj'
42
 
32
 
43
import  lib_http, \
33
import  lib_http, \
44
	HTTP_get                , 'get'                 , \
34
	HTTP_get                , 'get'                 , \
45
        HTTP_head               , 'head'                , \
35
        HTTP_head               , 'head'                , \
46
        HTTP_post               , 'post'                , \
36
        HTTP_post               , 'post'                , \
47
        HTTP_find_header_field  , 'find_header_field'   , \
37
        HTTP_find_header_field  , 'find_header_field'   , \
48
        HTTP_send               , 'send'                , \
38
        HTTP_send               , 'send'                , \
49
        HTTP_receive            , 'receive'             , \
39
        HTTP_receive            , 'receive'             , \
50
        HTTP_disconnect         , 'disconnect'          , \
40
        HTTP_disconnect         , 'disconnect'          , \
51
        HTTP_free               , 'free'                , \
41
        HTTP_free               , 'free'                , \
52
        HTTP_escape             , 'escape'              , \
42
        HTTP_escape             , 'escape'              , \
53
        HTTP_unescape           , 'unescape'
43
        HTTP_unescape           , 'unescape'
54
	
44
	
55
public HTTP_get as '_http_get_asm'
45
public HTTP_get as '_http_get_asm'
56
public HTTP_head as '_http_head_asm'
46
public HTTP_head as '_http_head_asm'
57
public HTTP_post as '_http_post_asm'
47
public HTTP_post as '_http_post_asm'
58
public HTTP_find_header_field as '_http_find_header_field_asm'
48
public HTTP_find_header_field as '_http_find_header_field_asm'
59
public HTTP_send as '_http_send_asm'
49
public HTTP_send as '_http_send_asm'
60
public HTTP_receive as '_http_receive_asm'
50
public HTTP_receive as '_http_receive_asm'
61
public HTTP_disconnect as '_http_disconnect_asm'
51
public HTTP_disconnect as '_http_disconnect_asm'
62
public HTTP_free as '_http_free_asm'
52
public HTTP_free as '_http_free_asm'
63
public HTTP_escape as '_http_escape_asm'
53
public HTTP_escape as '_http_escape_asm'
64
public HTTP_unescape as '_http_unescape_asm'
54
public HTTP_unescape as '_http_unescape_asm'