axis2_qname.h

Go to the documentation of this file.
00001     /*
00002  * Copyright 2004,2005 The Apache Software Foundation.
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *      http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 #ifndef AXIS2_QNAME_H
00018 #define AXIS2_QNAME_H
00019 
00025 #include <axis2_utils_defines.h>
00026 #include <axis2_env.h>
00027 
00028 #include <axis2_string.h>
00029 
00030 #ifdef __cplusplus
00031 extern "C"
00032 {
00033 #endif
00034 
00035 struct axis2_qname;
00036 struct axis2_qname_ops;
00037 
00050  typedef struct axis2_qname_ops
00051 {
00056     axis2_status_t (AXIS2_CALL *
00057    free_fn) (struct axis2_qname * qname,
00058            const axis2_env_t *env);
00059                                        
00067     axis2_bool_t (AXIS2_CALL *
00068    equals) (const struct axis2_qname * qname,
00069              const axis2_env_t *env,
00070              const struct axis2_qname * qname1);
00078     struct axis2_qname* (AXIS2_CALL *
00079    clone)(const struct axis2_qname *qname,
00080            const axis2_env_t *env);
00081                                        
00082     axis2_char_t* (AXIS2_CALL *
00083    get_uri)(const struct axis2_qname *qname,
00084              const axis2_env_t *env);
00085                                         
00086     axis2_char_t* (AXIS2_CALL *
00087    get_prefix)(const struct axis2_qname *qname,
00088                 const axis2_env_t *env);
00089 
00090     axis2_char_t* (AXIS2_CALL *
00091    get_localpart)(const struct axis2_qname *qname,
00092                    const axis2_env_t *env);
00093                                               
00100     axis2_char_t* (AXIS2_CALL *
00101    to_string)(const struct axis2_qname *qname,
00102                const axis2_env_t *env); 
00103                
00104    
00105                                               
00106 } axis2_qname_ops_t;
00107 
00108 typedef struct axis2_qname
00109 {
00111     axis2_qname_ops_t *ops;
00112 } axis2_qname_t;
00113 
00127 AXIS2_EXTERN axis2_qname_t * AXIS2_CALL
00128 axis2_qname_create (const axis2_env_t *env,
00129                     const axis2_char_t * localpart,
00130                     const axis2_char_t * namespace_uri,
00131                     const axis2_char_t * prefix);
00132 
00133 
00140 AXIS2_EXTERN axis2_qname_t* AXIS2_CALL 
00141 axis2_qname_create_from_string(const axis2_env_t *env,
00142                                const axis2_char_t *string);
00143    
00144 
00145 #define AXIS2_QNAME_FREE(qname, env) \
00146         ((qname)->ops->free_fn(qname,env))
00147         
00148 #define AXIS2_QNAME_EQUALS(qname, env, qname1) \
00149         ((qname)->ops->equals(qname, env, qname1))
00150 
00151 #define AXIS2_QNAME_CLONE(qname, env) \
00152         ((qname)->ops->clone(qname, env))        
00153         
00154 #define AXIS2_QNAME_GET_URI(qname, env) \
00155         ((qname)->ops->get_uri(qname, env))
00156         
00157 #define AXIS2_QNAME_GET_PREFIX(qname, env) \
00158         ((qname)->ops->get_prefix(qname, env))
00159         
00160 #define AXIS2_QNAME_GET_LOCALPART(qname, env) \
00161         ((qname)->ops->get_localpart(qname, env))
00162         
00163 #define AXIS2_QNAME_TO_STRING(qname, env) \
00164         ((qname)->ops->to_string(qname, env))        
00165 
00167 #ifdef __cplusplus
00168 }
00169 #endif
00170 
00171 #endif /* AXIS2_QNAME_H */

Generated on Thu Oct 26 21:11:23 2006 for Axis2/C by  doxygen 1.4.7