00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00022 #ifndef GLOBUS_RANGE_LIST_H
00023 #define GLOBUS_RANGE_LIST_H
00024
00025 #include "globus_common_include.h"
00026
00027
00028
00029
00030
00031
00032
00033 #ifdef __cplusplus
00034 extern "C" {
00035 #endif
00036
00037 #define GLOBUS_RANGE_LIST_MAX -1
00038
00039 typedef enum
00040 {
00041 GLOBUS_RANGE_LIST_ERROR_PARAMETER = -1,
00042 GLOBUS_RANGE_LIST_ERROR_MEMORY = -2
00043 } globus_range_list_error_type_t;
00044
00045 typedef struct globus_l_range_list_s * globus_range_list_t;
00046
00047
00048
00049
00050
00051
00052 int
00053 globus_range_list_merge_destructive(
00054 globus_range_list_t * dest,
00055 globus_range_list_t src1,
00056 globus_range_list_t src2);
00057
00058 int
00059 globus_range_list_merge(
00060 globus_range_list_t * dest,
00061 globus_range_list_t src1,
00062 globus_range_list_t src2);
00063
00064 int
00065 globus_range_list_copy(
00066 globus_range_list_t * dest,
00067 globus_range_list_t src);
00068
00069 int
00070 globus_range_list_init(
00071 globus_range_list_t * range_list);
00072
00073 void
00074 globus_range_list_destroy(
00075 globus_range_list_t range_list);
00076
00077 int
00078 globus_range_list_insert(
00079 globus_range_list_t range_list,
00080 globus_off_t offset,
00081 globus_off_t length);
00082
00083 int
00084 globus_range_list_remove(
00085 globus_range_list_t range_list,
00086 globus_off_t offset,
00087 globus_off_t length);
00088
00089 int
00090 globus_range_list_size(
00091 globus_range_list_t range_list);
00092
00093 int
00094 globus_range_list_at(
00095 globus_range_list_t range_list,
00096 int ndx,
00097 globus_off_t * offset,
00098 globus_off_t * length);
00099
00100 int
00101 globus_range_list_remove_at(
00102 globus_range_list_t range_list,
00103 int ndx,
00104 globus_off_t * offset,
00105 globus_off_t * length);
00106
00107 #ifdef __cplusplus
00108 }
00109 #endif
00110
00111 #endif