xrtImapDataCursorInit

初始化一层 IMAP 数据值游标。

bool xrtImapDataCursorInit( ximapdatacursor* pCursor, xstrview Text );
参数说明
ximapdatacursor* pCursor游标
xstrview Text文本视图
返回:初始化一层 IMAP 数据值游标。

示例已编译验证

imapdatacursorinit obj;
xrtImapDataCursorInit(&obj, pCursor, Text);

xrtImapDataNext

读取下一 atom、number、quoted、NIL、完整 list 或行尾 literal 标记。

xmailnext xrtImapDataNext( ximapdatacursor* pCursor, ximapdataview* pValue );
参数说明
ximapdatacursor* pCursor游标
ximapdataview* pValue值
返回:读取下一 atom、number、quoted、NIL、完整 list 或行尾 literal 标记。

示例已编译验证

/* 读取下一 atom、number、quoted、NIL、完整 list 或行尾 literal 标记。 */
result = xrtImapDataNext(pCursor, pValue);

xrtImapStringWrite

解码 atom、quoted 或 NIL;查询模式返回精确字节数,容量包含末尾零字节。

bool xrtImapStringWrite( const ximapdataview* pValue, char* sOutput, size_t iCapacity, size_t* pOutputSize );
参数说明
const ximapdataview* pValue值
char* sOutput输出缓冲
size_t iCapacity容量
size_t* pOutputSize出:输出长度
返回:解码 atom、quoted 或 NIL;查询模式返回精确字节数,容量包含末尾零字节。

示例已编译验证

/* 解码 atom、quoted 或 NIL;查询模式返回精确字节数,容量包含末尾零字节。 */
result = xrtImapStringWrite(pValue, sOutput, iCapacity, pOutputSize);

xrtImapListParse

解析完整 `LIST attributes delimiter mailbox [extensions]` 响应。

bool xrtImapListParse( xstrview Text, ximaplistview* pList );
参数说明
xstrview Text文本视图
ximaplistview* pList列表对象
返回:解析完整 `LIST attributes delimiter mailbox [extensions]` 响应。

示例已编译验证

/* 解析完整 `LIST attributes delimiter mailbox [extensions]` 响应。 */
result = xrtImapListParse(Text, pList);

xrtImapFlagCursorInit

初始化完整括号 flag 列表的借用游标。

bool xrtImapFlagCursorInit( ximapflagcursor* pCursor, xstrview Flags );
参数说明
ximapflagcursor* pCursor游标
xstrview Flags标志位
返回:初始化完整括号 flag 列表的借用游标。

示例已编译验证

imapflagcursorinit obj;
xrtImapFlagCursorInit(&obj, pCursor, Flags);

xrtImapFlagNext

返回下一系统 flag、关键字或 LIST 属性。

xmailnext xrtImapFlagNext( ximapflagcursor* pCursor, xstrview* pFlag );
参数说明
ximapflagcursor* pCursor游标
xstrview* pFlag标志
返回:返回下一系统 flag、关键字或 LIST 属性。

示例已编译验证

/* 返回下一系统 flag、关键字或 LIST 属性。 */
result = xrtImapFlagNext(pCursor, pFlag);

xrtImapStatusParse

解析完整 `STATUS mailbox (name value ...)` 响应。

bool xrtImapStatusParse( xstrview Text, ximapmailboxstatusview* pStatus );
参数说明
xstrview Text文本视图
ximapmailboxstatusview* pStatus状态响应
返回:解析完整 `STATUS mailbox (name value ...)` 响应。

示例已编译验证

/* 解析完整 `STATUS mailbox (name value ...)` 响应。 */
result = xrtImapStatusParse(Text, pStatus);

xrtImapStatusCursorInit

初始化 STATUS 属性对游标。

bool xrtImapStatusCursorInit( ximapstatuscursor* pCursor, const ximapmailboxstatusview* pStatus );
参数说明
ximapstatuscursor* pCursor游标
const ximapmailboxstatusview* pStatus状态响应
返回:初始化 STATUS 属性对游标。

示例已编译验证

imapstatuscursorinit obj;
xrtImapStatusCursorInit(&obj, pCursor, pStatus);

xrtImapStatusNext

返回下一 STATUS 名称和值,未知扩展保持可见。

xmailnext xrtImapStatusNext( ximapstatuscursor* pCursor, ximapstatusitem* pItem );
参数说明
ximapstatuscursor* pCursor游标
ximapstatusitem* pItem元素
返回:返回下一 STATUS 名称和值,未知扩展保持可见。

示例已编译验证

/* 返回下一 STATUS 名称和值,未知扩展保持可见。 */
result = xrtImapStatusNext(pCursor, pItem);

xrtImapSearchCursorInit

