xos_credagent.h

Go to the documentation of this file.
00001 /* Copyright (c) 2008 Telefónica Investigación y Desarrollo SAU.
00002 
00003 This file is part of LinuxMD-XOS. LinuxMD-XOS is part of XtreemOS, a Linux-based Grid Operating System, see <http://www.xtreemos.eu> for more details. The XtreemOS project has been developed with the financial support of the European Commission's IST program under contract #FP6-033576.
00004 
00005 LinuxMD-XOS 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.
00006 
00007 LinuxMD-XOS 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.
00008 
00009 You should have received a copy of the GNU General Public License along with LinuxMD-XOS. If not, see <http://www.gnu.org/licenses/>.
00010 */
00011 
00012 #ifndef _INCLUDE_XOS_CREDAGENT_H
00013 #define _INCLUDE_XOS_CREDAGENT_H
00014 
00023 // API for applications
00024 //
00056  char *xos_credagent_getcred(char *configuration);
00057 
00058 // utilities: set environment with variables from section
00075 int xos_setconfigenv(char *config_name,char *section);
00076 
00077 // API for credagent modules
00078 //
00079 typedef void * CREDAGENT_HANDLE;
00080 
00098 CREDAGENT_HANDLE xos_credagentso_instance(char *config_name,char **name);
00099 
00110 void xos_credagentso_destroy(CREDAGENT_HANDLE handle);
00111 
00124 char *xos_credagentso_getparameter(CREDAGENT_HANDLE handle,char *key);
00125 
00126 
00127 // API for credagent/creduiagent modules
00128 //
00129 struct creduiagent_handle;
00130 typedef struct creduiagent_handle * CREDUIAGENT_HANDLE;
00148 CREDUIAGENT_HANDLE xos_creduiagent_instance(char *config_name,char **name);
00149 
00165 void xos_creduiagent_destroy(CREDUIAGENT_HANDLE handle); 
00166 
00201 int xos_creduiagent_ask_login_password(CREDUIAGENT_HANDLE handle,char *message,
00202                 char **login,char **password,int max_length,char retry) ;
00239 int xos_creduiagent_ask_login_pin(CREDUIAGENT_HANDLE handle,char *message,
00240                 char **login,char **pin,int length,char retry);
00241 
00267 int xos_creduiagent_ask_code(CREDUIAGENT_HANDLE handle,char *message, 
00268                 char **code, int max_length,char retry) ;
00269 
00288 int xos_creduiagent_ask_confirmation(CREDUIAGENT_HANDLE handle,char *message) ;
00289 
00290 // this function will be implemented in advanced version.
00291 int xos_creduiagent_ask_confirmation_pin(CREDUIAGENT_HANDLE handle,
00292                 char *message, char *pin, char *puk,int max_length_pin,
00293                 int max_length_puk, int allowed_retries) ;
00294 
00310 int xos_creduiagent_show_error(CREDUIAGENT_HANDLE handle,char *message) ;
00311 
00330 char *xos_creduiagent_getparameter(CREDUIAGENT_HANDLE handle,char *key);
00331 
00347 void * xos_creduiagent_get_func(CREDUIAGENT_HANDLE handle, char *name);
00348 
00349 
00350 #endif

Generated on Fri Dec 18 14:28:44 2009 for libxos-credagent by  doxygen 1.5.1