include/alp/pdi.h File Reference


Detailed Description

Public API for the Personal Data Interchange library.

>

#include <alp/config.h>
#include <alp/types.h>
#include <alp/sysclass.h>
#include <alp/uda.h>
#include <alp/pdi_const.h>

Go to the source code of this file.

Data Structures

struct  _AlpPdiReader
 The PDI parser. More...
struct  _AlpPdiWriter
 The PDI generator. More...

Defines

#define ALP_PDI_ASCII_ENCODING   0
 consider ascii value
#define ALP_PDI_B64_ENCODING   ALP_PDI_PAV_ENCODING_BASE64
 value must be B64 encoded (write) or is B64 encoded (read)
#define ALP_PDI_B_ENCODING   ALP_PDI_PAV_ENCODING_B
 same as above but ENCODING=B in place of ENCODING=BASE64
#define ALP_PDI_BEGIN_OBJECT_EVENT_MASK   ((uint16_t) 1024)
 BEGIN reached.
#define ALP_PDI_BYPASS_LOCALE_CHAR_ENCODING   ((uint16_t) 32)
 bypass inbound/outbound default char encoding (determined via locale)
#define ALP_PDI_COMMA_FIELDS   ((uint16_t) 1)
 Consider property value can have several fields comma separated.
#define ALP_PDI_CONVERT_COMMA   ((uint16_t) 8)
 Consider property value has just one field, commas are converted to '
'.
#define ALP_PDI_CONVERT_SEMICOLON   ((uint16_t) 16)
 Consider property value has just one field, semicolons are converted to '
'.
#define ALP_PDI_DEFAULT_BUFFER_DELTA_SIZE   ((uint16_t) 0x0100)
 Delta (& minimum) size of resizable buffer.
#define ALP_PDI_DEFAULT_BUFFER_MAX_SIZE   ((uint32_t) 0x21000)
 to handle 64k unicode chars ==> 128k, and then bump this by 1 page = 4k
#define ALP_PDI_DEFAULT_FIELDS   ((uint16_t) 4)
 Accept default fields definition (dictionary information).
#define ALP_PDI_ENABLE_B   ((uint16_t) 8)
 B encoding type (in place of BASE64).
#define ALP_PDI_ENABLE_FOLDING   ((uint16_t) 1)
 Enable vObject folding mechanism.
#define ALP_PDI_ENABLE_QUOTED_PRINTABLE   ((uint16_t) 2)
 Enable Quoted Printable encoding.
#define ALP_PDI_END_OBJECT_EVENT_MASK   ((uint16_t) 2048)
 END reached.
#define ALP_PDI_EOF_EVENT_MASK   ((uint16_t) 1)
 End of file/data found.
#define ALP_PDI_ESCAPE_ENCODING   ((uint16_t) (0x8000))
 special encoding where newline are backslashed
#define ALP_PDI_ESCAPE_MULTI_FIELD_VALUES   ((uint16_t) 4)
 PalmOS 3.x compatiblity.
#define ALP_PDI_GROUP_NAME_EVENT_MASK   ((uint16_t) 2)
 A group name is found.
#define ALP_PDI_NO_ENCODING   ((uint16_t) (0x8001))
 value must not be encoded (write)
#define ALP_PDI_NO_FIELDS   ((uint16_t) 0)
 Consider property value has just one field.
#define ALP_PDI_OPEN_PARSER   ((uint16_t) 16)
 Generic parser.
#define ALP_PDI_PALM_COMPATIBILITY   (ALP_PDI_ESCAPE_MULTI_FIELD_VALUES | ALP_PDI_ENABLE_QUOTED_PRINTABLE | ALP_PDI_BYPASS_LOCALE_CHAR_ENCODING)
 PalmOS 3.x compatible generator.
#define ALP_PDI_PARAMETER_NAME_EVENT_MASK   ((uint16_t) 8)
 A parameter name is found.
#define ALP_PDI_PARAMETER_PAIR_TEST(reader, pair)   ((reader->parameterPairs[(pair) & 7] & ((uint32_t) (1) << ((uint8_t) (pair) >> 3))) != 0)
#define ALP_PDI_PARAMETER_VALUE_EVENT_MASK   ((uint16_t) 16)
 A parameter value is found.
#define ALP_PDI_PROPERTY_DEFINED_EVENT_MASK   ((uint16_t) 32)
 A property definition is found (the ':' separator is reached).
#define ALP_PDI_PROPERTY_NAME_EVENT_MASK   ((uint16_t) 4)
 A property name is found.
#define ALP_PDI_PROPERTY_TXT_ENCODING_UTF16   ((uint16_t) 1)
#define ALP_PDI_PROPERTY_VALUE_CRLF_EVENT_MASK   ((uint16_t) 4096)
 A value item is found (',' separated).
#define ALP_PDI_PROPERTY_VALUE_EVENT_MASK   ((uint16_t) 64)
 An entire property value is found.
#define ALP_PDI_PROPERTY_VALUE_FIELD_EVENT_MASK   ((uint16_t) 128)
 A value field is found (';' separated).
#define ALP_PDI_PROPERTY_VALUE_ITEM_EVENT_MASK   ((uint16_t) 256)
 A value item is found (',' separated).
