UDK 3.2.7 C/C++ API Reference
rtl/random.h
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
00002 /*************************************************************************
00003  *
00004  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
00005  *
00006  * Copyright 2000, 2010 Oracle and/or its affiliates.
00007  *
00008  * OpenOffice.org - a multi-platform office productivity suite
00009  *
00010  * This file is part of OpenOffice.org.
00011  *
00012  * OpenOffice.org is free software: you can redistribute it and/or modify
00013  * it under the terms of the GNU Lesser General Public License version 3
00014  * only, as published by the Free Software Foundation.
00015  *
00016  * OpenOffice.org is distributed in the hope that it will be useful,
00017  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  * GNU Lesser General Public License version 3 for more details
00020  * (a copy is included in the LICENSE file that accompanied this code).
00021  *
00022  * You should have received a copy of the GNU Lesser General Public License
00023  * version 3 along with OpenOffice.org.  If not, see
00024  * <http://www.openoffice.org/license.html>
00025  * for a copy of the LGPLv3 License.
00026  *
00027  ************************************************************************/
00028 
00029 #ifndef _RTL_RANDOM_H_
00030 #define _RTL_RANDOM_H_
00031 
00032 #include <sal/types.h>
00033 
00034 #ifdef __cplusplus
00035 extern "C" {
00036 #endif
00037 
00038 /*========================================================================
00039  *
00040  * rtlRandom interface.
00041  *
00042  *======================================================================*/
00045 typedef void* rtlRandomPool;
00046 
00047 
00050 enum __rtl_RandomError
00051 {
00052     rtl_Random_E_None,
00053     rtl_Random_E_Argument,
00054     rtl_Random_E_Memory,
00055     rtl_Random_E_Unknown,
00056     rtl_Random_E_FORCE_EQUAL_SIZE = SAL_MAX_ENUM
00057 };
00058 
00061 typedef enum __rtl_RandomError rtlRandomError;
00062 
00063 
00067 SAL_DLLPUBLIC rtlRandomPool SAL_CALL rtl_random_createPool (void) SAL_THROW_EXTERN_C();
00068 
00069 
00074 SAL_DLLPUBLIC void SAL_CALL rtl_random_destroyPool (
00075     rtlRandomPool Pool
00076 ) SAL_THROW_EXTERN_C();
00077 
00078 
00085 SAL_DLLPUBLIC rtlRandomError SAL_CALL rtl_random_addBytes (
00086     rtlRandomPool  Pool,
00087     const void    *Buffer,
00088     sal_Size       Bytes
00089 ) SAL_THROW_EXTERN_C();
00090 
00091 
00098 SAL_DLLPUBLIC rtlRandomError SAL_CALL rtl_random_getBytes (
00099     rtlRandomPool  Pool,
00100     void          *Buffer,
00101     sal_Size       Bytes
00102 ) SAL_THROW_EXTERN_C();
00103 
00104 /*========================================================================
00105  *
00106  * The End.
00107  *
00108  *======================================================================*/
00109 
00110 #ifdef __cplusplus
00111 }
00112 #endif
00113 
00114 #endif /* _RTL_RANDOM_H_ */
00115 
00116 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines