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 LICENSE for details
8 //
10 
11 #ifndef WOLINFO_H_
12 #define WOLINFO_H_
13 
14 #include <QString>
15 
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_REF( 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
false
VERBOSE_PREAMBLE false
Definition: verbosedefs.h:89
SERVICE_PUBLIC
#define SERVICE_PUBLIC
Definition: serviceexp.h:9
DTC::WOLInfo::InitializeCustomTypes
static void InitializeCustomTypes()
Definition: wolInfo.h:65
Command
Definition: gamesettings.cpp:233
DTC::WOLInfo
Definition: wolInfo.h:22
datacontracthelper.h
serviceexp.h
DTC::WOLInfo::Copy
void Copy(const WOLInfo *src)
Definition: wolInfo.h:51
PROPERTYIMP
#define PROPERTYIMP(type, name)
Definition: datacontracthelper.h:56
DTC
Definition: datacontracthelper.h:123
Reconnect
Definition: backendconnectionmanager.cpp:28
PROPERTYIMP_REF
#define PROPERTYIMP_REF(type, name)
Definition: datacontracthelper.h:70