Macros | Functions
Vortex Frame Factory: Function to manipulate frames inside Vortex Library

Macros

#define VORTEX_FRAME_GET_MIME_HEADER(frame, header_name)   ((vortex_frame_get_mime_header (frame, header_name)) ? vortex_frame_mime_header_content (vortex_frame_get_mime_header (frame, header_name)) : NULL)
 Allows to get the content of the first MIME header found, located by the header_name provided. More...
 

Functions

axl_bool vortex_frame_are_equal (VortexFrame *a, VortexFrame *b)
 Allows to check if the given frames are equal. More...
 
axl_bool vortex_frame_are_joinable (VortexFrame *a, VortexFrame *b)
 Allows to check if the given frames are joinable or the first one follows the next. More...
 
char * vortex_frame_build_up_from_params (VortexFrameType type, int channel, int msgno, axl_bool more, unsigned int seqno, int size, int ansno, const void *payload)
 Builds a frame using the given parameters. More...
 
char * vortex_frame_build_up_from_params_s (VortexFrameType type, int channel, int msgno, axl_bool more, unsigned int seqno, int size, int ansno, const char *content_type, const char *transfer_encoding, const void *payload, int *frame_size)
 Creates a new frame from using the given data and returning current frame size resulting from the operation. More...
 
char * vortex_frame_build_up_from_params_s_buffer (VortexFrameType type, int channel, int msgno, axl_bool more, unsigned int seqno, int size, int ansno, const char *content_type, const char *transfer_encoding, const void *payload, int *frame_size, char *buffer, int buffer_size)
 Creates a new frame, using the given data and returning current frame size resulting from the operation, and placing the content into the buffer provided if defined. More...
 
VortexFramevortex_frame_copy (VortexFrame *frame)
 Perform a copy from the received frame. More...
 
VortexFramevortex_frame_create (VortexCtx *ctx, VortexFrameType type, int channel, int msgno, axl_bool more, unsigned int seqno, int size, int ansno, const void *payload)
 Creates a new frame object (VortexFrame) using the given data. More...
 
VortexFramevortex_frame_create_full (VortexCtx *ctx, VortexFrameType type, int channel, int msgno, axl_bool more, unsigned int seqno, int size, int ansno, const char *content_type, const char *transfer_encoding, const void *payload)
 Creates a new frame as vortex_frame_create but also allowing to specify mime header content, that is, Content-Type and Content-Transfer-Encoding values. More...
 
VortexFramevortex_frame_create_full_ref (VortexCtx *ctx, VortexFrameType type, int channel, int msgno, axl_bool more, unsigned int seqno, int size, int ansno, const char *content_type, const char *transfer_encoding, void *payload)
 Creates a new frame as vortex_frame_create but also allowing to specify mime header content, that is, Content-Type and Content-Transfer-Encoding values. More...
 
void vortex_frame_free (VortexFrame *frame)
 Deallocate the frame. More...
 
int vortex_frame_get_ansno (VortexFrame *frame)
 Returns current ans number for the given frame. More...
 
int vortex_frame_get_channel (VortexFrame *frame)
 Returns current channel used to sent or receive the given frame. More...
 
VortexChannelvortex_frame_get_channel_ref (VortexFrame *frame)
 Returns current channel reference where the frame was received. More...
 
char * vortex_frame_get_close_message (int number, const char *code, const char *xml_lang, const char *close_content)
 Creates and return the close message. More...
 
const char * vortex_frame_get_content (VortexFrame *frame)
 Allows to get all frame content including mime headers and mime body. More...
 
int vortex_frame_get_content_size (VortexFrame *frame)
 Allows to get current frame content size, including payload and mime headers. More...
 
const char * vortex_frame_get_content_type (VortexFrame *frame)
 Returns frame content type. More...
 
VortexCtxvortex_frame_get_ctx (VortexFrame *frame)
 Allows to get the context reference under which the frame was created. More...
 
char * vortex_frame_get_error_message (const char *code, const char *error_content, const char *xml_lang)
 Creates and return the error message. More...
 
int vortex_frame_get_id (VortexFrame *frame)
 Allows to get the unique frame identifier for the given frame. More...
 
VortexMimeHeadervortex_frame_get_mime_header (VortexFrame *frame, const char *mime_header)
 Allows to get the content associated to a particular header. More...
 
