Skip to content

Commit 36ea4c5

Browse files
committed
Update doc [ci skip]
1 parent bb5fa08 commit 36ea4c5

File tree

1 file changed

+81
-0
lines changed

1 file changed

+81
-0
lines changed

doc/lcurl.ldoc

+81
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,87 @@ function setopt_progressfunction() end
367367
--
368368
function setopt_progressfunction() end
369369

370+
--- Set seek callback function.
371+
--
372+
-- A callback accepting two or three parameters.
373+
-- The first is the seek context if any, the second is the `origin` value
374+
-- same as in file.seek function from io library. Can be (`cur`, `set` and `end`).
375+
-- The third parameter is offset or position in input stream.
376+
-- If stream can not be seeking and need stop current transfer operation
377+
-- function have to raise Lua error or returns `nil` and error message.
378+
-- To indicate success function have to return any truthy value
379+
-- In other case Function must return `true` or `1` or nothing to continue operation.
380+
-- False value indicate that while the seek failed, libcurl is free to work
381+
-- around the problem if possible.
382+
--
383+
-- !!! NOTE !!! This is differents form libcurl API by swapping parameters in callback.
384+
-- It done to be compatiable with Lua io library.
385+
--
386+
-- @tparam function seek
387+
-- @param[opt] context seek context
388+
-- @return[1] self
389+
--
390+
function setopt_seekfunction() end
391+
392+
--- Set seek callback function.
393+
--
394+
-- This call same as easy:setopt_seekfunction(stream.seek, seek)
395+
--
396+
-- @tparam object stream
397+
-- @return[1] self
398+
--
399+
function setopt_seekfunction() end
400+
401+
--- Set debug callback function.
402+
--
403+
-- A callback accepting two or three parameters.
404+
-- The first is the debug context if any, the second is the `data_type` value
405+
-- which represent what kinde of data is passed. This value can be one of
406+
-- constant `INFO_TEXT`, `INFO_HEADER_IN`, `INFO_HEADER_OUT`, `INFO_DATA_IN`,
407+
-- `INFO_DATA_OUT`, `INFO_SSL_DATA_IN`, `INFO_SSL_DATA_OUT`.
408+
-- The third parameter is data itself.
409+
-- Any errors and returning values from this callback are ignored.
410+
--
411+
-- @tparam function debug
412+
-- @param[opt] context debug context
413+
-- @return[1] self
414+
--
415+
function setopt_debugfunction() end
416+
417+
--- Set debug callback function.
418+
--
419+
-- This call same as easy:setopt_debugfunction(debug.debug, debug)
420+
--
421+
-- @tparam object debug
422+
-- @return[1] self
423+
--
424+
function setopt_debugfunction() end
425+
426+
--- Set match callback function.
427+
--
428+
-- A callback accepting two or three parameters.
429+
-- The first is the match context if any, the second is the pattern string,
430+
-- the third is the string to match to pattern.
431+
-- Function must return truthy value to indicate that string match to pattern.
432+
-- If function raise error or return nil and error message then it indicate
433+
-- that curl should interrupt current transfer operation.
434+
-- False value indicate that strind does not match to pattern
435+
--
436+
-- @tparam function match
437+
-- @param[opt] context match context
438+
-- @return[1] self
439+
--
440+
function setopt_fnmatch_function() end
441+
442+
--- Set match callback function.
443+
--
444+
-- This call same as easy:setopt_fnmatch_function(match.match, match)
445+
--
446+
-- @tparam object match
447+
-- @return[1] self
448+
--
449+
function setopt_fnmatch_function() end
450+
370451
--- Set HTTP multipart/formdata.
371452
--
372453
-- Caller does not have to save data.

0 commit comments

Comments
 (0)