初始化完整 `SEARCH [id ...] [(MODSEQ value)]` 响应游标。

bool xrtImapSearchCursorInit( ximapsearchcursor* pCursor, xstrview Text );
参数说明
ximapsearchcursor* pCursor游标
xstrview Text文本视图
返回:初始化完整 `SEARCH [id ...] [(MODSEQ value)]` 响应游标。

示例已编译验证

imapsearchcursorinit obj;
xrtImapSearchCursorInit(&obj, pCursor, Text);

xrtImapSearchNext

返回下一 SEARCH ID 或 MODSEQ,不展开和分配数组。

xmailnext xrtImapSearchNext( ximapsearchcursor* pCursor, ximapsearchitem* pItem );
参数说明
ximapsearchcursor* pCursor游标
ximapsearchitem* pItem元素
返回:返回下一 SEARCH ID 或 MODSEQ,不展开和分配数组。

示例已编译验证

/* 返回下一 SEARCH ID 或 MODSEQ,不展开和分配数组。 */
result = xrtImapSearchNext(pCursor, pItem);

xrtImapESearchParse

解析 ESEARCH correlator、UID 指示器和返回数据区。

bool xrtImapESearchParse( xstrview Text, ximapesearchview* pSearch );
参数说明
xstrview Text文本视图
ximapesearchview* pSearch搜索
返回:解析 ESEARCH correlator、UID 指示器和返回数据区。

示例已编译验证

/* 解析 ESEARCH correlator、UID 指示器和返回数据区。 */
result = xrtImapESearchParse(Text, pSearch);

xrtImapESearchCursorInit

初始化 ESEARCH 返回数据对游标。

bool xrtImapESearchCursorInit( ximapesearchcursor* pCursor, const ximapesearchview* pSearch );
参数说明
ximapesearchcursor* pCursor游标
const ximapesearchview* pSearch搜索
返回:初始化 ESEARCH 返回数据对游标。

示例已编译验证

imapesearchcursorinit obj;
xrtImapESearchCursorInit(&obj, pCursor, pSearch);

xrtImapESearchNext

返回下一 ESEARCH 名称和值;ALL 等集合保持原始 atom 视图。

xmailnext xrtImapESearchNext( ximapesearchcursor* pCursor, ximapesearchitem* pItem );
参数说明
ximapesearchcursor* pCursor游标
ximapesearchitem* pItem元素
返回:返回下一 ESEARCH 名称和值;ALL 等集合保持原始 atom 视图。

示例已编译验证

/* 返回下一 ESEARCH 名称和值;ALL 等集合保持原始 atom 视图。 */
result = xrtImapESearchNext(pCursor, pItem);

xrtImapFetchParse

解析完整 `sequence FETCH (...)` 非标记响应。

bool xrtImapFetchParse( xstrview Text, ximapfetchview* pFetch );
参数说明
xstrview Text文本视图
ximapfetchview* pFetchFetch 参数
返回:解析完整 `sequence FETCH (...)` 非标记响应。

示例已编译验证

/* 解析完整 `sequence FETCH (...)` 非标记响应。 */
result = xrtImapFetchParse(Text, pFetch);

xrtImapFetchCursorInit

初始化 FETCH 属性游标;literal 正文不会进入该游标。

bool xrtImapFetchCursorInit( ximapfetchcursor* pCursor, const ximapfetchview* pFetch );
参数说明
ximapfetchcursor* pCursor游标
const ximapfetchview* pFetchFetch 参数
返回:初始化 FETCH 属性游标;literal 正文不会进入该游标。

示例已编译验证

imapfetchcursorinit obj;
xrtImapFetchCursorInit(&obj, pCursor, pFetch);

xrtImapFetchCursorContinue

在读取 literal 正文后继续解析下一行 FETCH 片段。

bool xrtImapFetchCursorContinue( ximapfetchcursor* pCursor, xstrview Text );
参数说明
ximapfetchcursor* pCursor游标
xstrview Text文本视图
返回:在读取 literal 正文后继续解析下一行 FETCH 片段。

示例已编译验证

/* 在读取 literal 正文后继续解析下一行 FETCH 片段。 */
result = xrtImapFetchCursorContinue(pCursor, Text);

xrtImapFetchNext

返回下一 FETCH 属性和值;literal 值会把 NeedMore 置真。

xmailnext xrtImapFetchNext( ximapfetchcursor* pCursor, ximapfetchitem* pItem );
参数说明
ximapfetchcursor* pCursor游标
ximapfetchitem* pItem元素
返回:返回下一 FETCH 属性和值;literal 值会把 NeedMore 置真。

示例已编译验证

/* 返回下一 FETCH 属性和值;literal 值会把 NeedMore 置真。 */
result = xrtImapFetchNext(pCursor, pItem);