MHEG5  22.11.0
glue_timers.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
3  * Copyright © 2005 Ocean Blue Software Ltd
4  * Copyright © 2000 Koninklijke Philips Electronics N.V
5  *
6  * This file is part of a DTVKit Software Component
7  * You are permitted to copy, modify or distribute this file subject to the terms
8  * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
9  *
10  * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
11  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
12  * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
13  *
14  * If you or your organisation is not a member of DTVKit then you have access
15  * to this source code outside of the terms of the licence agreement
16  * and you are expected to delete this and any associated files immediately.
17  * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
18  *******************************************************************************/
43 #ifndef _MHEGTIMERS_H
44 #define _MHEGTIMERS_H
45 
46 /*---includes for this file--------------------------------------------------*/
47 
48 #include <techtype.h>
49 #include "mherrors.h"
50 
51 /*---Constant and macro definitions for public use---------------------------*/
52 
53 /*---Enumerations for public use---------------------------------------------*/
54 
55 /*---Global type defs for public use-----------------------------------------*/
56 
57 typedef void *H_Timer;
58 
59 /*******************************************************************************
60  * NAME: F_TimerCallback
61  * Callback called either when a timer expires or an unexpired timer is
62  * destroyed.
63  *
64  * Returns : void
65  *
66  * Parameter Flow Description
67  * ------------------------------------------------------------------------------
68  * triggered IN True when the callback is invoked because the timer has
69  * expired, otherwise false.
70  * callerRef IN Caller reference which was passed when the timer was
71  * created.
72  * timerHandle IN Handle of the timer that caused the callback to be
73  * invoked.
74  *
75  *******************************************************************************/
76 typedef void (*F_TimerCallback)( BOOLEAN triggered,
77  void *callerRef,
78  H_Timer timerHandle );
79 
80 /*---Global variable declarations for public use-----------------------------*/
81 
82 /*---Global Function prototypes for public use-------------------------------*/
83 
84 #define mhegTimerCreate VT_TimerCreate
85 #define mhegTimerDestroy VT_TimerDestroy
86 
100 E_MhegErr VT_TimerCreate( U32BIT millisecs, F_TimerCallback callback,
101  void *callerRef, H_Timer *pTimerHandle);
102 
111 E_MhegErr VT_TimerDestroy( H_Timer timerHandle );
112 
113 
122 E_MhegErr VT_TimersInit(U32BIT task_priority);
123 
131 E_MhegErr VT_TimersExit(void);
132 
133 #endif /*_MHEGTIMERS_H*/
E_MhegErr VT_TimerCreate(U32BIT millisecs, F_TimerCallback callback, void *callerRef, H_Timer *pTimerHandle)
Set a timer for a certain number of millseconds. When the timer expires a specified callback will be ...
Definition: glue_timers.c:226
E_MhegErr VT_TimersExit(void)
Uninitialise the timer component - all resources are freed. Other timer functions must not be called ...
Definition: glue_timers.c:477
MHEG5 engine interface error codes.
E_MhegErr VT_TimersInit(U32BIT task_priority)
Initialise the timer component. This function must be called before any other timer functions are inv...
Definition: glue_timers.c:410
System Wide Global Technical Data Type Definitions.
E_MhegErr VT_TimerDestroy(H_Timer timerHandle)
Destroy the specified timer. A callback will not be invoked for this timer after this function return...
Definition: glue_timers.c:327