Subversion Repositories Kolibri OS

Rev

Rev 9811 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 9811 Rev 9812
Line 77... Line 77...
77
    add_header = pointer to ASCIIZ additional header parameters, or null for none.
77
    add_header = pointer to ASCIIZ additional header parameters, or null for none.
78
    Every additional parameter must end with CR LF bytes, including the last line.
78
    Every additional parameter must end with CR LF bytes, including the last line.
79
    Initiates a HTTP connection, using 'GET' method.
79
    Initiates a HTTP connection, using 'GET' method.
80
    Returns NULL on error, identifier otherwise.
80
    Returns NULL on error, identifier otherwise.
81
*/
81
*/
82
extern http_msg * __stdcall (*http_get)(const char *url, http_msg *identifier, unsigned flags, const char *add_header);
82
DLLAPI http_msg * __stdcall http_get(const char *url, http_msg *identifier, unsigned flags, const char *add_header);
Line 83... Line 83...
83
 
83
 
84
/*
84
/*
85
    url = pointer to ASCIIZ URL
85
    url = pointer to ASCIIZ URL
86
    identifier = identifier of previously opened connection (keep-alive), or 0 to open a new one.
86
    identifier = identifier of previously opened connection (keep-alive), or 0 to open a new one.
87
    flags = bit flags (see end of this document).
87
    flags = bit flags (see end of this document).
88
    add_header = pointer to ASCIIZ additional header parameters, or null for none.    
88
    add_header = pointer to ASCIIZ additional header parameters, or null for none.    
89
    Every additional parameter must end with CR LF bytes, including the last line.    
89
    Every additional parameter must end with CR LF bytes, including the last line.    
90
    Initiate a HTTP connection, using 'HEAD' method.
90
    Initiate a HTTP connection, using 'HEAD' method.
91
    Returns NULL on error, identifier otherwise.
91
    Returns NULL on error, identifier otherwise.
92
*/
92
*/
Line 93... Line 93...
93
extern http_msg * __stdcall (*http_head)(const char *url, http_msg *identifier, unsigned flags, const char *add_header);
93
DLLAPI http_msg * __stdcall http_head(const char *url, http_msg *identifier, unsigned flags, const char *add_header);
94
 
94
 
95
/*
95
/*
96
    url = pointer to ASCIIZ URL
96
    url = pointer to ASCIIZ URL
Line 103... Line 103...
103
    Initiate a HTTP connection, using 'POST' method.
103
    Initiate a HTTP connection, using 'POST' method.
104
    The content itself must be send to the socket (which you can find in the structure),
104
    The content itself must be send to the socket (which you can find in the structure),
105
    using system function 75, 6.
105
    using system function 75, 6.
106
    Returns 0 on error, identifier otherwise
106
    Returns 0 on error, identifier otherwise
107
*/
107
*/
108
extern http_msg * __stdcall (*http_post)(const char *url, http_msg *identifier, unsigned flags, const char *add_header,
108
DLLAPI http_msg * __stdcall http_post(const char *url, http_msg *identifier, unsigned flags, const char *add_header,
109
                                  const char *content_type, unsigned content_length);
109
                                  const char *content_type, unsigned content_length);
Line 110... Line 110...
110
 
110
 
111
/*
111
/*
112
    identifier = identifier which one of the previous functions returned
112
    identifier = identifier which one of the previous functions returned
Line 125... Line 125...
125
    In header_length you'll find the length of the header as soon as it has been received.
125
    In header_length you'll find the length of the header as soon as it has been received.
126
    In content_ptr you'll find a pointer to the actual content.
126
    In content_ptr you'll find a pointer to the actual content.
127
    In content_length you'll find the length of the content. 
127
    In content_length you'll find the length of the content. 
128
    In content_received, you'll find the number of content bytes already received.
128
    In content_received, you'll find the number of content bytes already received.
129
*/
129
*/
130
extern int __stdcall (*http_receive)(http_msg *identifier);
130
DLLAPI int __stdcall http_receive(http_msg *identifier);
Line 131... Line 131...
131
 
131
 
132
/*
132
/*
133
    identifier = identifier which one of the previous functions returned
133
    identifier = identifier which one of the previous functions returned
134
    dataptr = pointer to the data you want to send
134
    dataptr = pointer to the data you want to send
135
    datalength = length of the data to send (in bytes)
135
    datalength = length of the data to send (in bytes)
136
    This procedure can be used to send data to the server (POST)
136
    This procedure can be used to send data to the server (POST)
137
    Returns number of bytes sent, -1 on error
137
    Returns number of bytes sent, -1 on error
138
*/
138
*/
Line 139... Line 139...
139
extern int __stdcall (*http_send)(http_msg *identifier, void *dataptr, unsigned datalength);
139
DLLAPI int __stdcall http_send(http_msg *identifier, void *dataptr, unsigned datalength);
140
 
140
 
141
/*
141
/*
Line 142... Line 142...
142
    Sometimes the http_receive function receives incomplete data. If you have the same problem then a macro can help you:
142
    Sometimes the http_receive function receives incomplete data. If you have the same problem then a macro can help you:
143
*/
143
*/
144
 
144
 
145
extern int __stdcall (*http_free)(http_msg *identifier);
145
DLLAPI int __stdcall http_free(http_msg *identifier);
Line 146... Line 146...
146
/*
146
/*