mirror of
git://git.psyc.eu/libpsyc
synced 2024-08-15 03:19:02 +00:00
render doc
This commit is contained in:
parent
0226b1bba7
commit
7dc8effab6
3 changed files with 46 additions and 16 deletions
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* @file psyc/parser.h
|
||||
* @brief Interface for various psyc parser functions.
|
||||
* @brief Interface for various PSYC parser functions.
|
||||
*
|
||||
* All parsing functions and the definitions they use are
|
||||
* defined in this file.
|
||||
|
|
|
@ -1,8 +1,37 @@
|
|||
#ifndef PSYC_RENDER_H
|
||||
# define PSYC_RENDER_H
|
||||
|
||||
#include "syntax.h"
|
||||
/**
|
||||
* @file psyc/render.h
|
||||
* @brief Interface for PSYC packet rendering.
|
||||
*
|
||||
* All rendering functions and the definitions they use are
|
||||
* defined in this file.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup rendering Rendering Functions
|
||||
*
|
||||
* This module contains all rendering functions.
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* Return codes for PSYC_render.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
//PSYC_RENDER_ERROR_ROUTING = -2,
|
||||
PSYC_RENDER_ERROR = -1,
|
||||
PSYC_RENDER_SUCCESS = 0,
|
||||
} PSYC_RenderRC;
|
||||
|
||||
/**
|
||||
* Render a PSYC packet into a buffer.
|
||||
*/
|
||||
PSYC_RenderRC PSYC_render(PSYC_Packet *packet, char *buffer, size_t buflen);
|
||||
|
||||
/*
|
||||
typedef enum
|
||||
{
|
||||
PSYC_RENDER_CHECK_LENGTH = 0,
|
||||
|
@ -10,17 +39,12 @@ typedef enum
|
|||
PSYC_RENDER_NO_LENGTH = 2,
|
||||
PSYC_RENDER_ROUTING = 3,
|
||||
} PSYC_RenderFlag;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
PSYC_RENDER_ERROR_ROUTING = -2,
|
||||
PSYC_RENDER_ERROR = -1,
|
||||
PSYC_RENDER_SUCCESS = 0,
|
||||
} PSYC_RenderRC;
|
||||
*/
|
||||
|
||||
/**
|
||||
* Struct for keeping render state.
|
||||
*/
|
||||
/*
|
||||
typedef struct
|
||||
{
|
||||
PSYC_RenderFlag flag; ///< flags for the renderer
|
||||
|
@ -31,9 +55,7 @@ typedef struct
|
|||
size_t length; ///< how big is the buffer we allocated
|
||||
char buffer[]; ///< OMG a C99 feature! variable size buffer!
|
||||
} PSYC_RenderState;
|
||||
|
||||
PSYC_RenderRC PSYC_render(PSYC_Packet *packet, char *buffer, size_t buflen);
|
||||
|
||||
*/
|
||||
/**
|
||||
* Initiates the state struct.
|
||||
*
|
||||
|
@ -52,3 +74,5 @@ int PSYC_renderBody(PSYC_RenderState* render,
|
|||
const char* data, size_t dlength);
|
||||
*/
|
||||
#endif // PSYC_RENDER_H
|
||||
|
||||
/** @} */ // end of rendering group
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue