axis2_base64_binary.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_BASE64_BINARY_H
00019 #define AXIS2_BASE64_BINARY_H
00020 
00021 #include <axis2_base64.h>
00022 #include <axis2_utils_defines.h>
00023 #include <axis2_env.h>
00024 
00036 #ifdef __cplusplus
00037 extern "C"
00038 {
00039 #endif
00040 
00042     typedef struct axis2_base64_binary_ops axis2_base64_binary_ops_t;
00044     typedef struct axis2_base64_binary axis2_base64_binary_t;
00045 
00046      struct axis2_base64_binary_ops
00047     {
00054         axis2_status_t (AXIS2_CALL *
00055                 free)(
00056                     axis2_base64_binary_t *base64_binary,
00057                     const axis2_env_t *env);
00058 
00067         axis2_status_t (AXIS2_CALL *
00068                 set_plain_binary)(
00069                     axis2_base64_binary_t *base64_binary,
00070                     const axis2_env_t *env,
00071                     const unsigned char* plain_binary,
00072                     int plain_binary_len);
00073 
00082         unsigned char* (AXIS2_CALL *
00083                 get_plain_binary)(
00084                     axis2_base64_binary_t *base64_binary,
00085                     const axis2_env_t *env,
00086                     int* plain_binary_len );
00087 
00095         axis2_status_t (AXIS2_CALL *
00096                 set_encoded_binary)(
00097                    axis2_base64_binary_t *base64_binary,
00098                    const axis2_env_t *env,
00099                    const char* encoded_binary );
00100 
00107         char* (AXIS2_CALL *
00108                 get_encoded_binary)(
00109                     axis2_base64_binary_t *base64_binary,
00110                     const axis2_env_t *env );
00111 
00118         int (AXIS2_CALL *
00119                 get_encoded_binary_len)(
00120                     axis2_base64_binary_t *base64_binary,
00121                     const axis2_env_t *env );
00122 
00129         int (AXIS2_CALL *
00130                 get_decoded_binary_len)(
00131                     axis2_base64_binary_t *base64_binary,
00132                     const axis2_env_t *env );
00133 
00134 
00135     };
00136 
00137      struct axis2_base64_binary
00138     {
00139         axis2_base64_binary_ops_t *ops;
00140     };
00141 
00147     AXIS2_EXTERN axis2_base64_binary_t* AXIS2_CALL
00148     axis2_base64_binary_create(
00149         const axis2_env_t *env );
00150 
00157     AXIS2_EXTERN axis2_base64_binary_t* AXIS2_CALL
00158     axis2_base64_binary_create_with_plain_binary(
00159             const axis2_env_t *env,
00160             const unsigned char *plain_binary,
00161             int plain_binary_len);
00162 
00169     AXIS2_EXTERN axis2_base64_binary_t* AXIS2_CALL
00170     axis2_base64_binary_create_with_encoded_binary(
00171             const axis2_env_t *env,
00172             const char *encoded_binary );
00173 
00174 /*************************** Function macros **********************************/
00175 
00178 #define AXIS2_BASE64_BINARY_FREE(base64_binary, env) \
00179      ((base64_binary)->ops->free(base64_binary, env))
00180 
00183 #define AXIS2_BASE64_BINARY_SET_PLAIN_BINARY(base64_binary, env, plain_binary) \
00184      ((base64_binary)->ops->set_plain_binary(base64_binary, env, plain_binary))
00185 
00188 #define AXIS2_BASE64_BINARY_GET_PLAIN_BINARY(base64_binary, env ) \
00189      ((base64_binary)->ops->get_plain_binary(base64_binary, env))
00190 
00193 #define AXIS2_BASE64_BINARY_SET_ENCODED_BINARY(base64_binary, env, encoded_binary) \
00194      ((base64_binary)->ops->set_encoded_binary(base64_binary, env, encoded_binary))
00195 
00198 #define AXIS2_BASE64_BINARY_GET_ENCODED_BINARY(base64_binary, env ) \
00199      ((base64_binary)->ops->get_encoded_binary(base64_binary, env))
00200 
00203 #define AXIS2_BASE64_BINARY_GET_ENCODED_BINARY_LEN(base64_binary, env ) \
00204      ((base64_binary)->ops->get_encoded_binary_len(base64_binary, env))
00205 
00208 #define AXIS2_BASE64_BINARY_GET_DECODED_BINARY_LEN(base64_binary, env ) \
00209      ((base64_binary)->ops->get_decoded_binary_len(base64_binary, env))
00210 
00213 #ifdef __cplusplus
00214 }
00215 #endif
00216 
00217 #endif /* AXIS2_BASE64_BINARY_H */

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