00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef WODEN_SCHEMA_H
00018 #define WODEN_SCHEMA_H
00019
00026 #include <axis2_allocator.h>
00027 #include <axis2_env.h>
00028 #include <axis2_error.h>
00029 #include <axis2_string.h>
00030 #include <axis2_utils.h>
00031 #include <axis2_hash.h>
00032 #include <axis2_uri.h>
00033 #include <woden.h>
00034
00035 #ifdef __cplusplus
00036 extern "C"
00037 {
00038 #endif
00039
00040 typedef struct woden_schema woden_schema_t;
00041 typedef struct woden_schema_ops woden_schema_ops_t;
00042 struct xml_schema;
00043
00049 struct woden_schema_ops
00050 {
00055 axis2_status_t (AXIS2_CALL *
00056 free) (
00057 void *schema,
00058 const axis2_env_t *env);
00059
00060 woden_obj_types_t (AXIS2_CALL *
00061 type) (
00062 void *schema,
00063 const axis2_env_t *env);
00064
00065 axis2_hash_t *(AXIS2_CALL *
00066 super_objs) (
00067 void *schema,
00068 const axis2_env_t *env);
00069
00070 axis2_status_t (AXIS2_CALL *
00071 set_namespace) (
00072 void *schema,
00073 const axis2_env_t *env,
00074 axis2_uri_t *namespc);
00075
00076 axis2_uri_t *(AXIS2_CALL *
00077 get_namespace) (
00078 void *schema,
00079 const axis2_env_t *env);
00080
00081 axis2_status_t (AXIS2_CALL *
00082 set_schema_def) (
00083 void *schema,
00084 const axis2_env_t *env,
00085 struct xml_schema *schema_def);
00086
00087 struct xml_schema *(AXIS2_CALL *
00088 get_schema_def) (
00089 void *schema,
00090 const axis2_env_t *env);
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109 axis2_status_t (AXIS2_CALL *
00110 set_referenceable) (
00111 void *schema,
00112 const axis2_env_t *env,
00113 axis2_bool_t referenceable);
00114
00115 axis2_bool_t (AXIS2_CALL *
00116 is_referenceable) (
00117 void *schema,
00118 const axis2_env_t *env);
00119
00120 axis2_char_t *(AXIS2_CALL *
00121 get_namespace_as_string) (
00122 void *schema,
00123 const axis2_env_t *env);
00124
00125
00126 };
00127
00128 struct woden_schema
00129 {
00130 woden_schema_ops_t *ops;
00131 };
00132
00133 AXIS2_EXTERN woden_schema_t * AXIS2_CALL
00134 woden_schema_create(const axis2_env_t *env);
00135
00136
00137 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00138 woden_schema_resolve_methods(
00139 woden_schema_t *schema,
00140 const axis2_env_t *env,
00141 woden_schema_t *schema_impl,
00142 axis2_hash_t *methods);
00143
00144
00145 #define WODEN_SCHEMA_FREE(schema, env) \
00146 (((woden_schema_t *) schema)->ops->free (schema, env))
00147
00148 #define WODEN_SCHEMA_SUPER_OBJS(schema, env) \
00149 (((woden_schema_t *) schema)->ops->super_objs (schema, env))
00150
00151 #define WODEN_SCHEMA_TYPE(schema, env) \
00152 (((woden_schema_t *) schema)->ops->type (schema, env))
00153
00154 #define WODEN_SCHEMA_SET_NAMESPACE(schema, env, namespc) \
00155 (((woden_schema_t *) schema)->ops->set_namespace(schema, env, \
00156 namespc))
00157
00158 #define WODEN_SCHEMA_GET_NAMESPACE(schema, env) \
00159 (((woden_schema_t *) schema)->ops->get_namespace(schema, env))
00160
00161 #define WODEN_SCHEMA_SET_SCHEMA_DEF(schema, env, schema_def) \
00162 (((woden_schema_t *) schema)->ops->set_schema_def(schema, env, \
00163 schema_def))
00164
00165 #define WODEN_SCHEMA_GET_SCHEMA_DEF(schema, env) \
00166 (((woden_schema_t *) schema)->ops->get_schema_def(schema, env))
00167
00168 #define WODEN_SCHEMA_SET_REFERENCEABLE(schema, env, referenceable) \
00169 (((woden_schema_t *) schema)->ops->set_referenceable(schema, env, \
00170 referenceable))
00171
00172 #define WODEN_SCHEMA_IS_REFERENCEABLE(schema, env) \
00173 (((woden_schema_t *) schema)->ops->is_referenceable(schema, env))
00174
00175 #define WODEN_SCHEMA_GET_NAMESPACE_AS_STRING(schema, env) \
00176 (((woden_schema_t *) schema)->ops->get_namespace_as_string(schema, \
00177 env))
00178
00180 #ifdef __cplusplus
00181 }
00182 #endif
00183 #endif