WebSphere Message Brokers
File: as08140_
Writer: Lorraine Waitt

Reference topic

This build: July 31, 2007 21:37:55

cpiNextParserEncoding

Purpose

Optional function to return the encoding of data owned by the next parser class in the chain, if any.

Defined In Type Member
CPI_VFT Optional iFpNextParserEncoding

Syntax

int cpiNextParserEncoding(
  CciParser*   parser,
  CciContext*  context);

Parameters

parser
The address of the parser object (input).
context
The address of the context owned by the parser object (input).

Return values

The encoding of the data is returned. If it is not known, zero might be returned and default encoding will apply.

Sample

This example is taken from the sample parser file BipSampPluginParser.c (lines 794 to 813).

int cpiNextParserEncoding(
  CciParser*  parser,
  CciContext* context
){
  PARSER_CONTEXT_ST* pc = (PARSER_CONTEXT_ST *)context ;
  int                encoding = 0;

  if (pc->trace) {
    fprintf(pc->tracefile, "PLUGIN: -> cpiNextParserEncoding() parser=0x%x context=0x%x\n",
            parser, context);
    fflush(pc->tracefile);
  }

  if (pc->trace) {
    fprintf(pc->tracefile, "PLUGIN: <- cpiNextParserEncoding()\n");
    fflush(pc->tracefile);
  }

  return encoding;
}
Related concepts
User-defined parsers
User-defined extensions overview
Related tasks
Creating a parser in C
Related reference
cpiNextParserClassName
cpiNextParserCodedCharSetId
C parser implementation functions
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2007Copyright IBM Corporation 1999, 2007. All Rights Reserved.
This build: July 31, 2007 21:37:55

as08140_ This topic's URL is: