⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mlist.h

📁 基于h323协议的软phone
💻 H
字号:
/*
***********************************************************************************

NOTICE:
This document contains information that is proprietary to RADVISION LTD..
No part of this publication may be reproduced in any form whatsoever without
written prior approval by RADVISION LTD..

RADVISION LTD. reserves the right to revise this publication and make changes
without obligation to notify any person of such revisions or changes.

***********************************************************************************
*/

#ifndef _MLIST_H
#define _MLIST_H

#include "ra.h"

#ifdef __cplusplus
extern "C" {
#endif

/* MLIST element pointer declaration */
typedef void *LISTElement;

RV_DECLARE_HANDLE(HLIST); /* list handler */


/************************************************************************
 * mlistConstruct
 * purpose: Create an MLIST object
 * input  : elemSize            - Size of elements in the MLIST in bytes
 *          maxNumOfElements    - Number of elements in MLIST
 *          name                - Name of MLIST (used in log messages)
 * output : none
 * return : handle to MLIST constructed on success
 *          NULL on failure
 ************************************************************************/
HLIST mlistConstruct(
    IN int          elemSize,
    IN int          maxNumOfElements,
    IN const char*  name);


/************************************************************************
 * mlistDestruct
 * purpose: Free memort acquired by MLIST
 * input  : mList   - MLIST handle
 * output : none
 * return : none
 ************************************************************************/
void mlistDestruct(IN HLIST mList);


/************************************************************************
 * mlistAddElement
 * purpose: Add an empty list element. This element is a list by its own.
 *          It can be linked to another list using mlistInsert()
 * input  : mList   - MLIST handle
 * output : none
 * return : Handle of new list element on success
 *          NULL on failure
 ************************************************************************/
LISTElement mlistAddElement(IN HLIST mList);


/************************************************************************
 * mlistInsert
 * purpose: Insert an element into a list. The inserted item shouldn't
 *          belong to any list (i.e. - it was just created using
 *          mlistAddElement).
 * input  : destListElem    - Destination list element. The inserted
 *                            item is added before or after this element
 *          insertedElem    - The item inserted to the list
 *          insertAfter     - RV_TRUE if element should be inserted after the
 *                            destination element, RV_FALSE if it should be
 *                            inserted before it
 * output : none
 * return : Non-negative value on success
 *          Negative value on failure
 * note   : Both elements should be in the same MLIST!
 ************************************************************************/
int mlistInsert(
    IN LISTElement  destListElem,
    IN LISTElement  insertedElem,
    IN RvBool       insertAfter);


/************************************************************************
 * mlistDeleteElement
 * purpose: Delete a single element from a list, fixing all connection of
 *          that list.
 * input  : mList       - MLIST to use
 *          deletedElem - Element to delete
 * output : none
 * return : Non-negative value on success
 *          Negative value on failure
 ************************************************************************/
int mlistDeleteElement(
    IN HLIST        mList,
    IN LISTElement  deletedElem);


/************************************************************************
 * mlistDeleteList
 * purpose: Delete a list of connected elements from MLIST
 * input  : mList       - MLIST to use
 *          element     - Element in the list to delete
 * output : none
 * return : Non-negative value on success
 *          Negative value on failure
 ************************************************************************/
int mlistDeleteList(
    IN HLIST        mList,
    IN LISTElement  element);


/************************************************************************
 * mlistNext
 * purpose: Get next element from a list
 * input  : element - Current element in list
 * output : none
 * return : Handle of the next element on success
 *          NULL on failure (when current element is the tail of the list)
 ************************************************************************/
LISTElement mlistNext(IN LISTElement element);


/************************************************************************
 * mlistPrev
 * purpose: Get previous element from a list
 * input  : element - Current element in list
 * output : none
 * return : Handle of the previous element on success
 *          NULL on failure (when current element is the head of the list)
 ************************************************************************/
LISTElement mlistPrev(IN LISTElement element);




#ifdef __cplusplus
}
#endif


#endif  /* MLIST_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -