diff options
| author | manuel <manuel@mausz.at> | 2015-03-04 00:23:39 +0100 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2015-03-04 00:23:39 +0100 |
| commit | 9d11b08ad61b1f0d6d7023ce403285d8662efaed (patch) | |
| tree | 5bc0c947d9e10d3e8c9dc1e6b26f3d6599f0cea1 /xbmc/addons/AddonCallbacksPVR.h | |
| parent | c159d9f91f1573901868100a9464527a5a71575b (diff) | |
| download | kodi-pvr-build-9d11b08ad61b1f0d6d7023ce403285d8662efaed.tar.gz kodi-pvr-build-9d11b08ad61b1f0d6d7023ce403285d8662efaed.tar.bz2 kodi-pvr-build-9d11b08ad61b1f0d6d7023ce403285d8662efaed.zip | |
sync with upstream
Diffstat (limited to 'xbmc/addons/AddonCallbacksPVR.h')
| -rw-r--r-- | xbmc/addons/AddonCallbacksPVR.h | 166 |
1 files changed, 0 insertions, 166 deletions
diff --git a/xbmc/addons/AddonCallbacksPVR.h b/xbmc/addons/AddonCallbacksPVR.h deleted file mode 100644 index 3fa48ec..0000000 --- a/xbmc/addons/AddonCallbacksPVR.h +++ /dev/null | |||
| @@ -1,166 +0,0 @@ | |||
| 1 | #pragma once | ||
| 2 | /* | ||
| 3 | * Copyright (C) 2012-2013 Team XBMC | ||
| 4 | * http://xbmc.org | ||
| 5 | * | ||
| 6 | * This Program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2, or (at your option) | ||
| 9 | * any later version. | ||
| 10 | * | ||
| 11 | * This Program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with XBMC; see the file COPYING. If not, see | ||
| 18 | * <http://www.gnu.org/licenses/>. | ||
| 19 | * | ||
| 20 | */ | ||
| 21 | |||
| 22 | #include "AddonCallbacks.h" | ||
| 23 | #include "include/xbmc_pvr_types.h" | ||
| 24 | |||
| 25 | namespace PVR | ||
| 26 | { | ||
| 27 | class CPVRClient; | ||
| 28 | } | ||
| 29 | |||
| 30 | namespace ADDON | ||
| 31 | { | ||
| 32 | |||
| 33 | /*! | ||
| 34 | * Callbacks for a PVR add-on to XBMC. | ||
| 35 | * | ||
| 36 | * Also translates the addon's C structures to XBMC's C++ structures. | ||
| 37 | */ | ||
| 38 | class CAddonCallbacksPVR | ||
| 39 | { | ||
| 40 | public: | ||
| 41 | CAddonCallbacksPVR(CAddon* addon); | ||
| 42 | ~CAddonCallbacksPVR(void); | ||
| 43 | |||
| 44 | /*! | ||
| 45 | * @return The callback table. | ||
| 46 | */ | ||
| 47 | CB_PVRLib *GetCallbacks() { return m_callbacks; } | ||
| 48 | |||
| 49 | /*! | ||
| 50 | * @brief Transfer a channel group from the add-on to XBMC. The group will be created if it doesn't exist. | ||
| 51 | * @param addonData A pointer to the add-on. | ||
| 52 | * @param handle The handle parameter that XBMC used when requesting the channel groups list | ||
| 53 | * @param entry The entry to transfer to XBMC | ||
| 54 | */ | ||
| 55 | static void PVRTransferChannelGroup(void* addonData, const ADDON_HANDLE handle, const PVR_CHANNEL_GROUP* entry); | ||
| 56 | |||
| 57 | /*! | ||
| 58 | * @brief Transfer a channel group member entry from the add-on to XBMC. The channel will be added to the group if the group can be found. | ||
| 59 | * @param addonData A pointer to the add-on. | ||
| 60 | * @param handle The handle parameter that XBMC used when requesting the channel group members list | ||
| 61 | * @param entry The entry to transfer to XBMC | ||
| 62 | */ | ||
| 63 | static void PVRTransferChannelGroupMember(void* addonData, const ADDON_HANDLE handle, const PVR_CHANNEL_GROUP_MEMBER* entry); | ||
| 64 | |||
| 65 | /*! | ||
| 66 | * @brief Transfer an EPG tag from the add-on to XBMC | ||
| 67 | * @param addonData A pointer to the add-on. | ||
| 68 | * @param handle The handle parameter that XBMC used when requesting the EPG data | ||
| 69 | * @param entry The entry to transfer to XBMC | ||
| 70 | */ | ||
| 71 | static void PVRTransferEpgEntry(void* addonData, const ADDON_HANDLE handle, const EPG_TAG* entry); | ||
| 72 | |||
| 73 | /*! | ||
| 74 | * @brief Transfer a channel entry from the add-on to XBMC | ||
| 75 | * @param addonData A pointer to the add-on. | ||
| 76 | * @param handle The handle parameter that XBMC used when requesting the channel list | ||
| 77 | * @param entry The entry to transfer to XBMC | ||
| 78 | */ | ||
| 79 | static void PVRTransferChannelEntry(void* addonData, const ADDON_HANDLE handle, const PVR_CHANNEL* entry); | ||
| 80 | |||
| 81 | /*! | ||
| 82 | * @brief Transfer a timer entry from the add-on to XBMC | ||
| 83 | * @param addonData A pointer to the add-on. | ||
| 84 | * @param handle The handle parameter that XBMC used when requesting the timers list | ||
| 85 | * @param entry The entry to transfer to XBMC | ||
| 86 | */ | ||
| 87 | static void PVRTransferTimerEntry(void* addonData, const ADDON_HANDLE handle, const PVR_TIMER* entry); | ||
| 88 | |||
| 89 | /*! | ||
| 90 | * @brief Transfer a recording entry from the add-on to XBMC | ||
| 91 | * @param addonData A pointer to the add-on. | ||
| 92 | * @param handle The handle parameter that XBMC used when requesting the recordings list | ||
| 93 | * @param entry The entry to transfer to XBMC | ||
| 94 | */ | ||
| 95 | static void PVRTransferRecordingEntry(void* addonData, const ADDON_HANDLE handle, const PVR_RECORDING* entry); | ||
| 96 | |||
| 97 | /*! | ||
| 98 | * @brief Add or replace a menu hook for the context menu for this add-on | ||
| 99 | * @param addonData A pointer to the add-on. | ||
| 100 | * @param hook The hook to add. | ||
| 101 | */ | ||
| 102 | static void PVRAddMenuHook(void* addonData, PVR_MENUHOOK* hook); | ||
| 103 | |||
| 104 | /*! | ||
| 105 | * @brief Display a notification in XBMC that a recording started or stopped on the server | ||
| 106 | * @param addonData A pointer to the add-on. | ||
| 107 | * @param strName The name of the recording to display | ||
| 108 | * @param strFileName The filename of the recording | ||
| 109 | * @param bOnOff True when recording started, false when it stopped | ||
| 110 | */ | ||
| 111 | static void PVRRecording(void* addonData, const char* strName, const char* strFileName, bool bOnOff); | ||
| 112 | |||
| 113 | /*! | ||
| 114 | * @brief Request XBMC to update it's list of channels | ||
| 115 | * @param addonData A pointer to the add-on. | ||
| 116 | */ | ||
| 117 | static void PVRTriggerChannelUpdate(void* addonData); | ||
| 118 | |||
| 119 | /*! | ||
| 120 | * @brief Request XBMC to update it's list of timers | ||
| 121 | * @param addonData A pointer to the add-on. | ||
| 122 | */ | ||
| 123 | static void PVRTriggerTimerUpdate(void* addonData); | ||
| 124 | |||
| 125 | /*! | ||
| 126 | * @brief Request XBMC to update it's list of recordings | ||
| 127 | * @param addonData A pointer to the add-on. | ||
| 128 | */ | ||
| 129 | static void PVRTriggerRecordingUpdate(void* addonData); | ||
| 130 | |||
| 131 | /*! | ||
| 132 | * @brief Request XBMC to update it's list of channel groups | ||
| 133 | * @param addonData A pointer to the add-on. | ||
| 134 | */ | ||
| 135 | static void PVRTriggerChannelGroupsUpdate(void* addonData); | ||
| 136 | |||
| 137 | /*! | ||
| 138 | * @brief Schedule an EPG update for the given channel channel | ||
| 139 | * @param addonData A pointer to the add-on | ||
| 140 | * @param iChannelUid The unique id of the channel for this add-on | ||
| 141 | */ | ||
| 142 | static void PVRTriggerEpgUpdate(void* addonData, unsigned int iChannelUid); | ||
| 143 | |||
| 144 | /*! | ||
| 145 | * @brief Free a packet that was allocated with AllocateDemuxPacket | ||
| 146 | * @param addonData A pointer to the add-on. | ||
| 147 | * @param pPacket The packet to free. | ||
| 148 | */ | ||
| 149 | static void PVRFreeDemuxPacket(void* addonData, DemuxPacket* pPacket); | ||
| 150 | |||
| 151 | /*! | ||
| 152 | * @brief Allocate a demux packet. Free with FreeDemuxPacket | ||
| 153 | * @param addonData A pointer to the add-on. | ||
| 154 | * @param iDataSize The size of the data that will go into the packet | ||
| 155 | * @return The allocated packet. | ||
| 156 | */ | ||
| 157 | static DemuxPacket* PVRAllocateDemuxPacket(void* addonData, int iDataSize = 0); | ||
| 158 | |||
| 159 | private: | ||
| 160 | static PVR::CPVRClient* GetPVRClient(void* addonData); | ||
| 161 | |||
| 162 | CB_PVRLib *m_callbacks; /*!< callback addresses */ | ||
| 163 | CAddon *m_addon; /*!< the addon */ | ||
| 164 | }; | ||
| 165 | |||
| 166 | }; /* namespace ADDON */ | ||
