Kodi Development
22.0
for Binary and Script based Add-Ons
Loading...
Searching...
No Matches
MenuHook.h
1
/*
2
* Copyright (C) 2005-2018 Team Kodi
3
* This file is part of Kodi - https://kodi.tv
4
*
5
* SPDX-License-Identifier: GPL-2.0-or-later
6
* See LICENSES/README.md for more information.
7
*/
8
9
#pragma once
10
11
#include "../../AddonBase.h"
12
#include "../../c-api/addon-instance/pvr/pvr_menu_hook.h"
13
14
//¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
15
// "C++" Definitions group 7 - Menu hook
16
#ifdef __cplusplus
17
18
namespace
kodi
19
{
20
namespace
addon
21
{
22
23
//==============================================================================
45
class
PVRMenuhook
:
public
CStructHdl
<PVRMenuhook, PVR_MENUHOOK>
46
{
47
friend
class
CInstancePVRClient
;
48
49
public
:
65
PVRMenuhook
(
unsigned
int
hookId
,
unsigned
int
localizedStringId
,
PVR_MENUHOOK_CAT
category)
66
{
67
m_cStructure->iHookId =
hookId
;
68
m_cStructure->iLocalizedStringId =
localizedStringId
;
69
m_cStructure->category = category;
70
}
71
73
PVRMenuhook
()
74
{
75
m_cStructure->iHookId = 0;
76
m_cStructure->iLocalizedStringId = 0;
77
m_cStructure->category =
PVR_MENUHOOK_UNKNOWN
;
78
}
79
PVRMenuhook
(
const
PVRMenuhook
& data) :
CStructHdl
(data) {}
91
94
97
void
SetHookId
(
unsigned
int
hookId
) { m_cStructure->iHookId =
hookId
; }
98
100
unsigned
int
GetHookId
()
const
{
return
m_cStructure->iHookId; }
101
104
void
SetLocalizedStringId
(
unsigned
int
localizedStringId
)
105
{
106
m_cStructure->iLocalizedStringId =
localizedStringId
;
107
}
108
110
unsigned
int
GetLocalizedStringId
()
const
{
return
m_cStructure->iLocalizedStringId; }
111
114
void
SetCategory
(
PVR_MENUHOOK_CAT
category) { m_cStructure->category = category; }
115
117
PVR_MENUHOOK_CAT
GetCategory
()
const
{
return
m_cStructure->category; }
119
120
private
:
121
PVRMenuhook
(
const
PVR_MENUHOOK
* data) :
CStructHdl
(data) {}
122
PVRMenuhook(
PVR_MENUHOOK
* data) : CStructHdl(data) {}
123
};
125
//------------------------------------------------------------------------------
126
127
}
/* namespace addon */
128
}
/* namespace kodi */
129
130
#endif
/* __cplusplus */
kodi::addon::CInstancePVRClient
Definition
PVR.h:402
kodi::addon::CStructHdl
Definition
AddonBase.h:120
kodi::addon::PVRMenuhook
Definition
MenuHook.h:46
kodi::addon::PeripheralVector
Definition
PeripheralUtils.h:48
PVR_MENUHOOK_CAT
PVR_MENUHOOK_CAT
Definition
pvr_menu_hook.h:29
PVR_MENUHOOK_UNKNOWN
@ PVR_MENUHOOK_UNKNOWN
-1 : Unknown menu hook.
Definition
pvr_menu_hook.h:31
kodi::addon::PVRMenuhook::SetHookId
void SetHookId(unsigned int hookId)
required This hook's identifier.
Definition
MenuHook.h:97
kodi::addon::PVRMenuhook::GetHookId
unsigned int GetHookId() const
To get with SetHookId() changed values.
Definition
MenuHook.h:100
kodi::addon::PVRMenuhook::GetCategory
PVR_MENUHOOK_CAT GetCategory() const
To get with SetCategory() changed values.
Definition
MenuHook.h:117
kodi::addon::PVRMenuhook::GetLocalizedStringId
unsigned int GetLocalizedStringId() const
To get with SetLocalizedStringId() changed values.
Definition
MenuHook.h:110
kodi::addon::PVRMenuhook::SetLocalizedStringId
void SetLocalizedStringId(unsigned int localizedStringId)
required The id of the label for this hook in kodi::GetLocalizedString().
Definition
MenuHook.h:104
kodi::addon::PVRMenuhook::SetCategory
void SetCategory(PVR_MENUHOOK_CAT category)
required Category of menu hook.
Definition
MenuHook.h:114
PVR_MENUHOOK
"C" PVR add-on menu hook.
Definition
pvr_menu_hook.h:65
include
kodi
addon-instance
pvr
MenuHook.h
Generated by
1.10.0