axis2_file.h

00001 /*
00002  * Licensed to the Apache Software Foundation (ASF) under one or more
00003  * contributor license agreements.  See the NOTICE file distributed with
00004  * this work for additional information regarding copyright ownership.
00005  * The ASF licenses this file to You under the Apache License, Version 2.0
00006  * (the "License"); you may not use this file except in compliance with
00007  * the License.  You may obtain a copy of the License at
00008  *
00009  *      http://www.apache.org/licenses/LICENSE-2.0
00010  *
00011  * Unless required by applicable law or agreed to in writing, software
00012  * distributed under the License is distributed on an "AS IS" BASIS,
00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  * See the License for the specific language governing permissions and
00015  * limitations under the License.
00016  */
00017 
00018 #ifndef AXIS2_FILE_H
00019 #define AXIS2_FILE_H
00020 
00021 #include <axis2_utils_defines.h>
00022 #include <axis2_error.h>
00023 #include <axis2_env.h>
00024 #include <axis2_utils.h>
00025 #include <platforms/axis2_platform_auto_sense.h>
00026 
00027 
00028 #ifdef __cplusplus
00029 extern "C"
00030 {
00031 #endif
00032     
00033 typedef struct axis2_file axis2_file_t;
00034 typedef struct axis2_file_ops axis2_file_ops_t;
00035     
00046  struct axis2_file_ops
00047 {
00048 
00049     axis2_status_t (AXIS2_CALL *
00050     free) (axis2_file_t *file, 
00051             const axis2_env_t *env);
00052 
00053     axis2_status_t (AXIS2_CALL *
00054     set_name)(axis2_file_t *file,
00055                 const axis2_env_t *env,
00056                 axis2_char_t *name);
00057     
00058     axis2_char_t *(AXIS2_CALL *
00059     get_name)(axis2_file_t *file,
00060                 const axis2_env_t *env);
00061     
00062     axis2_status_t (AXIS2_CALL *
00063     set_path)(axis2_file_t *file,
00064                 const axis2_env_t *env,
00065                 axis2_char_t *path);
00066     
00067     axis2_char_t *(AXIS2_CALL *
00068     get_path)(axis2_file_t *file,
00069                 const axis2_env_t *env);
00070     
00071     axis2_status_t (AXIS2_CALL *
00072     set_timestamp)(axis2_file_t *file,
00073                     const axis2_env_t *env,
00074                     AXIS2_TIME_T timestamp);
00075     
00076     AXIS2_TIME_T (AXIS2_CALL *
00077     get_timestamp)(axis2_file_t *file,
00078                     const axis2_env_t *env);    
00079 
00083     axis2_file_t *(AXIS2_CALL *
00084     clone)(axis2_file_t *file,
00085                       const axis2_env_t *env);
00086 };
00087     
00088      
00093  struct axis2_file
00094 {
00095    axis2_file_ops_t *ops;
00096 };
00097 
00102 AXIS2_EXTERN axis2_file_t * AXIS2_CALL
00103 axis2_file_create(const axis2_env_t *env);
00104 
00105 /*************************** Function macros **********************************/
00106 
00107 #define AXIS2_FILE_FREE(file, env) \
00108       ((file)->ops->free (file, env))
00109 
00110 #define AXIS2_FILE_GET_NAME(file, env) \
00111       ((file)->ops->get_name (file, env))  
00112 
00113 #define AXIS2_FILE_SET_NAME(file, env, name) \
00114       ((file)->ops->set_name (file, env, name)) 
00115 
00116 #define AXIS2_FILE_GET_PATH(file, env) \
00117       ((file)->ops->get_path (file, env))  
00118 
00119 #define AXIS2_FILE_SET_PATH(file, env, path) \
00120       ((file)->ops->set_path (file, env, path)) 
00121 
00122 #define AXIS2_FILE_GET_TIMESTAMP(file, env) \
00123       ((file)->ops->get_timestamp (file, env))  
00124 
00125 #define AXIS2_FILE_SET_TIMESTAMP(file, env, timestamp) \
00126       ((file)->ops->set_timestamp (file, env, timestamp)) 
00127 
00128 #define AXIS2_FILE_CLONE(file, env) \
00129       ((file)->ops->clone (file, env))
00130 
00131 
00132                                         
00133 /*************************** End of function macros ***************************/
00134 
00135 
00136 
00139 #ifdef __cplusplus
00140 }
00141 #endif
00142 
00143 #endif  /* AXIS2_FILE_H */

Generated on Wed Dec 20 20:34:49 2006 for Axis2/C by  doxygen 1.5.1