[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: |
jemarch |
Subject: |
Re: [pdf-devel] http filesystem create/destroy functions needed |
Date: |
Wed, 10 Feb 2010 10:34:15 +0100 |
User-agent: |
Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/23.1.91 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) |
Hi Scott.
Managing libcurl for the http filesystem and RIA will require
pthreads, and the initialization and cleanup of some http-
filesystem-wide resources (worker thread, libcurl resources).
There are currently no filesystem init or cleanup routines
defined (that I could find anyhow).
Is there any reason not to add a filesystem init/cleanup pair
of functions to the filesystem interface?
We could add two more callbacks to the pdf_fsys_impl_s structure to
initialize and cleanup some private data of the filesystem
implementation:
struct pdf_fsys_s
{
void *data; /* Private data used by the filesystem
implementation. */
...
};
typedef pdf_status_t (*pdf_fsys_init_fn_t) (void **data);
typedef pdf_status_t (*pdf_fsys_cleanup_fn_t) (void *data);
/* Filesystem implementation */
struct pdf_fsys_impl_s
{
/* Filesystem interface callbacks. */
pdf_fsys_init_fn_t init_fn;
pdf_fsys_cleanup_fn_t cleanup_fn;
...
/* File interface callbacks. */
...
};
And then call those callbacks in the existing pdf_fsys_create and
pdf_fsys_destroy. Stateless filesystems (such as the disk filesystem)
would not define those callbacks.
Would this fit your needs?
--
Jose E. Marchesi address@hidden
GNU Project http://www.gnu.org
Re: [pdf-devel] http filesystem create/destroy functions needed, Aleksander Morgado, 2010/02/10