kodi
PVROperations.h
1 /*
2  * Copyright (C) 2012-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 "FileItemHandler.h"
12 #include "pvr/channels/PVRChannelGroup.h"
13 
14 #include <memory>
15 
16 class CVariant;
17 
18 namespace JSONRPC
19 {
21  {
22  public:
23  static JSONRPC_STATUS GetProperties(const std::string &method, ITransportLayer *transport, IClient *client, const CVariant &parameterObject, CVariant &result);
24  static JSONRPC_STATUS GetChannelGroups(const std::string &method, ITransportLayer *transport, IClient *client, const CVariant &parameterObject, CVariant &result);
25  static JSONRPC_STATUS GetChannelGroupDetails(const std::string &method, ITransportLayer *transport, IClient *client, const CVariant &parameterObject, CVariant &result);
26  static JSONRPC_STATUS GetChannels(const std::string &method, ITransportLayer *transport, IClient *client, const CVariant &parameterObject, CVariant &result);
27  static JSONRPC_STATUS GetChannelDetails(const std::string &method, ITransportLayer *transport, IClient *client, const CVariant &parameterObject, CVariant &result);
28  static JSONRPC_STATUS GetClients(const std::string& method,
29  ITransportLayer* transport,
30  IClient* client,
31  const CVariant& parameterObject,
32  CVariant& result);
33  static JSONRPC_STATUS GetBroadcasts(const std::string &method, ITransportLayer *transport, IClient *client, const CVariant &parameterObject, CVariant &result);
34  static JSONRPC_STATUS GetBroadcastDetails(const std::string &method, ITransportLayer *transport, IClient *client, const CVariant &parameterObject, CVariant &result);
35  static JSONRPC_STATUS GetBroadcastIsPlayable(const std::string& method,
36  ITransportLayer* transport,
37  IClient* client,
38  const CVariant& parameterObject,
39  CVariant& result);
40  static JSONRPC_STATUS GetTimers(const std::string &method, ITransportLayer *transport, IClient *client, const CVariant &parameterObject, CVariant &result);
41  static JSONRPC_STATUS GetTimerDetails(const std::string &method, ITransportLayer *transport, IClient *client, const CVariant &parameterObject, CVariant &result);
42  static JSONRPC_STATUS GetRecordings(const std::string &method, ITransportLayer *transport, IClient *client, const CVariant &parameterObject, CVariant &result);
43  static JSONRPC_STATUS GetRecordingDetails(const std::string &method, ITransportLayer *transport, IClient *client, const CVariant &parameterObject, CVariant &result);
44 
45  static JSONRPC_STATUS AddTimer(const std::string &method, ITransportLayer *transport, IClient *client, const CVariant &parameterObject, CVariant &result);
46  static JSONRPC_STATUS DeleteTimer(const std::string &method, ITransportLayer *transport, IClient *client, const CVariant &parameterObject, CVariant &result);
47  static JSONRPC_STATUS ToggleTimer(const std::string &method, ITransportLayer *transport, IClient *client, const CVariant &parameterObject, CVariant &result);
48 
49  static JSONRPC_STATUS Record(const std::string &method, ITransportLayer *transport, IClient *client, const CVariant &parameterObject, CVariant &result);
50  static JSONRPC_STATUS Scan(const std::string &method, ITransportLayer *transport, IClient *client, const CVariant &parameterObject, CVariant &result);
51 
52  static std::shared_ptr<CFileItem> GetRecordingFileItem(int recordingId);
53 
54  private:
55  static JSONRPC_STATUS GetPropertyValue(const std::string &property, CVariant &result);
56  static void FillChannelGroupDetails(
57  const std::shared_ptr<const PVR::CPVRChannelGroup>& channelGroup,
58  const CVariant& parameterObject,
59  CVariant& result,
60  bool append = false);
61  };
62 }
Definition: AddonsOperations.h:23
Definition: Variant.h:31
Definition: FileItemHandler.h:25
JSONRPC_STATUS
Possible statuc codes of a response to a JSON-RPC request.
Definition: JSONRPCUtils.h:29
Definition: PVROperations.h:20
Definition: ITransportLayer.h:27
Definition: IClient.h:13