/*****************************************************************************
POPular -- A POP3 server and proxy for large mail systems
$Id: libpdm_skel.c,v 1.1 2001/04/08 18:50:17 sqrt Exp $
http://www.remote.org/jochen/mail/popular/
******************************************************************************
Copyright (C) 1999-2001 Jochen Topf <jochen@remote.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
*****************************************************************************/
#include <popular.h>
/*****************************************************************************
*
* THIS IS A SKELETON FILE FOR A PDM MODULE. YOU CAN USE THIS AS AS
* STARTING POINT FOR YOUR OWN MODULE.
*
*****************************************************************************/
static struct pdm_mvar *mv;
struct pdm_ctx_skel {
/* any data that you need to remember after pdm_init() goes here */
};
/*****************************************************************************
pdm_init()
*****************************************************************************/
char *
pdm_init(int argc, char *argv[], struct pdm_mvar *mvar, void **pdmctx)
{
struct pdm_ctx_skel *ctx;
mv = mvar;
PDM_DEBUG0("pdm_init", "start");
ctx = malloc(sizeof(struct pdm_ctx_skel));
if (! ctx) {
PDM_DEBUG0("pdm_init", "out of memory");
return("out of memory");
}
/* ctx->foo = "bar"; */
*pdmctx = ctx;
return NULL;
}
/*****************************************************************************
pdm_close()
*****************************************************************************/
int
pdm_close(void *pdmctx)
{
PDM_DEBUG0("pdm_close", "start");
free(pdmctx);
return 0;
}
/*****************************************************************************
pdm_args()
This should return a string with the arguments that were used to
configure this module.
*****************************************************************************/
char *
pdm_args(void *pdmctx)
{
struct pdm_ctx_skel *ctx = pdmctx;
PDM_DEBUG0("pdm_args", "start");
return "";
}
/*****************************************************************************
pdm_reload()
This function can be used to reinitialize a module. Return 1, if this
worked, or 0 if it didn't.
*****************************************************************************/
int
pdm_reload(void *pdmctx)
{
PDM_DEBUG0("pdm_reload", "start");
return 1;
}
/*****************************************************************************
pdm_check()
*****************************************************************************/
pdm_result_t
pdm_check(void *pdmctx, const struct pdm_request *pdmr, struct pdm_data *pdmd)
{
PDM_DEBUG0("pdm_check", "start");
return pdmError;
}
/*****************************************************************************
pdm_auth()
*****************************************************************************/
pdm_result_t
pdm_auth(void *pdmctx, const struct pdm_request *pdmr, struct pdm_data *pdmd)
{
PDM_DEBUG0("pdm_auth", "start");
return pdmError;
}
/** THE END *****************************************************************/
syntax highlighted by Code2HTML, v. 0.9.1