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 
00038 static const axis2_char_t XML_NAMESPACE_URI[] =
00039     "http://www.w3c.org/XML/1998/namespace";
00040 
00053 AXIS2_DECLARE_DATA typedef struct axis2_qname_ops
00054 {
00059     axis2_status_t (AXIS2_CALL *
00060    free_fn) (struct axis2_qname * qname,
00061            const axis2_env_t *env);
00062                                        
00070     axis2_bool_t (AXIS2_CALL *
00071    equals) (const struct axis2_qname * qname,
00072              const axis2_env_t *env,
00073              const struct axis2_qname * qname1);
00081     struct axis2_qname* (AXIS2_CALL *
00082    clone)(const struct axis2_qname *qname,
00083            const axis2_env_t *env);
00084                                        
00085     axis2_char_t* (AXIS2_CALL *
00086    get_uri)(const struct axis2_qname *qname,
00087              const axis2_env_t *env);
00088                                         
00089     axis2_char_t* (AXIS2_CALL *
00090    get_prefix)(const struct axis2_qname *qname,
00091                 const axis2_env_t *env);
00092 
00093     axis2_char_t* (AXIS2_CALL *
00094    get_localpart)(const struct axis2_qname *qname,
00095                    const axis2_env_t *env);
00096                                               
00103     axis2_char_t* (AXIS2_CALL *
00104    to_string)(const struct axis2_qname *qname,
00105                const axis2_env_t *env); 
00106                
00107    
00108                                               
00109 } axis2_qname_ops_t;
00110 
00111 typedef struct axis2_qname
00112 {
00114     axis2_qname_ops_t *ops;
00115 } axis2_qname_t;
00116 
00130 AXIS2_EXTERN axis2_qname_t * AXIS2_CALL
00131 axis2_qname_create (const axis2_env_t *env,
00132                     const axis2_char_t * localpart,
00133                     const axis2_char_t * namespace_uri,
00134                     const axis2_char_t * prefix);
00135 
00136 
00143 AXIS2_EXTERN axis2_qname_t* AXIS2_CALL 
00144 axis2_qname_create_from_string(const axis2_env_t *env,
00145                                const axis2_char_t *string);
00146    
00147 
00148 #define AXIS2_QNAME_FREE(qname, env) \
00149         ((qname)->ops->free_fn(qname,env))
00150         
00151 #define AXIS2_QNAME_EQUALS(qname, env, qname1) \
00152         ((qname)->ops->equals(qname, env, qname1))
00153 
00154 #define AXIS2_QNAME_CLONE(qname, env) \
00155         ((qname)->ops->clone(qname, env))        
00156         
00157 #define AXIS2_QNAME_GET_URI(qname, env) \
00158         ((qname)->ops->get_uri(qname, env))
00159         
00160 #define AXIS2_QNAME_GET_PREFIX(qname, env) \
00161         ((qname)->ops->get_prefix(qname, env))
00162         
00163 #define AXIS2_QNAME_GET_LOCALPART(qname, env) \
00164         ((qname)->ops->get_localpart(qname, env))
00165         
00166 #define AXIS2_QNAME_TO_STRING(qname, env) \
00167         ((qname)->ops->to_string(qname, env))        
00168 
00170 #ifdef __cplusplus
00171 }
00172 #endif
00173 
00174 #endif /* AXIS2_QNAME_H */

Generated on Thu Aug 31 17:32:36 2006 for Axis2/C by  doxygen 1.4.6