Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

newssvcdec_impl.cpp File Reference

#include "../dab_datagroup_decoder/dabdatagroupdecoder.h"
#include "../../log/cpplog.h"
#include "newssvcdec_impl.h"

Functions

NEWS_SVC_DEC_decoder_t NEWS_SVC_DEC_createDec (NEWS_SVC_DEC_cb *update, unsigned long max_memory, unsigned long *max_objects, unsigned long extended_header_len, void *arg)
void NEWS_SVC_DEC_deleteDec (NEWS_SVC_DEC_decoder_t decoder)
 Delete a news service decoder instance.

unsigned long NEWS_SVC_DEC_putData (NEWS_SVC_DEC_decoder_t decoder, const unsigned long len, const unsigned char *buf)
 Put data into news decoder.

int NEWS_SVC_DEC_IMPL_garbage_collection (NEWS_SVC_DEC_IMPL_t *dec, unsigned long objs_to_free)
int NEWS_SVC_DEC_get_news_object (NEWS_SVC_DEC_decoder_t decoder, unsigned short object_id, unsigned long *extended_header_len, unsigned long *len, unsigned char *nml)
 Get a news object by id.

int NEWS_SVC_DEC_watch_objects (NEWS_SVC_DEC_decoder_t decoder, unsigned long number_of_elements, NEWS_SVC_DEC_obj_availability_t *watch_list)
 Set a watch on the specified objects.

int NEWS_SVC_DEC_get_object_availability (NEWS_SVC_DEC_decoder_t decoder, unsigned long number_of_elements, NEWS_SVC_DEC_obj_availability_t *query_list)
 Query the availability of objects.

int NEWS_SVC_DEC_keep_in_cache (NEWS_SVC_DEC_decoder_t decoder, unsigned long number_of_elements, unsigned short *object_ids)
 Set ids of objects to be kept in cache.

void NEWS_SVC_DEC_IMPL_printObjList (NEWS_SVC_DEC_IMPL_t *dec)

Variables

int showDdNewsSvcDecInfo
 techidee GmbH Projekt: NewsBox Autor: Thomas Fruehwald

int showDdNewsSvcDecErr

Function Documentation

NEWS_SVC_DEC_decoder_t NEWS_SVC_DEC_createDec NEWS_SVC_DEC_cb   update,
unsigned long    max_memory,
unsigned long *    max_objects,
unsigned long    extended_header_len,
void *    arg
 

void NEWS_SVC_DEC_deleteDec NEWS_SVC_DEC_decoder_t    decoder
 

Delete a news service decoder instance.

call this at shutdown time

Parameters:
decoder  news service decoder instance (as obtained by NEWS_SVC_DEC_createDec)
Return values:
0  on failure
1  on success

int NEWS_SVC_DEC_get_news_object NEWS_SVC_DEC_decoder_t    decoder,
unsigned short    object_id,
unsigned long *    extended_header_len,
unsigned long *    len,
unsigned char *    nml
 

Get a news object by id.

The object with id object_id will be written to nml and len will be set to its actual length in bytes (at most 2044).

Parameters:
decoder  news service decoder instance (as obtained by NEWS_SVC_DEC_createDec)
object_id  NML object id (0000-FFFF)
extended_header_len  (out) length in bytes of extended header field of this news service (as signalled in SDC)
len  (out) length in bytes of NML object
nml  (out) the complete NML object (including NML header)
Return values:
0  on failure

int NEWS_SVC_DEC_get_object_availability NEWS_SVC_DEC_decoder_t    decoder,
unsigned long    number_of_elements,
NEWS_SVC_DEC_obj_availability_t   query_list
 

Query the availability of objects.

Specify a list of objects (only the object ids have to be filled in) you want to query in query_list.

on return the status field of query_list will be set.

Parameters:
decoder  news service decoder instance (as obtained by NEWS_SVC_DEC_createDec)
number_of_elements  length of SVCMGR_UI_object_availability_t array
query_list  (inout) list of objects for which the status is queried
Return values:
0  on failure

int NEWS_SVC_DEC_IMPL_garbage_collection NEWS_SVC_DEC_IMPL_t   dec,
unsigned long    objs_to_free
 

void NEWS_SVC_DEC_IMPL_printObjList NEWS_SVC_DEC_IMPL_t   dec
 

int NEWS_SVC_DEC_keep_in_cache NEWS_SVC_DEC_decoder_t    decoder,
unsigned long    number_of_elements,
unsigned short *    object_ids
 

Set ids of objects to be kept in cache.

Tell the memory management that the listed elements should be kept in memory (if possible).

Candidates for keeping in memory are (in order of importance):

  1. currently viewed object
  2. parents of currently viewed object
  3. children of currently viewed (menu) object
  4. "favorite" objects
Note:
Every call to this function overwrites the last keep-in-memory list.
Parameters:
decoder  news service decoder instance (as obtained by NEWS_SVC_DEC_createDec)
number_of_elements  length of object_id array
object_ids  list of ids of objects which should be kept in cache
Return values:
0  on failure

unsigned long NEWS_SVC_DEC_putData NEWS_SVC_DEC_decoder_t    decoder,
const unsigned long    len,
const unsigned char *    buf
 

Put data into news decoder.

The input for the news decoder consists of one complete Journaline(R) object.

Parameters:
decoder  news service decoder instance (as obtained by NEWS_SVC_DEC_createDec)
len  length in bytes of Journaline(R) object
buf  Journaline(R) object
Return values:
0  on failure

int NEWS_SVC_DEC_watch_objects NEWS_SVC_DEC_decoder_t    decoder,
unsigned long    number_of_elements,
NEWS_SVC_DEC_obj_availability_t   watch_list
 

Set a watch on the specified objects.

When the status of an object with an id that is being watched on changes, a callback is done. To avoid nested upcalls the status at the calling time is returned in the watch_list's status field.

Note:
Every call to this function overwrites the last watch list.
Parameters:
number_of_elements  length of SVCMGR_UI_object_availability_t array
decoder  news service decoder instance (as obtained by NEWS_SVC_DEC_createDec)
watch_list  (inout) list of objects for which a watch is set.
On input, the object_id field has to be specified.

On output, the status field will be filled.

Return values:
0  on failure


Variable Documentation

int showDdNewsSvcDecErr
 

int showDdNewsSvcDecInfo  
 

techidee GmbH Projekt: NewsBox Autor: Thomas Fruehwald

Compiler: gcc Modul: news object


Generated on Fri Feb 27 12:16:51 2004 for journaline_demo by doxygen1.2.18