AlterOffice
AlterOffice 3.4 SDK C/C++ API Reference
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
conditn.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 
3 
4 #ifndef INCLUDED_OSL_CONDITN_H
5 #define INCLUDED_OSL_CONDITN_H
6 
7 #include "sal/config.h"
8 
9 #include "osl/time.h"
10 #include "sal/saldllapi.h"
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 typedef void* oslCondition;
17 
18 typedef enum {
19  osl_cond_result_ok, /*<! Successful completion. */
20  osl_cond_result_error, /*<! Error occurred. @see osl_getLastSocketError() */
21  osl_cond_result_timeout, /*<! Blocking operation timed out. */
24 
34 SAL_DLLPUBLIC oslCondition SAL_CALL osl_createCondition(void);
35 
40 SAL_DLLPUBLIC void SAL_CALL osl_destroyCondition(oslCondition Condition);
41 
49 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_setCondition(oslCondition Condition);
50 
56 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_resetCondition(oslCondition Condition);
57 
64 SAL_DLLPUBLIC oslConditionResult SAL_CALL osl_waitCondition(oslCondition Condition, const TimeValue* pTimeout);
65 
73 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_checkCondition(oslCondition Condition);
74 
75 #ifdef __cplusplus
76 }
77 #endif
78 
79 #endif // INCLUDED_OSL_CONDITN_H
80 
81 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Time since Jan-01-1970.
Definition: time.h:56
unsigned char sal_Bool
Definition: types.h:18
SAL_DLLPUBLIC void osl_destroyCondition(oslCondition Condition)
Free the memory used by the condition.
oslConditionResult
Definition: conditn.h:18
void * oslCondition
Definition: conditn.h:16
Definition: conditn.h:20
SAL_DLLPUBLIC sal_Bool osl_checkCondition(oslCondition Condition)
Queries the state of the condition without blocking.
SAL_DLLPUBLIC oslConditionResult osl_waitCondition(oslCondition Condition, const TimeValue *pTimeout)
Blocks if condition is not set.
Definition: conditn.h:22
Definition: conditn.h:21
SAL_DLLPUBLIC sal_Bool osl_resetCondition(oslCondition Condition)
Sets condition to False =&gt; wait() will block, check() returns False.
#define SAL_MAX_ENUM
Definition: types.h:185
SAL_DLLPUBLIC oslCondition osl_createCondition(void)
Creates a condition.
SAL_DLLPUBLIC sal_Bool osl_setCondition(oslCondition Condition)
Sets condition to True =&gt; wait() will not block, check() returns True.
Definition: conditn.h:19
#define SAL_DLLPUBLIC
Definition: saldllapi.h:14