亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? rvpqueue.h

?? 基于h323協議的軟phone
?? H
字號:
/***********************************************************************
Filename   : rvpqueue.h
Description: rvpqueue header file
************************************************************************
      Copyright (c) 2001,2002 RADVISION Inc. and RADVISION Ltd.
************************************************************************
NOTICE:
This document contains information that is confidential and proprietary
to RADVISION Inc. and RADVISION Ltd.. No part of this document may be
reproduced in any form whatsoever without written prior approval by
RADVISION Inc. or RADVISION Ltd..

RADVISION Inc. and RADVISION Ltd. reserve the right to revise this
publication and make changes without obligation to notify any person of
such revisions or changes.
***********************************************************************/
/*$
{package:
	{name: PQueue}
	{superpackage: CUtils}
	{include: rvpqueue.h}
	{description:	
		{p: This module provides functions for creating and manipulating
			binary heap priority queues. Memory for the pool will be allocated
			and freed via callback functions.}
		{p: There are three types of pools:}
		{bulletlist:
			{item:  FIXED: This creates a fixed priority queue. The size
					may only be changed with the RvPQueueChangeSize function.}
			{item:  EXPANDING: This creates a priority queue which expands as
					needed. When the priority queue runs out of space is will
					allocate a new space double the old size and release the old
					sace. The size may also be changed with the RvPQueueChangeSize
					function.}
			{item:  DYNAMIC: This creates a priority queue which expands exactly
					like an EXPANDING priority queue but also has the ability to
					reduce its size. When only 25% of the priority queue is in
					use, a new space 50% the old size will be allocated and the
					old space will be released. The size may also be changed with
					the RvPQueueChangeSize function. The size will never be reduced
					below the starting size.}
		}
	}
	{notes:
		{note:  This module does no locking at all. The locking of the
				priority queue is the responsibility of the user.}
	}
}
$*/
#ifndef RV_PQUEUE_H
#define RV_PQUEUE_H

#include "rvtypes.h"

/*$
{type:
	{name: RvPQueueFuncs}
	{superpackage: PQueue}
	{include: rvpqueue.h}
	{description:	
		{p: A structure containing callback information for a priority queue. This structure
			must be completely filled out before passing it to RvPQueueConstruct.}
		{p: The memalloc and memfree callbacks will be used to allocate and release
			memory used for the priority queue.}
		{p: The itemcmp callback is the user defined operation that determines how the
			priority queue sorts the items in the queue.}
		{p: The newindex callback is a call that is made whenever an item is moved in the
			priority queue. This allows the item to save its current position in case
			it needs to remove itself from the priority queue.}
	}
	{attributes scope="public":
		{attribute: {t: void *()(RvSize_t size, void *data)} {n: memalloc} {d: Callback to allocate size bytes of memory. Return pointer to memory or NULL for failure.}}
		{attribute: {t: void  ()(void *ptr, void *data} {n: memfree} {d: Callback to free the memory at ptr.}}
		{attribute: {t: RvBool ()(void *ptr1, void *ptr2)} {n: itemcmp} {d: Callback to compare two items. Return RV_TRUE if ptr1 is higher priority, else RV_FALSE.}}
		{attribute: {t: void  ()(void *item, RvSize_t index)} {n: newindex} {d: Callback to notify item of new index value.}}
		{attribute: {t: void *} {n: memallocdata} {d: User data parameter passed into memalloc.}}
		{attribute: {t: void *} {n: memfreedata} {d: User data parameter passed into memfree.}}
	}
}
$*/
typedef struct {
	void  *(*memalloc)(RvSize_t size, void *data);  /* Allocate memory for heap. Return pointer to memory, NULL = failed. */
	void   (*memfree)(void *ptr, void *data);       /* Free memory allocated by memalloc. */
	RvBool (*itemcmp)(void *ptr1, void *ptr2);      /* Compare 2 items, return RV_TRUE if ptr1 higher priority, else RV_FALSE. */
	void   (*newindex)(void *item, RvSize_t index); /* Store new index for item, use this for removing items. */
	void *memallocdata;    /* User data parameter passed into memalloc */
	void *memfreedata;     /* User data parameter passed into memfree */
} RvPQueueFuncs;

