axiom_namespace.h

Go to the documentation of this file.
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 AXIOM_NAMESPACE_H
00019 #define AXIOM_NAMESPACE_H
00020 
00027 #include <axis2_utils_defines.h>
00028 #include <axis2_env.h>
00029 #include <axiom_output.h>
00030 
00031 #ifdef __cplusplus
00032 extern "C"
00033 {
00034 #endif
00035 
00036     struct axiom_namespace;
00037     struct axiom_namespace_ops;
00038     
00049     typedef struct axiom_namespace_ops
00050     {
00057         axis2_status_t (AXIS2_CALL *
00058         free) (struct axiom_namespace *om_namespace,
00059                const axis2_env_t *env);
00060 
00068         axis2_bool_t (AXIS2_CALL *
00069         equals)(struct axiom_namespace *om_namespace,
00070                 const axis2_env_t *env,
00071                 struct axiom_namespace *om_namespace1);
00072 
00080         axis2_status_t (AXIS2_CALL *
00081         serialize)(struct axiom_namespace *om_namespace,
00082                    const axis2_env_t *env,
00083                    axiom_output_t * om_output);
00089         axis2_char_t* (AXIS2_CALL *
00090         get_uri)(struct axiom_namespace *om_namespace,
00091                  const axis2_env_t *env);
00097         axis2_char_t* (AXIS2_CALL *
00098         get_prefix)(struct axiom_namespace *om_namespace,
00099                     const axis2_env_t *env);
00100 
00101 
00108         struct axiom_namespace* (AXIS2_CALL *
00109         clone)(struct axiom_namespace *om_namespace,
00110                const axis2_env_t *env);
00111                
00120         axis2_char_t * (AXIS2_CALL *
00121         to_string)(struct axiom_namespace *om_namespace,
00122                    const axis2_env_t *env);
00123 
00124     } axiom_namespace_ops_t;
00125 
00130     typedef struct axiom_namespace
00131     {
00133         axiom_namespace_ops_t *ops;
00134         int ref;        
00135     } axiom_namespace_t;
00136 
00143     AXIS2_EXTERN axiom_namespace_t * AXIS2_CALL
00144     axiom_namespace_create (const axis2_env_t *env,
00145                                const axis2_char_t * uri,
00146                                const axis2_char_t *prefix);
00147 
00149 #define AXIOM_NAMESPACE_FREE(om_namespace,env) \
00150         ((om_namespace)->ops->free(om_namespace, env))
00151         
00153 #define AXIOM_NAMESPACE_EQUALS(om_namespace, env, om_namespace1) \
00154         ((om_namespace)->ops->equals(om_namespace, env, om_namespace1))
00155         
00157 #define AXIOM_NAMESPACE_SERIALIZE(om_namespace,env, om_output) \
00158         ((om_namespace)->ops->serialize(om_namespace, env,om_output))
00159 
00160 #define AXIOM_NAMESPACE_GET_PREFIX(om_namespace, env) \
00161         ((om_namespace)->ops->get_prefix(om_namespace, env))
00162 
00163 #define AXIOM_NAMESPACE_GET_URI(om_namespace, env) \
00164         ((om_namespace)->ops->get_uri(om_namespace, env))
00165 
00166 #define AXIOM_NAMESPACE_CLONE(om_namespace, env) \
00167         ((om_namespace)->ops->clone(om_namespace, env))
00168 
00169 #define AXIOM_NAMESPACE_TO_STRING(om_namespace, env) \
00170         ((om_namespace)->ops->to_string(om_namespace, env))
00171 
00174 #ifdef __cplusplus
00175 }
00176 #endif
00177 
00178 #endif                          /* AXIOM_NAMESPACE */

Generated on Wed Dec 20 20:14:09 2006 for Axis2/C by  doxygen 1.5.1