MHEG5  18.9.0
MHEG5 Documentation
Macros | Functions
mh5parse.c File Reference

string parsing utility functions for MHEG5 More...

#include "mh5parse.h"
#include "glue_assert.h"
#include "glue_memory.h"
#include "mh5group.h"
#include "mh5json.h"

Go to the source code of this file.

Macros

#define BKG_TITLE_TOKEN   "t"
 
#define BKG_BOOKING_TOKEN   "b"
 
#define BKG_CRIDTYPE_TOKEN   "ct"
 
#define BKG_SYNOPSIS_TOKEN   "s"
 
#define BKG_LOCATION_TOKEN   "l"
 
#define BKG_DVB_TOKEN   "dvb://"
 
#define BKG_CRID_TTL_STRING   "{\"ct\":\"49\",\"t\":\""
 
#define BKG_SYNOPSIS_STRING   "\",\"s\":\""
 
#define BKG_BOOKING_PREFIX   "\",\"b\":["
 
#define BKG_LOCATION_PREFIX   "\"l\":\"dvb://"
 
#define BKG_DURATION_PREFIX   "--PT"
 
#define BKG_BOOKING_ENDFIX   "]}"
 
#define MAX_INT_LENGTH   32
 
#define MIN_DATA_BLOCK   32
 

Functions

MHEG5Bool MHEG5parseDvbUrl (U8BIT *buffer, U32BIT length, S_DVB_LOCATOR *dvb_loc)
 Parse a DAVIC style multiplex reference or UK-DTT inherritance format URL. This can be one of the following forms: rec://svc/cur rec://svc/def rec://svc/lcn/# dvb://original_network_id.[transport_stream_id].service_id[.*]. More...
 
int MHEG5parseLcn (U8BIT *buf, U8BIT *end)
 
MHEG5Bool MHEG5parseEncodeQPrintable (MHEG5Byte **buffer, MHEG5Int *used, MHEG5Int *allocated, MHEG5Generic *value)
 Add a value to the buffer. The value is QPrintable-encoded, which means that printable characters are copied without change, and non-printable characters (along with '=' and ''') are encoded using the equal sign and two hexadecimal digits characters which hold the numerical representation of the character in ASCII. For example, a carriage-return character is encoded as '=0D'. More...
 

Detailed Description

string parsing utility functions for MHEG5

Date
11/11/2009
Author
Adam Sturtridge

Definition in file mh5parse.c.

Macro Definition Documentation

#define BKG_BOOKING_ENDFIX   "]}"

Definition at line 44 of file mh5parse.c.

#define BKG_BOOKING_PREFIX   "\",\"b\":["

Definition at line 41 of file mh5parse.c.

#define BKG_BOOKING_TOKEN   "b"

Definition at line 33 of file mh5parse.c.

#define BKG_CRID_TTL_STRING   "{\"ct\":\"49\",\"t\":\""

Definition at line 39 of file mh5parse.c.

#define BKG_CRIDTYPE_TOKEN   "ct"

Definition at line 34 of file mh5parse.c.

#define BKG_DURATION_PREFIX   "--PT"

Definition at line 43 of file mh5parse.c.

#define BKG_DVB_TOKEN   "dvb://"

Definition at line 37 of file mh5parse.c.

#define BKG_LOCATION_PREFIX   "\"l\":\"dvb://"

Definition at line 42 of file mh5parse.c.

#define BKG_LOCATION_TOKEN   "l"

Definition at line 36 of file mh5parse.c.

#define BKG_SYNOPSIS_STRING   "\",\"s\":\""

Definition at line 40 of file mh5parse.c.

#define BKG_SYNOPSIS_TOKEN   "s"

Definition at line 35 of file mh5parse.c.

#define BKG_TITLE_TOKEN   "t"

Definition at line 32 of file mh5parse.c.

#define MAX_INT_LENGTH   32

Definition at line 46 of file mh5parse.c.

#define MIN_DATA_BLOCK   32

Definition at line 47 of file mh5parse.c.

Function Documentation

MHEG5Bool MHEG5parseDvbUrl ( U8BIT buffer,
U32BIT  length,
S_DVB_LOCATOR dvb_loc 
)

Parse a DAVIC style multiplex reference or UK-DTT inherritance format URL. This can be one of the following forms: rec://svc/cur rec://svc/def rec://svc/lcn/# dvb://original_network_id.[transport_stream_id].service_id[.*].

Parameters
bufferPointer to character buffer containing the URL string
lengthLength of character buffer
multiplexRefMultiplex reference extracted from the URL string
Returns
MHEG5TRUE if URL could be decoded, else MHEG5FALSE

Definition at line 153 of file mh5parse.c.

MHEG5Bool MHEG5parseEncodeQPrintable ( MHEG5Byte **  buffer,
MHEG5Int used,
MHEG5Int allocated,
MHEG5Generic value 
)

Add a value to the buffer. The value is QPrintable-encoded, which means that printable characters are copied without change, and non-printable characters (along with '=' and ''') are encoded using the equal sign and two hexadecimal digits characters which hold the numerical representation of the character in ASCII. For example, a carriage-return character is encoded as '=0D'.

Parameters
bufferBuffer to add the value to
usedNumber of characters used in the buffer
allocatedNumber of characters allocated for the buffer
valueThe value to append
Returns
MHEG5TRUE if the value was added, MHEG5FALSE otherwise

Definition at line 729 of file mh5parse.c.

int MHEG5parseLcn ( U8BIT buf,
U8BIT end 
)

Definition at line 267 of file mh5parse.c.