/*$
{type:
	{name: RvPQueue}
	{superpackage: PQueue}
	{include: rvpqueue.h}
	{description:	
		{p: An priority queue object.}
	}
}
$*/
typedef struct {
	RvSize_t startsize;      /* Starting size of queue (heap), also is minimum size */
	RvSize_t cursize;        /* Current size of queue (heap) */
	RvInt qtype;             /* type of queue: see RV_PQUEUE_TYPE_ */
	RvPQueueFuncs callbacks; /* User defined function callbacks */
	RvSize_t numitems;       /* Number or items currently in the heap */
	void **heap;             /* Actual heap array (which will be allocated) */
} RvPQueue;

/* Priority Queue Types */
/*   FIXED: heap stays fixed at starting size */
/*   EXPANDING: heap size is increased by a factor of 2 and reallocated when heap is full */
/*   DYNAMIC: heap size is reduced by a factor of 2 (min of startsize) when heap only 25% full */
#define RV_PQUEUE_TYPE_FIXED RvIntConst(0)
#define RV_PQUEUE_TYPE_EXPANDING RvIntConst(1)
#define RV_PQUEUE_TYPE_DYNAMIC RvIntConst(2)

#if defined(__cplusplus)
extern "C" {
#endif 

/* Prototypes: See documentation blocks below for details. */
RvPQueue *RvPQueueConstruct(RvPQueue *pqueue, RvInt qtype, RvSize_t startsize, RvPQueueFuncs *callbacks);
void RvPQueueDestruct(RvPQueue *pqueue);
void *RvPQueuePut(RvPQueue *pqueue, void *newitem);
void *RvPQueueGet(RvPQueue *pqueue);
void *RvPQueuePeek(RvPQueue *pqueue);
RvSize_t RvPQueueNumItems(RvPQueue *pqueue);
RvSize_t RvPQueueSize(RvPQueue *pqueue);
RvSize_t RvPQueueChangeSize(RvPQueue *pqueue, RvSize_t newsize);
void RvPQueueClear(RvPQueue *pqueue);
void *RvPQueueRemove(RvPQueue *pqueue, RvSize_t itemindex);

#if defined(RV_TEST_CODE)
void RvPQueueTest(void);
#endif /* RV_TEST_CODE */

#if defined(__cplusplus)
}
#endif

