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 /* Job parameter key for DelegationID */
00045 #define GLITE_FTS_PARAM_DELEGATIONID    "delegationid"
00046 
00047 /* Job parameter for storageClass */
00048 #define GLITE_FTS_PARAM_STORAGECLASS   "storageclass"
00049 
00050 /* Service Discovery parameter keys */
00051 #define GLITE_FTS_SD_PATTERN        "surl_pattern"
00052 #define GLITE_FTS_SD_SURL_PREFIX    "surl_prefix"
00053 #define GLITE_FTS_SD_SRM_ENDPOINT   "srm_endpoint"
00054 
00055 /* Service type for Service Discovery */
00056 #define GLITE_FTS_SD_TYPE       "org.glite.FileTransfer"
00057 
00058 /* Service type of Channel Agent for Service Discovery */
00059 #define GLITE_CA_SD_TYPE        "org.glite.ChannelAgent"
00060 
00061 /* Environment variable to override default service type */
00062 #define GLITE_FTS_SD_ENV        "GLITE_SD_FTS_TYPE"
00063 
00064 
00065 /**********************************************************************
00066  * General guidelines:
00067  * - Functions that return a pointer return NULL when there is an error.
00068  * - Functions that return 'int' return 0 when successful and -1 in case
00069  *   of an error.
00070  * - Any objects returned by a function is owned by the caller and has to
00071  *   be deallocated by the caller.
00072  */
00073 
00074 /**********************************************************************
00075  * Function prototypes - library management functions
00076  */
00077 
00078 /* Return the current FileTransfer endpoint used by the transfer context */
00079 const char *glite_fts_get_endpoint(glite_transfer_ctx *ctx);
00080 
00081 #if 0 /* These need more research */
00082 char *glite_fts_generate_surl(glite_transfer_ctx *ctx, const char *src);
00083 
00084 int glite_fts_set_srm_endpoint(glite_transfer_ctx *ctx, const char *uri);
00085 
00086 int glite_fts_set_surl_prefix(glite_transfer_ctx *ctx, const char *prefix);
00087 
00088 int glite_fts_set_surl_pattern(glite_transfer_ctx *ctx,
00089     glite_fts_surl_pattern pattern);
00090 #endif 
00091 
00092 /**********************************************************************
00093  * Function prototypes - org.glite.data.transfer.ServiceBase
00094  */
00095 
00108 char *glite_fts_getVersion(glite_transfer_ctx *ctx);
00109 
00117 char *glite_fts_getSchemaVersion(glite_transfer_ctx *ctx);
00118 
00126 char *glite_fts_getInterfaceVersion(glite_transfer_ctx *ctx);
00127 
00136 char *glite_fts_getServiceMetadata(glite_transfer_ctx *ctx, const char *key);
00137 
00142 /**********************************************************************
00143  * Function prototypes - org.glite.data.transfer.fts.FileTransfer
00144  */
00145 
00162 char *glite_fts_submit(glite_transfer_ctx *ctx,
00163     const glite_transfer_TransferJob *job);
00164 
00173 char *glite_fts_transferSubmit(glite_transfer_ctx *ctx,
00174     const glite_transfer_TransferJob *job, int withDelegation);
00175 
00184 char *glite_fts_placementSubmit(glite_transfer_ctx *ctx,
00185     const glite_transfer_PlacementJob *job, int withDelegation);
00186 
00198 glite_transfer_JobStatus **glite_fts_listRequests(glite_transfer_ctx *ctx,
00199     int numStates, const char * const states[], const char *channelName,
00200     int *resultCount);
00201 
00215 glite_transfer_JobStatus **glite_fts_listRequests2(glite_transfer_ctx *ctx,
00216     int numStates, const char * const states[], const char *channelName,
00217    const char* restrict_dn, const char* restrict_vo,
00218     int *resultCount);
00219 
00231 glite_transfer_FileTransferStatus **glite_fts_getFileStatus(glite_transfer_ctx *ctx,
00232     const char *requestId, int offset, int limit, int *resultCount);
00233 
00242 glite_transfer_JobStatus *glite_fts_getTransferJobStatus(glite_transfer_ctx *ctx,
00243     const char *requestId);
00244 
00253 glite_transfer_TransferJobSummary *glite_fts_getTransferJobSummary(glite_transfer_ctx *ctx,
00254     const char *requestId);
00255 glite_transfer_TransferJobSummary2 *glite_fts_getTransferJobSummary2(glite_transfer_ctx *ctx,
00256     const char *requestId);
00257 
00258 
00273 int glite_fts_cancel(glite_transfer_ctx *ctx, int nitems, const char **requestIds);
00274 
00284 int glite_fts_addVOManager(glite_transfer_ctx *ctx, const char *VOname,
00285         const char *principal);
00286 
00296 int glite_fts_removeVOManager(glite_transfer_ctx *ctx, const char *VOname,
00297         const char *principal);
00298 
00308 char **glite_fts_listVOManagers(glite_transfer_ctx *ctx, const char *VOname,
00309         int *resultcount);
00310 
00318 glite_transfer_Roles *glite_fts_getRoles(glite_transfer_ctx *ctx);
00319 
00327 glite_transfer_Roles *glite_fts_getRolesOf(glite_transfer_ctx *ctx, const char *otherDN);
00328 
00338 int glite_fts_setJobPriority(glite_transfer_ctx *ctx,
00339         const char *requestID, const int priority);
00340 
00345 #ifdef __cplusplus
00346 }
00347 #endif
00348 
00349 #endif /* GLITE_DATA_TRANSFER_FTS_SIMPLE_H */
The GLite Project. All rights reserved.