MythTV  master
wolInfo.h
Go to the documentation of this file.
1 // Program Name: wolInfo.h
3 // Created : Jan. 15, 2010
4 //
5 // Copyright (c) 2010 David Blain <dblain@mythtv.org>
6 //
7 // Licensed under the GPL v2 or later, see COPYING for details
8 //
10 
11 #ifndef WOLINFO_H_
12 #define WOLINFO_H_
13 
14 #include <QString>
15 
16 #include "serviceexp.h"
17 #include "datacontracthelper.h"
18 
19 namespace DTC
20 {
21 
22 class SERVICE_PUBLIC WOLInfo : public QObject
23 {
24  Q_OBJECT
25 
26  Q_CLASSINFO( "version" , "1.0" );
27  Q_CLASSINFO( "defaultProp", "Command" );
28 
29  Q_PROPERTY( bool Enabled READ Enabled WRITE setEnabled )
30  Q_PROPERTY( int Reconnect READ Reconnect WRITE setReconnect )
31  Q_PROPERTY( int Retry READ Retry WRITE setRetry )
32  Q_PROPERTY( QString Command READ Command WRITE setCommand )
33 
34  PROPERTYIMP( bool , Enabled )
35  PROPERTYIMP( int , Reconnect )
36  PROPERTYIMP( int , Retry )
37  PROPERTYIMP( QString, Command )
38 
39  public:
40 
41  static inline void InitializeCustomTypes();
42 
43  Q_INVOKABLE WOLInfo(QObject *parent = nullptr)
44  : QObject ( parent ),
45  m_Enabled ( false ),
46  m_Reconnect( 0 ),
47  m_Retry ( 0 )
48  {
49  }
50 
51  void Copy( const WOLInfo *src )
52  {
53  m_Enabled = src->m_Enabled ;
54  m_Reconnect= src->m_Reconnect;
55  m_Retry = src->m_Retry ;
56  m_Command = src->m_Command ;
57  }
58 
59  private:
60  Q_DISABLE_COPY(WOLInfo);
61 };
62 
64 
66 {
67  qRegisterMetaType< WOLInfo* >();
68 }
69 
70 } // namespace DTC
71 
72 #endif
static void InitializeCustomTypes()
Definition: wolInfo.h:65
#define PROPERTYIMP(type, name)
#define SERVICE_PUBLIC
Definition: serviceexp.h:9
VERBOSE_PREAMBLE false
Definition: verbosedefs.h:85
void Copy(const WOLInfo *src)
Definition: wolInfo.h:51