/* Function Docs */
/*$
{function:
	{name: RvPQueueConstruct}
	{superpackage: PQueue}
	{include: rvpqueue.h}
	{description:
		{p: Constructs a priority queue.}
	}
	{proto: RvPQueue *RvPQueueConstruct(RvPQueue *pqueue, RvInt qtype, RvSize_t startsize, RvPQueueFuncs *callbacks);}
	{params:
		{param: {n: pqueue} {d: Pointer to priority queue object to construct.}}
		{param: {n: qtype} {d: The type of priority queue: RV_PQUEUE_TYPE_FIXED, RV_PQUEUE_TYPE_EXPANDING, or RV_PQUEUE_TYPE_DYNAMIC.}}
		{param: {n: startsize} {d: Starting size of priority queue.}}
		{param: {n: callbacks} {d: Pointer to structure with callback information.}}
	}
	{returns: A pointer to the priority queue object or, if there is an error, NULL.}
	{notes:
		{note:  The callbacks structure will be copied so there is no need to maintain this
				structure after construction.}
		{note:  If startsize is less than 2 it will be set to 2, which is the minimum size.}
		{note:  DYNAMIC priority queues will never shrink below startsize.}
	}
}
$*/
/*$
{function:
	{name: RvPQueueDestruct}
	{superpackage: PQueue}
	{include: rvpqueue.h}
	{description:
		{p: Destructs a priority queue.}
	}
	{proto: void RvPQueueDestruct(RvPQueue *pqueue);}
	{params:
		{param: {n: pqueue} {d: Pointer to priority queue object to destruct.}}
	}
	{notes:
		{note:  Any items in the priority queue when it is destructed are considered removed.}
	}
}
$*/
/*$
{function:
	{name: RvPQueuePut}
	{superpackage: PQueue}
	{include: rvpqueue.h}
	{description:
		{p: Puts a new item into a priority queue.}
	}
	{proto: void *RvPQueuePut(RvPQueue *pqueue, void *newitem);}
	{params:
		{param: {n: pqueue} {d: Pointer to priority queue to add newitem into.}}
		{param: {n: newitem} {d: Pointer to the item to put into the queue.}}
	}
	{returns: A pointer to newitem or, if the item can not be added to the priority queue, NULL.}
}
$*/
/*$
{function:
	{name: RvPQueueGet}
	{superpackage: PQueue}
	{include: rvpqueue.h}
	{description:
		{p: Gets the highest priority item from a priority queue. The item is removed from the queue.}
	}
	{proto: void *RvPQueueGet(RvPQueue *pqueue);}
	{params:
		{param: {n: pqueue} {d: Pointer to priority queue to get item from.}}
	}
	{returns: A pointer to the highest priority item or NULL if the priority queue is empty.}
}
$*/
/*$
{function:
	{name: RvPQueuePeek}
	{superpackage: PQueue}
	{include: rvpqueue.h}
	{description:
		{p: Gets the highest priority item from a priority queue. Does not remove the item from the queue.}
	}
	{proto: void *RvPQueuePeek(RvPQueue *pqueue);}
	{params:
		{param: {n: pqueue} {d: Pointer to priority queue to get item from.}}
	}
	{returns: A pointer to the highest priority item or NULL if the priority queue is empty.}
}
$*/
/*$
{function:
	{name: RvPQueueNumItems}
	{superpackage: PQueue}
	{include: rvpqueue.h}
	{description:
		{p: Gets number of items currently in a priority queue.}
	}
	{proto: RvSize_t RvPQueueNumItems(RvPQueue *pqueue);}
	{params:
		{param: {n: pqueue} {d: Pointer to priority queue to get number of items of.}}
	}
	{returns: The number of items in the priority queue.}
}
$*/
/*$
{function:
	{name: RvPQueueSize}
	{superpackage: PQueue}
	{include: rvpqueue.h}
	{description:
		{p: Gets the size of a priority queue.}
	}
	{proto: RvSize_t RvPQueueSize(RvPQueue *pqueue);}
	{params:
		{param: {n: pqueue} {d: Pointer to priority queue to get size of.}}
	}
	{returns: The size of the priority queue.}
}
$*/
/*$
{function:
	{name: RvPQueueChangeSize}
	{superpackage: PQueue}
	{include: rvpqueue.h}
	{description:
		{p: Changes the size of a priority queue.}
	}
	{proto: RvSize_t RvPQueueChangeSize(RvPQueue *pqueue, RvSize_t newsize);}
	{params:
		{param: {n: pqueue} {d: Pointer to priority queue to change the size of.}}
		{param: {n: newsize} {d: New size of priority queue.}}
	}
	{returns:   The size of the priority queue. If the size could not be changed than the
				old size of the queue is returned.}
	{notes:
		{note:  The size can not be made smaller than the current number of items in the
				priority queue.}
		{note:  The size can not be set smaller than 2.}
		{note:  For DYNAMIC priority queues this value replaces the startsize as
				the minimum size of the priority queue.}
	}
}
$*/
/*$
{function:
	{name: RvPQueueClear}
	{superpackage: PQueue}
	{include: rvpqueue.h}
	{description:
		{p: Clears all items from a priority queue.}
	}
	{proto: void RvPQueueClear(RvPQueue *pqueue);}
	{params:
		{param: {n: pqueue} {d: Pointer to priority queue to clear.}}
	}
	{notes:
		{note:  For DYNAMIC priority queues, their size will shrink back to
				their minimum size, which is their starting size unless it was
				changed with a call to RvPQueueChangeSize.}
	}
}
$*/
/*$
{function:
	{name: RvPQueueRemove}
	{superpackage: PQueue}
	{include: rvpqueue.h}
	{description:
		{p: Removes an item from a priority queue. The item is specified by its
			index which it is given via the newindex callback. }
	}
	{proto: void *RvPQueueRemove(RvPQueue *pqueue, RvSize_t itemindex);}
	{params:
		{param: {n: pqueue} {d: Pointer to priority queue to remove item from.}}
		{param: {n: itemindex} {d: Index of the item to be removed.}}
	}
	{returns: A pointer to item that has been removed from the priority queue or NULL there is an error.}
}
$*/

