[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [pdf-devel] http filesystem create/destroy functions needed
From: |
Scott Fohey |
Subject: |
Re: [pdf-devel] http filesystem create/destroy functions needed |
Date: |
Tue, 16 Feb 2010 21:48:15 -0500 |
> I pushed a patch providing support for both init_fn and cleanup_fn.
> Note that the filesystem state created at init_fn time is only
> available at cleanup_fn time. If you need to access the state in some
> of the other filesystem implementation functions we will need to add a
> new parameter to the appropriate callback and to change the pdf_fsys_*
> function to include fsys->data when calling that callback.
>
---------------- snip ----------------------------------------
> --
> Jose E. Marchesi <address@hidden>
> http://www.jemarch.net
> GNU Project http://www.gnu.org
>
In the init_fn I will need save a reference to libcurl for use in a variety of
functions during normal runtime. My instinct is to have a pdf-fsys-http.c
scoped static structure to store this, and a couple other items in. This will
make it accessible to all my functions without any overhead.
Will multiple instances of the http filesystem be necessary? I have not
noticed anything of this sort in the requirements...
Anyhow, I don't see the reason for passing a ptr to this struct along with
each function... If I'm missing it, I would much appreciate your clarification.
btw, just in case there's some ambiguity, this is what I have in mind:
static struct http_vars_s
{
CURLM libcurl_handle;
init_fn()
{
}
Re: [pdf-devel] http filesystem create/destroy functions needed, Aleksander Morgado, 2010/02/10