Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages  

lcmaps_plugin_example.c File Reference

Interface to the LCMAPS plugins. More...

#include "lcmaps_config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "lcmaps_modules.h"
#include "lcmaps_arguments.h"

Include dependency graph for lcmaps_plugin_example.c:

Include dependency graph

Go to the source code of this file.

Functions

int plugin_introspect (int *argc, lcmaps_argument_t **argv)
 Plugin asks for required arguments. More...

int plugin_initialize (int argc, char **argv)
 initialize the plugin. More...

int plugin_run (int argc, lcmaps_argument_t *argv)
 Gather credentials for user making use of the ordered arguments. More...

int plugin_terminate ()
 Whatever is needed to terminate the plugin module goes in here. More...


Detailed Description

Interface to the LCMAPS plugins.

Author:
Martijn Steenbakkers for the EU DataGrid.

This file contains the code for an example LCMAPS plugin and shows the interface the plugin has to provide to the LCMAPS. The interface consists of the following functions:
  1. plugin_initialize()
  2. plugin_run()
  3. plugin_terminate()
  4. plugin_introspect()

Definition in file lcmaps_plugin_example.c.


Function Documentation

int plugin_initialize ( int argc,
char ** argv )
 

initialize the plugin.

Everything that is needed to initialize the plugin should be put inside this function. Arguments as read from the LCMAPS database (argc, argv) are passed to the plugin.

Parameters:
argc   number of passed arguments.
argv   argument list. argv[0] contains the name of the plugin.
Return values:
LCMAPS_MOD_SUCCESS   successful initialization
LCMAPS_MOD_FAIL   failure in the plugin initialization
LCMAPS_MOD_NOFILE   private plugin database could not be found (same effect as LCMAPS_MOD_FAIL)

Definition at line 139 of file lcmaps_plugin_example.c.

int plugin_introspect ( int * argc,
lcmaps_argument_t ** argv )
 

Plugin asks for required arguments.

Parameters:
int   * argc
lcmaps_argument_t   ** argv
Return values:
LCMAPS_MOD_SUCCESS   success
LCMAPS_MOD_FAIL   failure (will result in a lcmaps failure)

Definition at line 87 of file lcmaps_plugin_example.c.

int plugin_run ( int argc,
lcmaps_argument_t * argv )
 

Gather credentials for user making use of the ordered arguments.

Ask for credentials by passing the arguments (like JDL, globus DN, VOMS roles etc.) that were ordered earlier by the plugin_introspect() function

Parameters:
argc   number of arguments
argv   list of arguments
Return values:
LCMAPS_MOD_SUCCESS   authorization succeeded
LCMAPS_MOD_FAIL   authorization failed

Definition at line 182 of file lcmaps_plugin_example.c.

int plugin_terminate ( )
 

Whatever is needed to terminate the plugin module goes in here.

Return values:
LCMAPS_MOD_SUCCESS   success
LCMAPS_MOD_FAIL   failure (will result in an authorization failure)

Definition at line 250 of file lcmaps_plugin_example.c.


Generated at Tue Sep 23 15:48:30 2003 for edg-lcmaps by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001