- Main Page
- Modules
- Classes
- Files
- Directories
- Related Pages
- Examples

- Search for |

# tcpmon_entry.h

Go to the documentation of this file.

    00001
    00002 /*
    00003  * Licensed to the Apache Software Foundation (ASF) under one or more
    00004  * contributor license agreements.  See the NOTICE file distributed with
    00005  * this work for additional information regarding copyright ownership.
    00006  * The ASF licenses this file to You under the Apache License, Version 2.0
    00007  * (the "License"); you may not use this file except in compliance with
    00008  * the License.  You may obtain a copy of the License at
    00009  *
    00010  *      http://www.apache.org/licenses/LICENSE-2.0
    00011  *
    00012  * Unless required by applicable law or agreed to in writing, software
    00013  * distributed under the License is distributed on an "AS IS" BASIS,
    00014  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    00015  * See the License for the specific language governing permissions and
    00016  * limitations under the License.
    00017  */
    00018
    00019 #ifndef TCPMON_ENTRY_H
    00020 #define TCPMON_ENTRY_H
    00021
    00022 #include <axutil_env.h>
    00023 #include <axutil_string.h>
    00024
    00030 #ifdef __cplusplus
    00031 extern "C"
    00032 {
    00033 #endif
    00034
    00041     typedef struct tcpmon_entry_ops tcpmon_entry_ops_t;
    00042     typedef struct tcpmon_entry tcpmon_entry_t;
    00043
    00044     struct tcpmon_entry_ops
    00045     {
    00046
    00053         axis2_status_t(
    00054             AXIS2_CALL
    00055             * free)(
    00056                 tcpmon_entry_t * entry,
    00057                 const axutil_env_t * env);
    00058
    00064         axis2_char_t *(
    00065             AXIS2_CALL
    00066             * arrived_time)(
    00067                 tcpmon_entry_t * entry,
    00068                 const axutil_env_t * env);
    00069
    00075         axis2_char_t *(
    00076             AXIS2_CALL
    00077             * sent_time)(
    00078                 tcpmon_entry_t * entry,
    00079                 const axutil_env_t * env);
    00080
    00086         axis2_char_t *(
    00087             AXIS2_CALL
    00088             * time_diff)(
    00089                 tcpmon_entry_t * entry,
    00090                 const axutil_env_t * env);
    00091
    00097         axis2_char_t *(
    00098             AXIS2_CALL
    00099             * sent_data)(
    00100                 tcpmon_entry_t * entry,
    00101                 const axutil_env_t * env);
    00102
    00108         axis2_char_t *(
    00109             AXIS2_CALL
    00110             * arrived_data)(
    00111                 tcpmon_entry_t * entry,
    00112                 const axutil_env_t * env);
    00113
    00119         axis2_char_t *(
    00120             AXIS2_CALL
    00121             * sent_headers)(
    00122                 tcpmon_entry_t * entry,
    00123                 const axutil_env_t * env);
    00124
    00130         axis2_char_t *(
    00131             AXIS2_CALL
    00132             * arrived_headers)(
    00133                 tcpmon_entry_t * entry,
    00134                 const axutil_env_t * env);
    00135
    00141         axis2_bool_t(
    00142             AXIS2_CALL
    00143             * is_success)(
    00144                 tcpmon_entry_t * entry,
    00145                 const axutil_env_t * env);
    00146
    00147         int(
    00148             AXIS2_CALL
    00149             * get_format_bit)(
    00150                 tcpmon_entry_t * entry,
    00151                 const axutil_env_t * env);
    00152
    00153         int(
    00154             AXIS2_CALL
    00155             * get_sent_data_length)(
    00156                 tcpmon_entry_t * entry,
    00157                 const axutil_env_t * env);
    00158
    00159         int(
    00160             AXIS2_CALL
    00161             * get_arrived_data_length)(
    00162                 tcpmon_entry_t * entry,
    00163                 const axutil_env_t * env);
    00164
    00165         axis2_status_t(
    00166             AXIS2_CALL
    00167             * set_format_bit)(
    00168                 tcpmon_entry_t * entry,
    00169                 const axutil_env_t * env,
    00170                 int format_bit);
    00171     };
    00172
    00173     struct tcpmon_entry
    00174     {
    00175         tcpmon_entry_ops_t *ops;
    00176     };
    00177
    00183     tcpmon_entry_t *AXIS2_CALL
    00184     tcpmon_entry_create(
    00185         const axutil_env_t * env);
    00186
    00187     /*************************** Function macros **********************************/
    00188
    00189 #define TCPMON_ENTRY_FREE(entry, env) \
    00190         ((entry)->ops->free (entry, env))
    00191
    00192 #define TCPMON_ENTRY_ARRIVED_TIME(entry, env) \
    00193         ((entry)->ops->arrived_time(entry, env))
    00194
    00195 #define TCPMON_ENTRY_SENT_TIME(entry, env) \
    00196         ((entry)->ops->sent_time(entry, env))
    00197
    00198 #define TCPMON_ENTRY_TIME_DIFF(entry, env) \
    00199         ((entry)->ops->time_diff(entry, env))
    00200
    00201 #define TCPMON_ENTRY_SENT_DATA(entry, env) \
    00202         ((entry)->ops->sent_data(entry, env))
    00203
    00204 #define TCPMON_ENTRY_ARRIVED_DATA(entry, env) \
    00205         ((entry)->ops->arrived_data(entry, env))
    00206
    00207 #define TCPMON_ENTRY_SENT_HEADERS(entry, env) \
    00208         ((entry)->ops->sent_headers(entry, env))
    00209
    00210 #define TCPMON_ENTRY_ARRIVED_HEADERS(entry, env) \
    00211         ((entry)->ops->arrived_headers(entry, env))
    00212
    00213 #define TCPMON_ENTRY_IS_SUCCESS(entry, env) \
    00214         ((entry)->ops->is_success(entry, env))
    00215
    00216 #define TCPMON_ENTRY_SET_FORMAT_BIT(entry, env, format_bit) \
    00217         ((entry)->ops->set_format_bit(entry, env, format_bit))
    00218
    00219 #define TCPMON_ENTRY_GET_FORMAT_BIT(entry, env) \
    00220         ((entry)->ops->get_format_bit(entry, env))
    00221
    00222 #define TCPMON_ENTRY_GET_SENT_DATA_LENGTH(entry, env) \
    00223         ((entry)->ops->get_sent_data_length(entry, env))
    00224
    00225 #define TCPMON_ENTRY_GET_ARRIVED_DATA_LENGTH(entry, env) \
    00226         ((entry)->ops->get_arrived_data_length(entry, env))
    00227
    00230 #ifdef __cplusplus
    00231 }
    00232 #endif
    00233
    00234 #endif                          /* TCPMON_ENTRY_H */