#include <libhts/htsmsg_binary.h>
+#define HTSP_PROTO_VERSION 1
+
extern const char *htsversion;
LIST_HEAD(htsp_connection_list, htsp_connection);
+/**
+ * Request various info about tvheadend
+ */
+static htsmsg_t *
+htsp_method_getInfo(htsp_connection_t *htsp, htsmsg_t *in)
+{
+ extern const char *htsversion;
+ htsmsg_t *r = htsmsg_create();
+
+ htsmsg_add_u32(r, "protover", HTSP_PROTO_VERSION);
+ htsmsg_add_str(r, "appver", htsversion);
+
+ return r;
+}
+
/**
* HTSP methods
{ "authenticate", htsp_method_authenticate, 0},
{ "enableAsyncMetadata", htsp_method_async, ACCESS_STREAMING},
{ "getEvent", htsp_method_getEvent, ACCESS_STREAMING},
+ { "getInfo", htsp_method_getInfo, ACCESS_STREAMING},
{ "subscribe", htsp_method_subscribe, ACCESS_STREAMING},
{ "unsubscribe", htsp_method_unsubscribe, ACCESS_STREAMING},