rvrandomgenerator.h

来自「基于h323协议的软phone」· C头文件 代码 · 共 55 行

H
55
字号
/***********************************************************************
Filename   : rvrandomgenerator.h
Description: Random number generator
************************************************************************
        Copyright (c) 2001 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.
***********************************************************************/
#ifndef RV_RANDOMGENERATOR_H
#define RV_RANDOMGENERATOR_H

#include "rvtypes.h"
#include "rverror.h"

typedef RvUint32 RvRandom;

#define RV_RAND_MAX (0xf777)


typedef struct
{
	RvRandom state; /* State of the random generator's seed value */
} RvRandomGenerator;


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

RVCOREAPI RvStatus RVCALLCONV
RvRandomGeneratorConstruct(IN RvRandomGenerator* r, IN RvRandom seed);

#define RvRandomGeneratorDestruct(_r) ((_r)->state = RV_OK)

#define RvRandomGeneratorGetMax(_r) (RV_RAND_MAX)

RVCOREAPI RvStatus RVCALLCONV
RvRandomGeneratorGetValue(IN RvRandomGenerator* r, OUT RvRandom* value);


#if defined(__cplusplus)
}
#endif 

#endif /* RV_RANDOMGENERATOR_H */

⌨️ 快捷键说明

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