00001 /* 00002 * Copyright (c) Members of the EGEE Collaboration. 2005. 00003 * See http://eu-egee.org/partners/ for details on the copyright holders. 00004 * For license conditions see the license file or http://eu-egee.org/license.html 00005 * 00006 * GLite Data Management - Simple data delegation API 00007 * 00008 * Authors: 00009 * Zoltan Farkas <Zoltan.Farkas@cern.ch> 00010 * Akos Frohner <Akos.Frohner@cern.ch> 00011 * 00012 */ 00013 00014 #ifndef GLITE_DATA_DELEGATION_H 00015 #define GLITE_DATA_DELEGATION_H 00016 00017 #ifdef __cplusplus 00018 extern "C" { 00019 #endif 00020 00021 #include <time.h> 00022 00023 /********************************************************************** 00024 * Types 00025 */ 00026 /* 00027 * Opaque data structure used by the library. 00028 */ 00029 typedef struct _glite_delegation_ctx glite_delegation_ctx; 00030 00031 /********************************************************************** 00032 * Constants 00033 */ 00034 00035 /* Service type for Service Discovery */ 00036 #define GLITE_DELEGATION_SD_TYPE "org.glite.Delegation" 00037 00038 /* Environment variable to override service type */ 00039 #define GLITE_DELEGATION_SD_ENV "GLITE_SD_DELEGATION_TYPE" 00040 00041 00042 /********************************************************************** 00043 * Function prototypes - library management functions 00044 */ 00045 00064 glite_delegation_ctx *glite_delegation_new(const char *endpoint); 00065 00071 void glite_delegation_free(glite_delegation_ctx *ctx); 00072 00079 const char *glite_delegation_get_endpoint(glite_delegation_ctx *ctx); 00080 00090 char *glite_delegation_get_error(glite_delegation_ctx *ctx); 00091 00106 int glite_delegation_delegate(glite_delegation_ctx *ctx, 00107 const char *delegationID, int expiration, int force); 00108 00119 int glite_delegation_info(glite_delegation_ctx *ctx, 00120 const char *delegationID, time_t *expiration); 00121 00131 int glite_delegation_destroy(glite_delegation_ctx *ctx, 00132 const char *delegationID); 00133 00143 char *glite_delegation_getInterfaceVersion(glite_delegation_ctx *ctx); 00144 00154 char *glite_delegation_getVersion(glite_delegation_ctx *ctx); 00155 00167 char *glite_delegation_getServiceMetadata(glite_delegation_ctx *ctx, const char *key); 00168 00173 #ifdef __cplusplus 00174 } 00175 #endif 00176 00177 #endif /* GLITE_DATA_SECURITY_DELEGATION_H */