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[], int 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.
int 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.

The function sdp_message() returns a pointer to a C string containing the SDP message

Parameters:
p Pointer to an sdp_printer_t object.
Returns:
The function sdp_message() returns a pointer to a C string containing the emitted SDP message, or NULL upon an error.

int sdp_message_size ( sdp_printer_t p  ) 

Get size of encoded SDP message.

The function sdp_message_size() returns the size of the emitted SDP message.

Parameters:
p Pointer to an sdp_printer_t object.
Returns:
The function sdp_message_size() returns number of bytes in SDP message or 0 upon an error.

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

Print a SDP description.

The function sdp_print() encodes the contents of the SDP session structure 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:
The function sdp_print() always returns a handle to an sdp_printer_t object.

void sdp_printer_free ( sdp_printer_t p  ) 

Free a SDP printer.

The function sdp_printer_free() frees 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.

The function sdp_printing_error() returns a message describing encoding error.

Parameters:
p Pointer to an sdp_printer_t object.
Returns:
The function sdp_printing_error() returns a pointer to C string descibing printing errors, or NULL if no error were encountered.


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