
/**
 * @file: keyedevent.h
 *
 * Tento soubor je hlavickovym souborem k rozhrani pro snadnejsi pouzivani 
 * udalosti na klic. Definovane rutiny funguje podobne jako obdobne rutiny pro jine
 * objekty jadra ve Windows APPI. 
 */
 
#ifndef __KEYED_EVENT_H_
#define __KEYED_EVENT_H_

#include <windows.h>

// Pristupova prava k udalosti na klic
// Umoznuje cekani (WaitForKeyedEvent)
#define KEYEDEVENT_WAIT 0x0001
// Umoznuje probouzeni cekatelu (ReleaseKeyedEvent)
#define KEYEDEVENT_WAKE 0x0002
// Plny pristup
#define KEYEDEVENT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | KEYEDEVENT_WAIT | KEYEDEVENT_WAKE)

// Semantika metod je popsana u jejich implementace v souboru keyedevent.c
HANDLE CreateKeyedEvent(DWORD DesiredAccess, PCWSTR Name);
HANDLE OpenKeyedEvent(DWORD DesiredAccess, PCWSTR Name);
DWORD ReleaseKeyedEvent(HANDLE KeyedEvent, PVOID Key, BOOL Alertable, PLARGE_INTEGER Timeout);
DWORD WaitForKeyedEvent(HANDLE KeyedEvent, PVOID Key, BOOL Alertable, PLARGE_INTEGER Timeout);

BOOL KeyedEventInit(VOID);
VOID KeyedEventFinit(VOID);


#endif
