This allows application developers to query the dvb-core API version
dynamically, helping developers understand whether certain features
will be available.
Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
 
 #include "dvb_frontend.h"
 #include "dvbdev.h"
+#include <linux/dvb/version.h>
 
 static int dvb_frontend_debug;
 static int dvb_shutdown_timeout;
                .set    = 0,
                .buffer = 1,
        },
+       [DTV_API_VERSION] = {
+               .name   = "DTV_API_VERSION",
+               .cmd    = DTV_API_VERSION,
+               .set    = 0,
+       },
 };
 
 void dtv_property_dump(struct dtv_property *tvp)
        case DTV_TONE:
                tvp->u.data = fe->dtv_property_cache.sectone;
                break;
+       case DTV_API_VERSION:
+               tvp->u.data = (DVB_API_VERSION << 8) | DVB_API_VERSION_MINOR;
+               break;
        default:
                r = -1;
        }
 
 #define DTV_FE_CAPABILITY      16
 #define DTV_DELIVERY_SYSTEM    17
 
+#define DTV_API_VERSION                                35
 
 typedef enum fe_pilot {
        PILOT_ON,
 
 #ifndef _DVBVERSION_H_
 #define _DVBVERSION_H_
 
-#define DVB_API_VERSION 3
-#define DVB_API_VERSION_MINOR 2
+#define DVB_API_VERSION 5
+#define DVB_API_VERSION_MINOR 0
 
 #endif /*_DVBVERSION_H_*/