MHEG  17.9.0
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Pages
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 #include "glue_type.h"
51 
52 /*---Constant and macro definitions for public use---------------------------*/
53 
54 /*---Enumerations for public use---------------------------------------------*/
55 
56 /*---Global type defs for public use-----------------------------------------*/
57 
58 typedef void *H_Timer;
59 
60 /*******************************************************************************
61  * NAME: F_TimerCallback
62  * Callback called either when a timer expires or an unexpired timer is
63  * destroyed.
64  *
65  * Returns : void
66  *
67  * Parameter Flow Description
68  * ------------------------------------------------------------------------------
69  * triggered IN True when the callback is invoked because the timer has
70  * expired, otherwise false.
71  * callerRef IN Caller reference which was passed when the timer was
72  * created.
73  * timerHandle IN Handle of the timer that caused the callback to be
74  * invoked.
75  *
76  *******************************************************************************/
77 typedef void (*F_TimerCallback)( BOOLEAN triggered,
78  void *callerRef,
79  H_Timer timerHandle );
80 
81 /*---Global variable declarations for public use-----------------------------*/
82 
83 /*---Global Function prototypes for public use-------------------------------*/
84 
85 #define mhegTimerCreate VT_TimerCreate
86 #define mhegTimerDestroy VT_TimerDestroy
87 
101 E_MhegErr VT_TimerCreate( U32BIT millisecs, F_TimerCallback callback,
102  void *callerRef, H_Timer *pTimerHandle);
103 
112 E_MhegErr VT_TimerDestroy( H_Timer timerHandle );
113 
114 
123 E_MhegErr VT_TimersInit(U32BIT task_priority);
124 
132 E_MhegErr VT_TimersExit(void);
133 
134 #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:223
E_MhegErr VT_TimersExit(void)
Uninitialise the timer component - all resources are freed. Other timer functions must not be called ...
Definition: glue_timers.c:474
MHEG5 engine interface error codes.
Type definitions for glue module.
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:407
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:324