Subversion Repositories Kolibri OS

Rev

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