axis2_base64_binary.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_BASE64_BINARY_H
00018 #define AXIS2_BASE64_BINARY_H
00019 
00020 #include <axis2_base64.h>
00021 #include <axis2_utils_defines.h>
00022 #include <axis2_env.h>
00023 
00035 #ifdef __cplusplus
00036 extern "C"
00037 {
00038 #endif
00039 
00041     typedef struct axis2_base64_binary_ops axis2_base64_binary_ops_t;
00043     typedef struct axis2_base64_binary axis2_base64_binary_t;
00044 
00045      struct axis2_base64_binary_ops
00046     {
00053         axis2_status_t (AXIS2_CALL *
00054                 free)(
00055                     axis2_base64_binary_t *base64_binary,
00056                     const axis2_env_t *env);
00057 
00066         axis2_status_t (AXIS2_CALL *
00067                 set_plain_binary)(
00068                     axis2_base64_binary_t *base64_binary,
00069                     const axis2_env_t *env,
00070                     const unsigned char* plain_binary,
00071                     int plain_binary_len);
00072 
00081         unsigned char* (AXIS2_CALL *
00082                 get_plain_binary)(
00083                     axis2_base64_binary_t *base64_binary,
00084                     const axis2_env_t *env,
00085                     int* plain_binary_len );
00086 
00094         axis2_status_t (AXIS2_CALL *
00095                 set_encoded_binary)(
00096                    axis2_base64_binary_t *base64_binary,
00097                    const axis2_env_t *env,
00098                    const char* encoded_binary );
00099 
00106         char* (AXIS2_CALL *
00107                 get_encoded_binary)(
00108                     axis2_base64_binary_t *base64_binary,
00109                     const axis2_env_t *env );
00110 
00117         int (AXIS2_CALL *
00118                 get_encoded_binary_len)(
00119                     axis2_base64_binary_t *base64_binary,
00120                     const axis2_env_t *env );
00121 
00128         int (AXIS2_CALL *
00129                 get_decoded_binary_len)(
00130                     axis2_base64_binary_t *base64_binary,
00131                     const axis2_env_t *env );
00132 
00133 
00134     };
00135 
00136      struct axis2_base64_binary
00137     {
00138         axis2_base64_binary_ops_t *ops;
00139     };
00140 
00146     AXIS2_EXTERN axis2_base64_binary_t* AXIS2_CALL
00147     axis2_base64_binary_create(
00148         const axis2_env_t *env );
00149 
00156     AXIS2_EXTERN axis2_base64_binary_t* AXIS2_CALL
00157     axis2_base64_binary_create_with_plain_binary(
00158             const axis2_env_t *env,
00159             const unsigned char *plain_binary,
00160             int plain_binary_len);
00161 
00168     AXIS2_EXTERN axis2_base64_binary_t* AXIS2_CALL
00169     axis2_base64_binary_create_with_encoded_binary(
00170             const axis2_env_t *env,
00171             const char *encoded_binary );
00172 
00173 /*************************** Function macros **********************************/
00174 
00177 #define AXIS2_BASE64_BINARY_FREE(base64_binary, env) \
00178      ((base64_binary)->ops->free(base64_binary, env))
00179 
00182 #define AXIS2_BASE64_BINARY_SET_PLAIN_BINARY(base64_binary, env, plain_binary) \
00183      ((base64_binary)->ops->set_plain_binary(base64_binary, env, plain_binary))
00184 
00187 #define AXIS2_BASE64_BINARY_GET_PLAIN_BINARY(base64_binary, env ) \
00188      ((base64_binary)->ops->get_plain_binary(base64_binary, env))
00189 
00192 #define AXIS2_BASE64_BINARY_SET_ENCODED_BINARY(base64_binary, env, encoded_binary) \
00193      ((base64_binary)->ops->set_encoded_binary(base64_binary, env, encoded_binary))
00194 
00197 #define AXIS2_BASE64_BINARY_GET_ENCODED_BINARY(base64_binary, env ) \
00198      ((base64_binary)->ops->get_encoded_binary(base64_binary, env))
00199 
00202 #define AXIS2_BASE64_BINARY_GET_ENCODED_BINARY_LEN(base64_binary, env ) \
00203      ((base64_binary)->ops->get_encoded_binary_len(base64_binary, env))
00204 
00207 #define AXIS2_BASE64_BINARY_GET_DECODED_BINARY_LEN(base64_binary, env ) \
00208      ((base64_binary)->ops->get_decoded_binary_len(base64_binary, env))
00209 
00212 #ifdef __cplusplus
00213 }
00214 #endif
00215 
00216 #endif /* AXIS2_BASE64_BINARY_H */

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