argus/pep.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) Members of the EGEE Collaboration. 2006-2010.
00003  * See http://www.eu-egee.org/partners/ for details on the copyright holders.
00004  *
00005  * Licensed under the Apache License, Version 2.0 (the "License");
00006  * you may not use this file except in compliance with the License.
00007  * You may obtain a copy of the License at
00008  *
00009  *     http://www.apache.org/licenses/LICENSE-2.0
00010  *
00011  * Unless required by applicable law or agreed to in writing, software
00012  * distributed under the License is distributed on an "AS IS" BASIS,
00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  * See the License for the specific language governing permissions and
00015  * limitations under the License.
00016  */
00017 
00018 /*
00019  * Argus PEP client API
00020  *
00021  * $Id: pep.h 2897 2012-04-24 13:21:23Z vtschopp $
00022  * @author Valery Tschopp <valery.tschopp@switch.ch>
00023  * @version 2.1
00024  */
00025 #ifndef _PEP_H_
00026 #define _PEP_H_
00027 
00028 #ifdef  __cplusplus
00029 extern "C" {
00030 #endif
00031 
00071 #include <stdarg.h> /* va_list */
00072 #include "xacml.h"
00073 #include "profiles.h"
00074 #include "pip.h"
00075 #include "oh.h"
00076 #include "error.h"
00077 
00078 
00079 
00107 #define PEP_LOGLEVEL_NONE  -1 
00108 #define PEP_LOGLEVEL_ERROR  0 
00109 #define PEP_LOGLEVEL_WARN   1 
00110 #define PEP_LOGLEVEL_INFO   2 
00111 #define PEP_LOGLEVEL_DEBUG  3 
00152 typedef int pep_log_handler_callback(int level, const char * format, va_list args);
00153 
00166 typedef struct pep_handle PEP;
00167 
00173 typedef enum pep_option {
00174     PEP_OPTION_LOG_LEVEL,  
00175     PEP_OPTION_LOG_STDERR,  
00176     PEP_OPTION_LOG_HANDLER,  
00177     PEP_OPTION_ENDPOINT_URL, 
00178     PEP_OPTION_ENDPOINT_SSL_VALIDATION, 
00179     PEP_OPTION_ENDPOINT_SERVER_CERT, 
00180     PEP_OPTION_ENDPOINT_SERVER_CAPATH, 
00181     PEP_OPTION_ENDPOINT_CLIENT_CERT, 
00182     PEP_OPTION_ENDPOINT_CLIENT_KEY, 
00183     PEP_OPTION_ENDPOINT_CLIENT_KEYPASSWORD, 
00184     PEP_OPTION_ENDPOINT_TIMEOUT, 
00185     PEP_OPTION_ENABLE_PIPS, 
00186     PEP_OPTION_ENABLE_OBLIGATIONHANDLERS, 
00187     PEP_OPTION_ENDPOINT_SSL_CIPHER_LIST 
00188 } pep_option_t;
00189 
00194 const char * pep_version(void);
00195 
00209 pep_error_t pep_global_init(void);
00210 
00222 void pep_global_cleanup(void);
00223 
00231 PEP * pep_initialize(void);
00232 
00240 int pep_getid(PEP * pep);
00241 
00253 pep_error_t pep_addpip(PEP * pep, const pep_pip_t * pip);
00254 
00266 pep_error_t pep_addobligationhandler(PEP * pep, const pep_obligationhandler_t * oh);
00267 
00325 pep_error_t pep_setoption(PEP * pep, pep_option_t option, ... );
00326 
00343 pep_error_t pep_authorize(PEP * pep, xacml_request_t ** request, xacml_response_t ** response);
00344 
00352 void pep_destroy(PEP * pep);
00353 
00360 #ifdef  __cplusplus
00361 }
00362 #endif
00363 
00364 #endif

Generated on Wed May 16 13:13:23 2012 for Argus PEP client API by  doxygen 1.4.7