1
0
Fork 0
mirror of git://git.psyc.eu/libpsyc synced 2024-08-15 03:19:02 +00:00

parser: fixes routing-only mode, set valueParsed & valueLength for data as well; render: added support for rendering raw content

This commit is contained in:
tg(x) 2011-05-06 00:13:37 +02:00
parent fea30e3688
commit fd5d886053
6 changed files with 116 additions and 46 deletions

View file

@ -39,12 +39,12 @@ typedef enum
typedef enum
{
PSYC_PART_RESET = -1,
PSYC_PART_ROUTING,
PSYC_PART_LENGTH,
PSYC_PART_CONTENT,
PSYC_PART_METHOD,
PSYC_PART_DATA,
PSYC_PART_END,
PSYC_PART_ROUTING = 0,
PSYC_PART_LENGTH = 1,
PSYC_PART_CONTENT = 2,
PSYC_PART_METHOD = 3,
PSYC_PART_DATA = 4,
PSYC_PART_END = 5,
} psycPart;
/**

View file

@ -56,6 +56,7 @@ typedef struct
psycHeader entity; ///< Entity header.
psycString method;
psycString data;
psycString content;
size_t routingLength; ///< Length of routing part.
size_t contentLength; ///< Length of content part.
size_t length; ///< Total length of packet.
@ -135,4 +136,11 @@ psycPacket psyc_newPacket2 (psycModifier *routing, size_t routinglen,
const char *data, size_t datalen,
psycPacketFlag flag);
psycPacket psyc_newPacketContent (psycHeader *routing, psycString *content,
psycPacketFlag flag);
psycPacket psyc_newPacketContent2 (psycModifier *routing, size_t routinglen,
const char *content, size_t contentlen,
psycPacketFlag flag);
#endif // PSYC_PACKET_H

View file

@ -4,7 +4,7 @@
*
* All parsing functions and the definitions they use are
* defined in this file.
*/
*/
/**
* @defgroup parser Parsing Functions