#define ALP_PDI_PROPERTY_VALUE_MORE_CHARS_EVENT_MASK   ((uint16_t) 512)
 The application didn't provide a large enought buffer: more chars must be read.
#define ALP_PDI_QP_ENCODING   ALP_PDI_PAV_ENCODING_QUOTED_PRINTABLE
 value must be QP encoded (write) or is QP encoded (read)
#define ALP_PDI_RESIZABLE_BUFFER   ((uint16_t) 0xFFFF)
 Special value to indicate a resizable buffer (handle based).
#define ALP_PDI_SEMICOLON_FIELDS   ((uint16_t) 2)
 Consider property value can have several fields semicolon separated.
#define ALP_PDI_STATUS_MORE_CHARS   (ALP_CLASS_PDIUDA | 0x00050000)
 Read: All characters could not be read.
#define ALP_PDI_STATUS_NO_MORE_FIELDS   (ALP_CLASS_PDIUDA | 0x00060000)
 Read: No more value fields.
#define ALP_PDI_STATUS_NO_PROPERTY_VALUE   (ALP_CLASS_PDIUDA | 0x00040000)
 Write: A property value was expected.
#define ALP_PDI_STATUS_READ   (ALP_CLASS_PDIUDA | 0x00010000)
 Cannot read.
#define ALP_PDI_STATUS_WRITE   (ALP_CLASS_PDIUDA | 0x00020000)
 Cannot write.
#define ALP_PDI_WRITE_DATA   ((uint16_t) 0)
 No charset computation (non text values).
#define alp_pdi_write_end_object   alp_pdi_write_begin_object
#define ALP_PDI_WRITE_MULTILINE   ((uint16_t) 16)
 if present: must encode else encoding is determinated by charset
#define ALP_PDI_WRITE_TEXT   ((uint16_t) 8)
 charset computation

Typedefs

typedef uint16_t AlpErr16
 Old 16-bit alp_status_t.
typedef uint8_t AlpPdiDictionary
 A PDI dictionnary.
typedef _AlpPdiReader AlpPdiReader
 The PDI parser.
typedef _AlpPdiWriter AlpPdiWriter
 The PDI generator.

Functions

AlpPdiDictionaryalp_pdi_define_reader_dictionary (AlpPdiReader *ioReader, AlpPdiDictionary *dictionary, int disableMainDictionary)
alp_status_t alp_pdi_define_resizing (AlpPdiReader *ioReader, uint16_t deltaSize, uint32_t maxSize)
AlpPdiDictionaryalp_pdi_define_writer_dictionary (AlpPdiWriter *ioWriter, AlpPdiDictionary *dictionary, int disableMainDictionary)
alp_status_t alp_pdi_enter_object (AlpPdiReader *ioReader)
alp_status_t alp_pdi_get_object_length (AlpPdiWriter *ioWriter, uint32_t *objectLength)
alp_status_t alp_pdi_read_parameter (AlpPdiReader *ioReader)
alp_status_t alp_pdi_read_property (AlpPdiReader *ioReader)
alp_status_t alp_pdi_read_property_field (AlpPdiReader *ioReader, char **bufferPP, uint32_t bufferSize, uint16_t readMode)
alp_status_t alp_pdi_read_property_name (AlpPdiReader *ioReader)
void alp_pdi_reader_delete (AlpPdiReader **ioReader)
AlpPdiReaderalp_pdi_reader_new (AlpUDAReader *input, uint16_t version)
alp_status_t alp_pdi_set_charset (AlpPdiWriter *ioWriter, uint32_t charset)
alp_status_t alp_pdi_set_encoding (AlpPdiWriter *ioWriter, uint16_t encoding)
alp_status_t alp_pdi_write_begin_object (AlpPdiWriter *ioWriter, uint16_t objectNameID)
alp_status_t alp_pdi_write_parameter (AlpPdiWriter *ioWriter, uint16_t parameter, int parameterName)
alp_status_t alp_pdi_write_parameter_str (AlpPdiWriter *ioWriter, const char *parameterName, const char *parameterValue)
alp_status_t alp_pdi_write_property (AlpPdiWriter *ioWriter, uint16_t propertyNameID)
alp_status_t alp_pdi_write_property_binary_value (AlpPdiWriter *ioWriter, const char *buffer, uint16_t size, uint16_t options)
alp_status_t alp_pdi_write_property_fields (AlpPdiWriter *ioWriter, char *fields[], uint16_t fieldNumber, uint16_t options)
alp_status_t alp_pdi_write_property_str (AlpPdiWriter *ioWriter, const char *propertyName, uint8_t writeMode, uint8_t requiredFields)
alp_status_t alp_pdi_write_property_value (AlpPdiWriter *ioWriter, char *buffer, uint16_t options)
void alp_pdi_writer_delete (AlpPdiWriter **ioWriter)
AlpPdiWriteralp_pdi_writer_new (AlpUDAWriter *output, uint16_t version)


Generated on Wed Jul 30 07:06:40 2008 by Doxygen 1.4.6 for ALP SDK + Hiker Documentation

Copyright © 1999-2008 ACCESS CO., LTD. All rights reserved.