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_status_t (AXIS2_CALL *
00066 set_namespace) (
00067 void *schema,
00068 const axis2_env_t *env,
00069 axis2_uri_t *namespc);
00070
00071 axis2_uri_t *(AXIS2_CALL *
00072 get_namespace) (
00073 void *schema,
00074 const axis2_env_t *env);
00075
00076 axis2_status_t (AXIS2_CALL *
00077 set_schema_def) (
00078 void *schema,
00079 const axis2_env_t *env,
00080 struct xml_schema *schema_def);
00081
00082 struct xml_schema *(AXIS2_CALL *
00083 get_schema_def) (
00084 void *schema,
00085 const axis2_env_t *env);
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104 axis2_status_t (AXIS2_CALL *
00105 set_referenceable) (
00106 void *schema,
00107 const axis2_env_t *env,
00108 axis2_bool_t referenceable);
00109
00110 axis2_bool_t (AXIS2_CALL *
00111 is_referenceable) (
00112 void *schema,
00113 const axis2_env_t *env);
00114
00115 axis2_char_t *(AXIS2_CALL *
00116 get_namespace_as_string) (
00117 void *schema,
00118 const axis2_env_t *env);
00119
00120
00121 };
00122
00123 struct woden_schema
00124 {
00125 woden_schema_ops_t *ops;
00126 };
00127
00128 AXIS2_EXTERN woden_schema_t * AXIS2_CALL
00129 woden_schema_create(const axis2_env_t *env);
00130
00131
00132 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00133 woden_schema_resolve_methods(
00134 woden_schema_t *schema,
00135 const axis2_env_t *env,
00136 woden_schema_t *schema_impl,
00137 axis2_hash_t *methods);
00138
00139
00140 #define WODEN_SCHEMA_FREE(schema, env) \
00141 (((woden_schema_t *) schema)->ops->free (schema, env))
00142
00143 #define WODEN_SCHEMA_TYPE(schema, env) \
00144 (((woden_schema_t *) schema)->ops->type (schema, env))
00145
00146 #define WODEN_SCHEMA_SET_NAMESPACE(schema, env, namespc) \
00147 (((woden_schema_t *) schema)->ops->set_namespace(schema, env, \
00148 namespc))
00149
00150 #define WODEN_SCHEMA_GET_NAMESPACE(schema, env) \
00151 (((woden_schema_t *) schema)->ops->get_namespace(schema, env))
00152
00153 #define WODEN_SCHEMA_SET_SCHEMA_DEF(schema, env, schema_def) \
00154 (((woden_schema_t *) schema)->ops->set_schema_def(schema, env, \
00155 schema_def))
00156
00157 #define WODEN_SCHEMA_GET_SCHEMA_DEF(schema, env) \
00158 (((woden_schema_t *) schema)->ops->get_schema_def(schema, env))
00159
00160 #define WODEN_SCHEMA_SET_REFERENCEABLE(schema, env, referenceable) \
00161 (((woden_schema_t *) schema)->ops->set_referenceable(schema, env, \
00162 referenceable))
00163
00164 #define WODEN_SCHEMA_IS_REFERENCEABLE(schema, env) \
00165 (((woden_schema_t *) schema)->ops->is_referenceable(schema, env))
00166
00167 #define WODEN_SCHEMA_GET_NAMESPACE_AS_STRING(schema, env) \
00168 (((woden_schema_t *) schema)->ops->get_namespace_as_string(schema, \
00169 env))
00170
00172 #ifdef __cplusplus
00173 }
00174 #endif
00175 #endif