int vortex_frame_get_mime_header_size (VortexFrame *frame)
 Allows to get current status of the mime header size for the given frame. More...
 
int vortex_frame_get_more_flag (VortexFrame *frame)
 Returns actual more flag status for the given frame. More...
 
int vortex_frame_get_msgno (VortexFrame *frame)
 Return current message number used for the given frame. More...
 
const char * vortex_frame_get_ok_message (void)
 Returns the ok message. More...
 
const void * vortex_frame_get_payload (VortexFrame *frame)
 Returns the payload associated to the given frame. More...
 
int vortex_frame_get_payload_size (VortexFrame *frame)
 Returns the current payload size the given frame have without taking into account mime headers. More...
 
char * vortex_frame_get_raw_frame (VortexFrame *frame)
 Returns the frame in plain text form from a VortexFrame object. More...
 
unsigned int vortex_frame_get_seqno (VortexFrame *frame)
 Returns the current sequence number for the given frame. More...
 
char * vortex_frame_get_start_message (int channel_num, const char *serverName, const char *profile, VortexEncoding encoding, const char *content_profile, int profile_content_size)
 Creates and return an new start message using the given data. More...
 
char * vortex_frame_get_start_rpy_message (const char *profile, const char *profile_content)
 Allows to create and return a start reply message. More...
 
const char * vortex_frame_get_transfer_encoding (VortexFrame *frame)
 Allows to get current Content-Transfer-Encoding mime header configuration for the given frame (if defined). More...
 
VortexFrameType vortex_frame_get_type (VortexFrame *frame)
 return actual frame type. More...
 
axl_bool vortex_frame_is_error_message (VortexFrame *frame, char **code, char **message)
 Allows to check if the given frame contains a BEEP error message inside the frame payload. More...
 
VortexFramevortex_frame_join (VortexFrame *a, VortexFrame *b)
 Allows to join two frames into a newly allocated one. More...
 
VortexFramevortex_frame_join_extending (VortexFrame *a, VortexFrame *b)
 Allows to join two frames, without allocating a new one but, reusing memory allocated by the first frame, saving memory an memory dumping operations. More...
 
const char * vortex_frame_mime_header_content (VortexMimeHeader *header)
 Provided a reference to a MIME header VortexMimeHeader, the function allows to get the MIME header content. More...
 
int vortex_frame_mime_header_count (VortexMimeHeader *header)
 Allows to get the number of times the MIME header was defined or the number of (times - 1) a call to vortex_frame_mime_header_next will succeed. More...
 
const char * vortex_frame_mime_header_name (VortexMimeHeader *header)
 Provided a reference to a MIME header VortexMimeHeader, the function allows to get the MIME header field name. More...
 
VortexMimeHeadervortex_frame_mime_header_next (VortexMimeHeader *header)
 Provided a reference to a MIME header VortexMimeHeader, the function allows to get the next MIME header found on the VortexFrame. More...
 
axl_bool vortex_frame_mime_process (VortexFrame *frame)
 Function that prepares MIME status for the frame received, configuring variables, content, etc. More...
 
int vortex_frame_readline (VortexConnection *connection, char *buffer, int maxlen)
 Read the next line, byte by byte until it gets a
or maxlen is reached. More...
 
axl_bool vortex_frame_ref (VortexFrame *frame)
 Increases the frame reference counting. More...
 
int vortex_frame_ref_count (VortexFrame *frame)
 Returns current reference counting for the frame received. More...
 
char * vortex_frame_seq_build_up_from_params (int channel_num, unsigned int ackno, int window_size)
 Allows to create a new SEQ frame. More...
 
char * vortex_frame_seq_build_up_from_params_buffer (int channel_num, int ackno, int window_size, char *buffer, int buffer_size, int *result_size)
 Allows to create a new SEQ frame placing the result into the provided buffer. More...
 
void vortex_frame_set_mime_header (VortexFrame *frame, const char *mime_header, const char *mime_header_content)
 Allows to configure a new MIME header on the provided VortexFrame reference. More...
 
void vortex_frame_unref (VortexFrame *frame)
 Allows to decrease the frame reference counting, making an automatic call to vortex_frame_free if the reference counting reach 0. More...
 

Detailed Description