Subversion Repositories Kolibri OS

Rev

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

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