MythTV  master
buildInfo.h
Go to the documentation of this file.
1 // Program Name: buildInfo.h
3 // Created : Dec. 15, 2015
4 //
5 // Copyright (c) 2015 Bill Meek, from: 2010 David Blain <dblain@mythtv.org>
6 //
7 // Licensed under the GPL v2 or later, see COPYING for details
8 //
10 
11 #ifndef BUILDINFO_H_
12 #define BUILDINFO_H_
13 
14 #include <QString>
15 
16 #include "serviceexp.h"
17 #include "datacontracthelper.h"
18 
19 namespace DTC
20 {
21 
22 class SERVICE_PUBLIC BuildInfo : public QObject
23 {
24  Q_OBJECT
25 
26  Q_CLASSINFO( "version" , "1.0" );
27 
28  Q_PROPERTY( QString Version READ Version WRITE setVersion )
29  Q_PROPERTY( bool LibX264 READ LibX264 WRITE setLibX264 )
30  Q_PROPERTY( bool LibDNS_SD READ LibDNS_SD WRITE setLibDNS_SD )
31 
32  PROPERTYIMP( QString , Version )
33  PROPERTYIMP( bool , LibX264 )
34  PROPERTYIMP( bool , LibDNS_SD );
35 
36  public:
37 
38  static inline void InitializeCustomTypes();
39 
40  Q_INVOKABLE BuildInfo(QObject *parent = nullptr)
41  : QObject ( parent ),
42  m_Version ( "" ),
43  m_LibX264 ( false ),
44  m_LibDNS_SD( false )
45  {
46  }
47 
48  void Copy( const BuildInfo *src )
49  {
50  m_Version = src->m_Version ;
51  m_LibX264 = src->m_LibX264 ;
52  m_LibDNS_SD = src->m_LibDNS_SD;
53  }
54 
55  private:
56  Q_DISABLE_COPY(BuildInfo);
57 };
58 
60 
62 {
63  qRegisterMetaType< BuildInfo* >();
64 }
65 
66 } // namespace DTC
67 
68 #endif
#define PROPERTYIMP(type, name)
void Copy(const BuildInfo *src)
Definition: buildInfo.h:48
#define SERVICE_PUBLIC
Definition: serviceexp.h:9
VERBOSE_PREAMBLE false
Definition: verbosedefs.h:85
static void InitializeCustomTypes()
Definition: buildInfo.h:61
BuildInfo * BuildInfoPtr
Definition: buildInfo.h:59