EGEE
Main Page | Modules | Data Structures | File List | Data Fields | Globals

channel-simple.h

Go to the documentation of this file.
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 channel management API
00007  *
00008  *  Authors: Gabor Gombas <Gabor.Gombas@cern.ch>
00009  *
00010  */
00011 
00012 #ifndef GLITE_DATA_TRANSFER_CHANNEL_SIMPLE_H
00013 #define GLITE_DATA_TRANSFER_CHANNEL_SIMPLE_H
00014 
00015 #ifdef __cplusplus
00016 extern "C" {
00017 #endif
00018 
00019 #include <glite/data/transfer/c/transfer-simple.h>
00020 
00021 /**********************************************************************
00022  * Constants
00023  */
00024 
00025 /* Service type for Service Discovery */
00026 #define GLITE_CHANNEL_SD_TYPE       "org.glite.ChannelManagement"
00027 
00028 /* Environment variable to override service type */
00029 #define GLITE_CHANNEL_SD_ENV        "GLITE_SD_CHANNEL_TYPE"
00030 
00031 /**********************************************************************
00032  * Function prototypes - library management functions
00033  */
00034 
00047 const char *glite_channel_get_endpoint(glite_transfer_ctx *ctx);
00048 
00057 glite_channel_state glite_channel_state_parse(glite_transfer_ctx *ctx,
00058     const char *state);
00059 
00067 const char *glite_channel_state_str(glite_channel_state state);
00068 
00073 /**********************************************************************
00074  * Function prototypes - org.glite.data.transfer.ServiceBase
00075  */
00076 
00090 char *glite_channel_getVersion(glite_transfer_ctx *ctx);
00091 
00100 char *glite_channel_getSchemaVersion(glite_transfer_ctx *ctx);
00101 
00110 char *glite_channel_getInterfaceVersion(glite_transfer_ctx *ctx);
00111 
00121 char *glite_channel_getServiceMetadata(glite_transfer_ctx *ctx, const char *key);
00122 
00127 /**********************************************************************
00128  * Function prototypes - org.glite.data.transfer.channel.ChannelManagement
00129  */
00130 
00143 int glite_channel_add(glite_transfer_ctx *ctx,
00144     const glite_transfer_Channel *channel);
00145 
00154 int glite_channel_drop(glite_transfer_ctx *ctx, const char *name);
00155 
00164 glite_transfer_Channel *glite_channel_getChannel(glite_transfer_ctx *ctx,
00165     const char *name);
00166 
00175 char **glite_channel_listChannels(glite_transfer_ctx *ctx, int *resultCnt);
00176 
00189 int glite_channel_changeStateForHeldJob(glite_transfer_ctx *ctx,
00190     const char *jobId, glite_transfer_state state);
00191 
00205 int glite_channel_changeStateForHeldJobsOnChannel(glite_transfer_ctx *ctx,
00206     const char *name, glite_transfer_state state);
00207 
00217 int glite_channel_setBandwidth(glite_transfer_ctx *ctx, const char *name,
00218     int utilisation);
00219 
00229 int glite_channel_setContact(glite_transfer_ctx *ctx, const char *name,
00230     const char *contact);
00231 
00241 int glite_channel_setNominalThroughput(glite_transfer_ctx *ctx,
00242     const char *name, int nominalThroughput);
00243 
00253 int glite_channel_setNumberOfFiles(glite_transfer_ctx *ctx, const char *name,
00254     int numberOfFiles);
00255 
00264 int glite_channel_setNumberOfStreams(glite_transfer_ctx *ctx, const char *name,
00265     int numberOfStreams);
00266 
00276 int glite_channel_setState(glite_transfer_ctx *ctx, const char *name,
00277     glite_channel_state state);
00278 
00288 int glite_channel_addManager(glite_transfer_ctx *ctx, const char *name,
00289     const char *principal);
00290 
00300 int glite_channel_removeManager(glite_transfer_ctx *ctx, const char *name,
00301     const char *principal);
00302 
00312 char **glite_channel_listManagers(glite_transfer_ctx *ctx, const char *name,
00313         int *resultCnt);
00314 
00325 int glite_channel_setVOShare(glite_transfer_ctx *ctx, const char *name,
00326         const char *VOname, int share);
00327 
00332 #ifdef __cplusplus
00333 }
00334 #endif
00335 
00336 #endif /* GLITE_DATA_TRANSFER_CHANNEL_SIMPLE_H */
The GLite Project. All rights reserved.