sdp_print.c File Reference


Detailed Description

Simple SDP printer interface.

Author:
Pekka Pessi <Pekka.Pessi@nokia-email.address.hidden>
Date:
Created: Fri Feb 18 10:25:08 2000 ppessi

#include "config.h"
#include <sofia-sip/su_alloc.h>
#include "sofia-sip/sdp.h"
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <stdio.h>
#include <assert.h>

Include dependency graph for sdp_print.c:


Functions

sdp_printer_tsdp_print (su_home_t *home, sdp_session_t const *session, char msgbuf[], isize_t msgsize, int flags)
 Print a SDP description.
char const * sdp_printing_error (sdp_printer_t *p)
 Get encoding error.
char const * sdp_message (sdp_printer_t *p)
 Get encoded SDP message.
isize_t sdp_message_size (sdp_printer_t *p)
 Get size of encoded SDP message.
void sdp_printer_free (sdp_printer_t *p)
 Free a SDP printer.

Function Documentation

char const* sdp_message ( sdp_printer_t p  ) 

Get encoded SDP message.

Return a pointer to a C string containing the SDP message.

Parameters:
p Pointer to an sdp_printer_t object.
Returns:
Return a pointer to a C string containing the encoded SDP message, or NULL upon an error.

isize_t sdp_message_size ( sdp_printer_t p  ) 

Get size of encoded SDP message.

Return the size of the encoded SDP message.

Parameters:
p Pointer to an sdp_printer_t object.
Returns:
Number of bytes in SDP message excluding final NUL or 0 upon an error.

sdp_printer_t* sdp_print ( su_home_t home,
sdp_session_t const *  session,
char  msgbuf[],
isize_t  msgsize,
int  flags 
)

Print a SDP description.

Encode the contents of the SDP session structure sdp_session_t to the msgbuf. The msgbuf has size msgsize bytes. If msgbuf is NULL, the sdp_print() function allocates the required buffer from the home heap.

Parameters:
home Memory home (may be NULL).
session SDP session description structure to be encoded.
msgbuf Buffer to which encoding is stored (may be NULL).
msgsize Size of msgbuf.
flags Flags specifying the encoding options.
The flags specify encoding options as follows:

Returns:
Always return a handle to an sdp_printer_t object.
See also:
sdp_printer_t, sdp_session_t, sdp_printing_error(), sdp_message(), sdp_message_size(), sdp_printer_free(), sdp_parse().

void sdp_printer_free ( sdp_printer_t p  ) 

Free a SDP printer.

Free the printer object p and the message buffer possibly associated with it.

Parameters:
p Pointer to an sdp_printer_t object.

char const* sdp_printing_error ( sdp_printer_t p  ) 

Get encoding error.

Return a message describing the encoding error.

Parameters:
p Pointer to an sdp_printer_t object.
Returns:
Return a pointer to C string describing printing errors, or NULL if no error was encountered.


Sofia-SIP 1.12.6 - Copyright (C) 2006 Nokia Corporation. All rights reserved. Licensed under the terms of the GNU Lesser General Public License.