#endif /* RV_PQUEUE_H */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
蜜臀久久久99精品久久久久久| 国产精品毛片无遮挡高清| 性久久久久久久久| 欧美福利一区二区| 奇米四色…亚洲| 亚洲精品一区在线观看| 成人在线视频一区二区| 亚洲色图在线视频| 欧美午夜宅男影院| 美女诱惑一区二区| 国产欧美日韩三级| 色综合中文综合网| 国产一区二区三区四区五区美女| 精品动漫一区二区三区在线观看| 国产原创一区二区三区| 国产免费成人在线视频| 91免费在线播放| 午夜久久久影院| 精品福利av导航| 91丨九色丨国产丨porny| 三级亚洲高清视频| 国产三级精品三级在线专区| 色美美综合视频| 美女精品一区二区| 国产精品久久国产精麻豆99网站| 色综合一个色综合亚洲| 日本亚洲最大的色成网站www| 久久综合久色欧美综合狠狠| 91网址在线看| 久久精品国产一区二区三| 中文字幕一区二区三中文字幕| 欧美日韩成人在线| 国产精品亚洲午夜一区二区三区| 日韩毛片精品高清免费| 欧美一区二区精品| 一本一道久久a久久精品| 蜜臀av一区二区在线观看 | 欧美一二三四在线| av在线不卡电影| 日韩精品亚洲一区| 亚洲免费资源在线播放| 欧美va天堂va视频va在线| 99精品黄色片免费大全| 精品一区二区av| 亚洲午夜久久久久中文字幕久| 国产亚洲欧洲一区高清在线观看| 色猫猫国产区一区二在线视频| 老司机免费视频一区二区| 亚洲人午夜精品天堂一二香蕉| 精品少妇一区二区三区视频免付费 | 欧美aaaaa成人免费观看视频| 国产精品久久久久久久午夜片| 日韩视频一区二区在线观看| 91麻豆6部合集magnet| 国产乱子伦一区二区三区国色天香 | 日韩黄色在线观看| √…a在线天堂一区| 久久网站最新地址| 91精品国产综合久久小美女| 91精彩视频在线观看| 成人网在线播放| 国产成人精品影视| 精品一区二区综合| 美日韩一级片在线观看| 日av在线不卡| 日本欧美加勒比视频| 亚洲第一精品在线| 亚洲成人免费电影| 午夜不卡av在线| 亚洲电影你懂得| 亚洲444eee在线观看| 亚欧色一区w666天堂| 香港成人在线视频| 亚洲成人自拍一区| 午夜一区二区三区在线观看| 亚洲已满18点击进入久久| 樱桃国产成人精品视频| 一区二区在线观看免费视频播放 | 精品少妇一区二区三区在线视频 | 久久久.com| 国产色婷婷亚洲99精品小说| 精品成人一区二区| 久久久精品黄色| 国产精品久久三| 中文字幕在线不卡一区二区三区| 国产精品传媒入口麻豆| 中文字幕亚洲欧美在线不卡| 亚洲欧美日本在线| 午夜视频一区在线观看| 日韩vs国产vs欧美| 激情深爱一区二区| 国产成人日日夜夜| 91视视频在线观看入口直接观看www | 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av | 91精品国产乱码久久蜜臀| 欧美一区二区三区男人的天堂| 欧美不卡在线视频| 日本一区二区高清| 伊人婷婷欧美激情| 奇米精品一区二区三区在线观看 | 91精品国产91久久久久久最新毛片 | 激情欧美一区二区| 成人精品免费网站| 日本精品一级二级| 91精品国产综合久久久久久久 | 欧美系列日韩一区| 日韩一区二区三区三四区视频在线观看| 欧美大肚乱孕交hd孕妇| 国产日韩精品一区二区三区在线| 国产精品网曝门| 亚洲在线观看免费视频| 免费成人你懂的| heyzo一本久久综合| 欧美日韩二区三区| 久久久久久久电影| 亚洲成av人片在线| 国产福利一区二区三区视频| 色屁屁一区二区| 精品国产成人系列| 亚洲精品写真福利| 精品一区二区成人精品| 91精品福利视频| 国产片一区二区| 图片区小说区国产精品视频| 国产成人h网站| 在线不卡的av| 国产精品成人午夜| 狠狠色狠狠色综合| 欧美日韩国产综合一区二区三区| 国产午夜亚洲精品理论片色戒| 亚洲一区在线观看网站| 国产99久久久精品| 日韩欧美国产一二三区| 亚洲精品视频免费看| 国产乱码精品一区二区三区忘忧草| 色综合视频一区二区三区高清| 精品久久久久久久人人人人传媒 | 免费精品视频在线| 日本乱人伦aⅴ精品| 中文字幕精品综合| 麻豆91在线播放免费| 一本一道久久a久久精品| 国产视频在线观看一区二区三区 | 视频一区二区三区中文字幕| 成人av网址在线| 精品欧美乱码久久久久久1区2区| 亚洲三级在线播放| 丰满放荡岳乱妇91ww| 日韩欧美综合一区| 午夜精品一区二区三区免费视频| 91在线国产观看| 国产无人区一区二区三区| 麻豆精品视频在线观看视频| 在线观看日韩av先锋影音电影院| 国产精品久久久久久久久免费丝袜 | 成人av高清在线| 久久一夜天堂av一区二区三区| 午夜私人影院久久久久| 色综合天天在线| 中文字幕亚洲在| 成人av免费在线播放| 国产精品美女久久久久久久网站| 国产成人午夜电影网| 国产性色一区二区| 国产乱对白刺激视频不卡| 精品精品国产高清一毛片一天堂| 日本伊人色综合网| 欧美一区二区三区人| 热久久久久久久| 日韩美女一区二区三区四区| 老色鬼精品视频在线观看播放| 日韩欧美一级精品久久| 久久精品国产99国产精品| 欧美大片日本大片免费观看| 久久99精品国产.久久久久久| 日韩精品专区在线| 国产精品一区一区三区| 国产欧美综合在线| 本田岬高潮一区二区三区| 中文字幕av不卡| 色综合欧美在线视频区| 亚洲高清视频在线| 日韩一区国产二区欧美三区| 欧美aaaaaa午夜精品| 久久色成人在线| 国产**成人网毛片九色 | 成人一区在线观看| 亚洲欧美综合色| 在线影视一区二区三区| 亚洲线精品一区二区三区| 欧美狂野另类xxxxoooo| 美女爽到高潮91| 国产亚洲人成网站| 色综合天天天天做夜夜夜夜做| 亚洲成人av电影在线| 日韩网站在线看片你懂的| 成人动漫一区二区| 一级日本不卡的影视| 日韩精品一区二区三区中文不卡 | 成人黄色在线视频|