EGEE

delegation-simple.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) Members of the EGEE Collaboration. 2004.
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  *  GLite Data Management - Simple data delegation API
00018  *
00019  *  Authors: 
00020  *      Zoltan Farkas <Zoltan.Farkas@cern.ch>
00021  *      Akos Frohner <Akos.Frohner@cern.ch>
00022  *
00023  */
00024 
00025 #ifndef GLITE_DATA_DELEGATION_H
00026 #define GLITE_DATA_DELEGATION_H
00027 
00028 #ifdef __cplusplus
00029 extern "C" {
00030 #endif
00031 
00032 #include <time.h>
00033 
00034 /**********************************************************************
00035  * Types
00036  */
00037 /*
00038  * Opaque data structure used by the library.
00039  */
00040 typedef struct _glite_delegation_ctx        glite_delegation_ctx;
00041 
00042 /**********************************************************************
00043  * Constants
00044  */
00045 
00046 /* Service type for Service Discovery */
00047 #define GLITE_DELEGATION_SD_TYPE       "org.glite.Delegation"
00048 
00049 /* Environment variable to override service type */
00050 #define GLITE_DELEGATION_SD_ENV        "GLITE_SD_DELEGATION_TYPE"
00051 
00052 
00053 /**********************************************************************
00054  * Function prototypes - library management functions
00055  */
00056 
00075 glite_delegation_ctx *glite_delegation_new(const char *endpoint);
00076 
00082 void glite_delegation_free(glite_delegation_ctx *ctx);
00083 
00090 const char *glite_delegation_get_endpoint(glite_delegation_ctx *ctx);
00091 
00101 char *glite_delegation_get_error(glite_delegation_ctx *ctx);
00102 
00117 int glite_delegation_delegate(glite_delegation_ctx *ctx, 
00118     const char *delegationID, int expiration, int force);
00119 
00130 int glite_delegation_info(glite_delegation_ctx *ctx,
00131     const char *delegationID, time_t *expiration);
00132 
00142 int glite_delegation_destroy(glite_delegation_ctx *ctx,
00143     const char *delegationID);
00144 
00154 char *glite_delegation_getInterfaceVersion(glite_delegation_ctx *ctx);
00155 
00165 char *glite_delegation_getVersion(glite_delegation_ctx *ctx);
00166 
00178 char *glite_delegation_getServiceMetadata(glite_delegation_ctx *ctx, const char *key);
00179 
00184 #ifdef __cplusplus
00185 }
00186 #endif
00187 
00188 #endif /* GLITE_DATA_SECURITY_DELEGATION_H */
The gLite Project. All rights reserved.