Re-organized sub-directory by category
[staging/basesystem.git] / service / native / framework_unified / client / NS_Timer / include / ns_timer_handle.h
1 /*
2  * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 ///////////////////////////////////////////////////////////////////////////////
18 /// \ingroup  tag_NSTimer
19 /// \brief    Contains the internal structures that used by ns_timer
20 ///
21 ///
22 ///
23 ///////////////////////////////////////////////////////////////////////////////
24
25 #ifndef FRAMEWORK_UNIFIED_CLIENT_NS_TIMER_INCLUDE_NS_TIMER_HANDLE_H_
26 #define FRAMEWORK_UNIFIED_CLIENT_NS_TIMER_INCLUDE_NS_TIMER_HANDLE_H_
27 #include <stdio.h>
28 #include <time.h>
29 #include <signal.h>
30 #include <native_service/frameworkunified_types.h>
31
32 typedef void (*pfCb)(UI_16 cmd);
33
34 /// \brief Struct that defines internal function callback for a timer
35 typedef struct _TimerNotifyInfo {
36   UI_16  iCmd;
37   PSTR   q_name;
38 } TTimerInfo, *PTimerInfo;
39
40 /// \brief Struct that defines internal handle object for a timer
41 typedef struct _NSTimerHandle {
42   int timerfd;
43   struct itimerspec itime;
44   PTimerInfo tTimerInfo;
45   UI_8 timerState;
46 } NSTimerHandle, *PNSTimerHandle;
47
48 #endif  // FRAMEWORK_UNIFIED_CLIENT_NS_TIMER_INCLUDE_NS_TIMER_HANDLE_H_