axis2_qname.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 AXIS2_QNAME_H
00019 #define AXIS2_QNAME_H
00020 
00026 #include <axis2_utils_defines.h>
00027 #include <axis2_env.h>
00028 
00029 #include <axis2_string.h>
00030 
00031 #ifdef __cplusplus
00032 extern "C"
00033 {
00034 #endif
00035 
00036 struct axis2_qname;
00037 struct axis2_qname_ops;
00038 
00051  typedef struct axis2_qname_ops
00052 {
00057     axis2_status_t (AXIS2_CALL *
00058    free_fn) (struct axis2_qname * qname,
00059            const axis2_env_t *env);
00060                                        
00068     axis2_bool_t (AXIS2_CALL *
00069    equals) (const struct axis2_qname * qname,
00070              const axis2_env_t *env,
00071              const struct axis2_qname * qname1);
00079     struct axis2_qname* (AXIS2_CALL *
00080    clone)(const struct axis2_qname *qname,
00081            const axis2_env_t *env);
00082                                        
00083     axis2_char_t* (AXIS2_CALL *
00084    get_uri)(const struct axis2_qname *qname,
00085              const axis2_env_t *env);
00086                                         
00087     axis2_char_t* (AXIS2_CALL *
00088    get_prefix)(const struct axis2_qname *qname,
00089                 const axis2_env_t *env);
00090 
00091     axis2_char_t* (AXIS2_CALL *
00092    get_localpart)(const struct axis2_qname *qname,
00093                    const axis2_env_t *env);
00094                                               
00101     axis2_char_t* (AXIS2_CALL *
00102    to_string)(const struct axis2_qname *qname,
00103                const axis2_env_t *env); 
00104                
00105    
00106                                               
00107 } axis2_qname_ops_t;
00108 
00109 typedef struct axis2_qname
00110 {
00112     axis2_qname_ops_t *ops;
00113 } axis2_qname_t;
00114 
00128 AXIS2_EXTERN axis2_qname_t * AXIS2_CALL
00129 axis2_qname_create (const axis2_env_t *env,
00130                     const axis2_char_t * localpart,
00131                     const axis2_char_t * namespace_uri,
00132                     const axis2_char_t * prefix);
00133 
00134 
00141 AXIS2_EXTERN axis2_qname_t* AXIS2_CALL 
00142 axis2_qname_create_from_string(const axis2_env_t *env,
00143                                const axis2_char_t *string);
00144    
00145 
00146 #define AXIS2_QNAME_FREE(qname, env) \
00147         ((qname)->ops->free_fn(qname,env))
00148         
00149 #define AXIS2_QNAME_EQUALS(qname, env, qname1) \
00150         ((qname)->ops->equals(qname, env, qname1))
00151 
00152 #define AXIS2_QNAME_CLONE(qname, env) \
00153         ((qname)->ops->clone(qname, env))        
00154         
00155 #define AXIS2_QNAME_GET_URI(qname, env) \
00156         ((qname)->ops->get_uri(qname, env))
00157         
00158 #define AXIS2_QNAME_GET_PREFIX(qname, env) \
00159         ((qname)->ops->get_prefix(qname, env))
00160         
00161 #define AXIS2_QNAME_GET_LOCALPART(qname, env) \
00162         ((qname)->ops->get_localpart(qname, env))
00163         
00164 #define AXIS2_QNAME_TO_STRING(qname, env) \
00165         ((qname)->ops->to_string(qname, env))        
00166 
00168 #ifdef __cplusplus
00169 }
00170 #endif
00171 
00172 #endif /* AXIS2_QNAME_H */

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