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

fts-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 file fts API
00007  *
00008  *  Authors: Gabor Gombas <Gabor.Gombas@cern.ch>
00009  *           Zoltan Farkas <Zoltan.Farkas@cern.ch>
00010  *
00011  */
00012 
00013 #ifndef GLITE_DATA_TRANSFER_FTS_SIMPLE_H
00014 #define GLITE_DATA_TRANSFER_FTS_SIMPLE_H
00015 
00016 #ifdef __cplusplus
00017 extern "C" {
00018 #endif
00019 
00020 #include <glite/data/transfer/c/transfer-simple.h>
00021 
00022 /**********************************************************************
00023  * Constants
00024  */
00025 
00026 /* SURL generation pattern types */
00027 typedef enum
00028 {
00029     GLITE_FTS_SURL_LFN,
00030     GLITE_FTS_SURL_DAY,
00031     GLITE_FTS_SURL_HOUR,
00032     GLITE_FTS_SURL_FLAT
00033 } glite_fts_surl_pattern;
00034 
00035 /* Default SURL generation pattern */
00036 #define GLITE_FTS_SURL_DEFAULT      GLITE_FTS_SURL_LFN
00037 
00038 /* Job parameter key for gridftp */
00039 #define GLITE_FTS_PARAM_GRIDFTP     "gridftp"
00040 
00041 /* Job parameter key for MyProxy */
00042 #define GLITE_FTS_PARAM_MYPROXY     "myproxy"
00043 
00044 /* Service Discovery parameter keys */
00045 #define GLITE_FTS_SD_PATTERN        "surl_pattern"
00046 #define GLITE_FTS_SD_SURL_PREFIX    "surl_prefix"
00047 #define GLITE_FTS_SD_SRM_ENDPOINT   "srm_endpoint"
00048 
00049 /* Service type for Service Discovery */
00050 #define GLITE_FTS_SD_TYPE       "org.glite.FileTransfer"
00051 
00052 /* Service type of Channel Agent for Service Discovery */
00053 #define GLITE_CA_SD_TYPE        "org.glite.ChannelAgent"
00054 
00055 /* Environment variable to override default service type */
00056 #define GLITE_FTS_SD_ENV        "GLITE_SD_FTS_TYPE"
00057 
00058 
00059 /**********************************************************************
00060  * General guidelines:
00061  * - Functions that return a pointer return NULL when there is an error.
00062  * - Functions that return 'int' return 0 when successful and -1 in case
00063  *   of an error.
00064  * - Any objects returned by a function is owned by the caller and has to
00065  *   be deallocated by the caller.
00066  */
00067 
00068 /**********************************************************************
00069  * Function prototypes - library management functions
00070  */
00071 
00072 /* Return the current FileTransfer endpoint used by the transfer context */
00073 const char *glite_fts_get_endpoint(glite_transfer_ctx *ctx);
00074 
00075 #if 0 /* These need more research */
00076 char *glite_fts_generate_surl(glite_transfer_ctx *ctx, const char *src);
00077 
00078 int glite_fts_set_srm_endpoint(glite_transfer_ctx *ctx, const char *uri);
00079 
00080 int glite_fts_set_surl_prefix(glite_transfer_ctx *ctx, const char *prefix);
00081 
00082 int glite_fts_set_surl_pattern(glite_transfer_ctx *ctx,
00083     glite_fts_surl_pattern pattern);
00084 #endif 
00085 
00086 /**********************************************************************
00087  * Function prototypes - org.glite.data.transfer.ServiceBase
00088  */
00089 
00102 char *glite_fts_getVersion(glite_transfer_ctx *ctx);
00103 
00111 char *glite_fts_getSchemaVersion(glite_transfer_ctx *ctx);
00112 
00120 char *glite_fts_getInterfaceVersion(glite_transfer_ctx *ctx);
00121 
00130 char *glite_fts_getServiceMetadata(glite_transfer_ctx *ctx, const char *key);
00131 
00136 /**********************************************************************
00137  * Function prototypes - org.glite.data.transfer.fts.FileTransfer
00138  */
00139 
00156 char *glite_fts_submit(glite_transfer_ctx *ctx,
00157     const glite_transfer_TransferJob *job);
00158 
00167 char *glite_fts_transferSubmit(glite_transfer_ctx *ctx,
00168     const glite_transfer_TransferJob *job);
00169 
00178 char *glite_fts_placementSubmit(glite_transfer_ctx *ctx,
00179     const glite_transfer_PlacementJob *job);
00180 
00192 glite_transfer_JobStatus **glite_fts_listRequests(glite_transfer_ctx *ctx,
00193     int numStates, const char * const states[], const char *channelName,
00194     int *resultCount);
00195 
00207 glite_transfer_FileTransferStatus **glite_fts_getFileStatus(glite_transfer_ctx *ctx,
00208     const char *requestId, int offset, int limit, int *resultCount);
00209 
00218 glite_transfer_JobStatus *glite_fts_getTransferJobStatus(glite_transfer_ctx *ctx,
00219     const char *requestId);
00220 
00229 glite_transfer_TransferJobSummary *glite_fts_getTransferJobSummary(glite_transfer_ctx *ctx,
00230     const char *requestId);
00231 
00246 int glite_fts_cancel(glite_transfer_ctx *ctx, int nitems, const char **requestIds);
00247 
00257 int glite_fts_addVOManager(glite_transfer_ctx *ctx, const char *VOname,
00258         const char *principal);
00259 
00269 int glite_fts_removeVOManager(glite_transfer_ctx *ctx, const char *VOname,
00270         const char *principal);
00271 
00281 char **glite_fts_listVOManagers(glite_transfer_ctx *ctx, const char *VOname,
00282         int *resultcount);
00283 
00291 glite_transfer_Roles *glite_fts_getRoles(glite_transfer_ctx *ctx);
00292 
00302 int glite_fts_setJobPriority(glite_transfer_ctx *ctx,
00303         const char *requestID, const int priority);
00304 
00309 #ifdef __cplusplus
00310 }
00311 #endif
00312 
00313 #endif /* GLITE_DATA_TRANSFER_FTS_SIMPLE_H */
The GLite Project. All rights reserved.