00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef AXIS2_FILE_H
00018 #define AXIS2_FILE_H
00019
00020 #include <axis2_utils_defines.h>
00021 #include <axis2_error.h>
00022 #include <axis2_env.h>
00023 #include <axis2_utils.h>
00024 #include <platforms/axis2_platform_auto_sense.h>
00025
00026
00027 #ifdef __cplusplus
00028 extern "C"
00029 {
00030 #endif
00031
00032 typedef struct axis2_file axis2_file_t;
00033 typedef struct axis2_file_ops axis2_file_ops_t;
00034
00045 struct axis2_file_ops
00046 {
00047
00048 axis2_status_t (AXIS2_CALL *
00049 free) (axis2_file_t *file,
00050 const axis2_env_t *env);
00051
00052 axis2_status_t (AXIS2_CALL *
00053 set_name)(axis2_file_t *file,
00054 const axis2_env_t *env,
00055 axis2_char_t *name);
00056
00057 axis2_char_t *(AXIS2_CALL *
00058 get_name)(axis2_file_t *file,
00059 const axis2_env_t *env);
00060
00061 axis2_status_t (AXIS2_CALL *
00062 set_path)(axis2_file_t *file,
00063 const axis2_env_t *env,
00064 axis2_char_t *path);
00065
00066 axis2_char_t *(AXIS2_CALL *
00067 get_path)(axis2_file_t *file,
00068 const axis2_env_t *env);
00069
00070 axis2_status_t (AXIS2_CALL *
00071 set_timestamp)(axis2_file_t *file,
00072 const axis2_env_t *env,
00073 AXIS2_TIME_T timestamp);
00074
00075 AXIS2_TIME_T (AXIS2_CALL *
00076 get_timestamp)(axis2_file_t *file,
00077 const axis2_env_t *env);
00078
00082 axis2_file_t *(AXIS2_CALL *
00083 clone)(axis2_file_t *file,
00084 const axis2_env_t *env);
00085 };
00086
00087
00092 struct axis2_file
00093 {
00094 axis2_file_ops_t *ops;
00095 };
00096
00101 AXIS2_EXTERN axis2_file_t * AXIS2_CALL
00102 axis2_file_create(const axis2_env_t *env);
00103
00104
00105
00106 #define AXIS2_FILE_FREE(file, env) \
00107 ((file)->ops->free (file, env))
00108
00109 #define AXIS2_FILE_GET_NAME(file, env) \
00110 ((file)->ops->get_name (file, env))
00111
00112 #define AXIS2_FILE_SET_NAME(file, env, name) \
00113 ((file)->ops->set_name (file, env, name))
00114
00115 #define AXIS2_FILE_GET_PATH(file, env) \
00116 ((file)->ops->get_path (file, env))
00117
00118 #define AXIS2_FILE_SET_PATH(file, env, path) \
00119 ((file)->ops->set_path (file, env, path))
00120
00121 #define AXIS2_FILE_GET_TIMESTAMP(file, env) \
00122 ((file)->ops->get_timestamp (file, env))
00123
00124 #define AXIS2_FILE_SET_TIMESTAMP(file, env, timestamp) \
00125 ((file)->ops->set_timestamp (file, env, timestamp))
00126
00127 #define AXIS2_FILE_CLONE(file, env) \
00128 ((file)->ops->clone (file, env))
00129
00130
00131
00132
00133
00134
00135
00138 #ifdef __cplusplus
00139 }
00140 #endif
00141
00142 #endif