00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 00002 /* 00003 * This file is part of the LibreOffice project. 00004 * 00005 * This Source Code Form is subject to the terms of the Mozilla Public 00006 * License, v. 2.0. If a copy of the MPL was not distributed with this 00007 * file, You can obtain one at http://mozilla.org/MPL/2.0/. 00008 * 00009 * This file incorporates work covered by the following license notice: 00010 * 00011 * Licensed to the Apache Software Foundation (ASF) under one or more 00012 * contributor license agreements. See the NOTICE file distributed 00013 * with this work for additional information regarding copyright 00014 * ownership. The ASF licenses this file to you under the Apache 00015 * License, Version 2.0 (the "License"); you may not use this file 00016 * except in compliance with the License. You may obtain a copy of 00017 * the License at http://www.apache.org/licenses/LICENSE-2.0 . 00018 */ 00019 00020 00021 #ifndef _OSL_CONDITION_H_ 00022 #define _OSL_CONDITION_H_ 00023 00024 #include "sal/config.h" 00025 00026 #include "osl/time.h" 00027 #include "sal/saldllapi.h" 00028 00029 #ifdef __cplusplus 00030 extern "C" { 00031 #endif 00032 00033 typedef void* oslCondition; 00034 00035 typedef enum { 00036 osl_cond_result_ok, /* successful completion */ 00037 osl_cond_result_error, /* error occurred, check osl_getLastSocketError() for details */ 00038 osl_cond_result_timeout, /* blocking operation timed out */ 00039 osl_cond_result_FORCE_EQUAL_SIZE = SAL_MAX_ENUM 00040 } oslConditionResult; 00041 00046 SAL_DLLPUBLIC oslCondition SAL_CALL osl_createCondition(void); 00047 00051 SAL_DLLPUBLIC void SAL_CALL osl_destroyCondition(oslCondition Condition); 00052 00058 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_setCondition(oslCondition Condition); 00059 00064 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_resetCondition(oslCondition Condition); 00065 00073 SAL_DLLPUBLIC oslConditionResult SAL_CALL osl_waitCondition(oslCondition Condition, const TimeValue* pTimeout); 00074 00080 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_checkCondition(oslCondition Condition); 00081 00082 #ifdef __cplusplus 00083 } 00084 #endif 00085 00086 #endif /* _OSL_CONDITION_H_ */ 00087 00088 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */