MythTV  master
storageGroupDir.h
Go to the documentation of this file.
1 #ifndef STORAGEGROUPDIR_H_
2 #define STORAGEGROUPDIR_H_
3 
4 #include <QString>
5 
6 #include "serviceexp.h"
7 #include "datacontracthelper.h"
8 
9 namespace DTC
10 {
11 
13 
14 class SERVICE_PUBLIC StorageGroupDir : public QObject
15 {
16  Q_OBJECT
17  Q_CLASSINFO( "version" , "1.1" );
18 
19  Q_PROPERTY( int Id READ Id WRITE setId )
20  Q_PROPERTY( QString GroupName READ GroupName WRITE setGroupName )
21  Q_PROPERTY( QString HostName READ HostName WRITE setHostName )
22  Q_PROPERTY( QString DirName READ DirName WRITE setDirName )
23  Q_PROPERTY( bool DirRead READ DirRead WRITE setDirRead )
24  Q_PROPERTY( bool DirWrite READ DirWrite WRITE setDirWrite )
25  Q_PROPERTY( uint KiBFree READ KiBFree WRITE setKiBFree )
26 
27  PROPERTYIMP ( int , Id )
28  PROPERTYIMP ( QString , GroupName )
29  PROPERTYIMP ( QString , HostName )
30  PROPERTYIMP ( QString , DirName )
31  PROPERTYIMP ( bool , DirRead )
32  PROPERTYIMP ( bool , DirWrite )
33  PROPERTYIMP ( uint , KiBFree );
34 
35  public:
36 
37  static inline void InitializeCustomTypes();
38 
39  Q_INVOKABLE StorageGroupDir(QObject *parent = nullptr)
40  : QObject ( parent ),
41  m_Id ( 0 ),
42  m_DirRead ( false ),
43  m_DirWrite ( false ),
44  m_KiBFree ( 0 )
45  {
46  }
47 
48  void Copy( const StorageGroupDir *src )
49  {
50  m_Id = src->m_Id ;
51  m_GroupName = src->m_GroupName ;
52  m_HostName = src->m_HostName ;
53  m_DirName = src->m_DirName ;
54  m_DirRead = src->m_DirRead ;
55  m_DirWrite = src->m_DirWrite ;
56  m_KiBFree = src->m_KiBFree ;
57  }
58 
59  private:
60  Q_DISABLE_COPY(StorageGroupDir);
61 };
62 
64 {
65  qRegisterMetaType< StorageGroupDir* >();
66 }
67 
68 } // namespace DTC
69 
70 #endif
#define PROPERTYIMP(type, name)
#define SERVICE_PUBLIC
Definition: serviceexp.h:9
VERBOSE_PREAMBLE false
Definition: verbosedefs.h:85
unsigned int uint
Definition: compat.h:140
static void InitializeCustomTypes()
void Copy(const StorageGroupDir *src)