axutil_stomp_frame.h
00001 #ifndef AXIS2_STOMP_FRAME_H
00002 #define AXIS2_STOMP_FRAME_H
00003
00004 #include <axutil_network_handler.h>
00005 #include <axutil_stream.h>
00006 #include <axutil_array_list.h>
00007 #include <axutil_env.h>
00008 #include <axutil_utils.h>
00009 #include <axutil_utils_defines.h>
00010 #include <axutil_string.h>
00011
00012
00013 #ifdef __cplusplus
00014 extern "C" {
00015 #endif
00016
00017
00018 #define AXIS2_STOMP_CONNECT "CONNECT"
00019 #define AXIS2_STOMP_SUBSCRIBE "SUBSCRIBE"
00020 #define AXIS2_STOMP_UNSUBSCRIBE "UNSUBSCRIBE"
00021 #define AXIS2_STOMP_SEND "SEND"
00022 #define AXIS2_STOMP_DISCONNECT "DISCONNECT"
00023 #define AXIS2_STOMP_ACK "ACK"
00024 #define AXIS2_STOMP_ABORT "ABORT"
00025 #define AXIS2_STOMP_COMMIT "COMMIT"
00026
00027 typedef struct axutil_stomp_frame
00028 {
00029 axis2_char_t *command;
00030 axutil_array_list_t *headers;
00031 axis2_char_t *body;
00032 }axutil_stomp_frame_t;
00033
00034 axutil_stomp_frame_t *
00035 axutil_stomp_frame_create (
00036 const axutil_env_t *env);
00037
00038 void
00039 axutil_stomp_frame_free (
00040 axutil_stomp_frame_t *frame,
00041 const axutil_env_t *env);
00042
00043 axis2_status_t
00044 axutil_stomp_frame_set_command (
00045 axutil_stomp_frame_t *frame,
00046 const axutil_env_t *env,
00047 axis2_char_t *command);
00048
00049 axis2_status_t
00050 axutil_stomp_frame_set_header (
00051 axutil_stomp_frame_t *frame,
00052 const axutil_env_t *env,
00053 axis2_char_t *header,
00054 axis2_char_t *value);
00055
00056 axis2_status_t
00057 axutil_stomp_frame_set_body (
00058 axutil_stomp_frame_t *frame,
00059 const axutil_env_t *env,
00060 axis2_char_t *body);
00061
00062 int
00063 axutil_stomp_frame_write (
00064 axutil_stomp_frame_t *frame,
00065 const axutil_env_t *env,
00066 axutil_stream_t *stream);
00067
00068 axutil_stomp_frame_t *
00069 axutil_stomp_frame_read (
00070 const axutil_env_t *env,
00071 axutil_stream_t *stream);
00072
00073 void
00074 axutil_stomp_frame_reset (
00075 axutil_stomp_frame_t *frame,
00076 const axutil_env_t *env);
00077
00078
00079
00080 #ifdef __cplusplus
00081 }
00082 #endif
00083
00084 #endif
00085
00086
00087
00088
00089