00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00012
00013 #ifndef MYTHSERVICES_H_
00014 #define MYTHSERVICES_H_
00015
00016 #include <QFileInfo>
00017
00018 #include "service.h"
00019 #include "datacontracts/connectionInfo.h"
00020 #include "datacontracts/settingList.h"
00021 #include "datacontracts/storageGroupDirList.h"
00022 #include "datacontracts/timeZoneInfo.h"
00023 #include "datacontracts/logMessage.h"
00024 #include "datacontracts/logMessageList.h"
00025
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00041
00042 class SERVICE_PUBLIC MythServices : public Service
00043 {
00044 Q_OBJECT
00045 Q_CLASSINFO( "version" , "1.04" );
00046 Q_CLASSINFO( "PutSetting_Method", "POST" )
00047 Q_CLASSINFO( "AddStorageGroupDir_Method", "POST" )
00048 Q_CLASSINFO( "RemoveStorageGroupDir_Method", "POST" )
00049 Q_CLASSINFO( "ChangePassword_Method", "POST" )
00050 Q_CLASSINFO( "TestDBSettings_Method", "POST" )
00051 Q_CLASSINFO( "BackupDatabase_Method", "POST" )
00052 Q_CLASSINFO( "CheckDatabase_Method", "POST" )
00053 Q_CLASSINFO( "ProfileSubmit_Method", "POST" )
00054 Q_CLASSINFO( "ProfileDelete_Method", "POST" )
00055
00056 public:
00057
00058
00059
00060
00061 MythServices( QObject *parent = 0 ) : Service( parent )
00062 {
00063 DTC::ConnectionInfo ::InitializeCustomTypes();
00064 DTC::SettingList ::InitializeCustomTypes();
00065 DTC::StorageGroupDirList::InitializeCustomTypes();
00066 DTC::TimeZoneInfo ::InitializeCustomTypes();
00067 DTC::LogMessage ::InitializeCustomTypes();
00068 DTC::LogMessageList ::InitializeCustomTypes();
00069 }
00070
00071 public slots:
00072
00073 virtual DTC::ConnectionInfo* GetConnectionInfo ( const QString &Pin ) = 0;
00074
00075 virtual QString GetHostName ( ) = 0;
00076 virtual QStringList GetHosts ( ) = 0;
00077 virtual QStringList GetKeys ( ) = 0;
00078
00079 virtual DTC::StorageGroupDirList* GetStorageGroupDirs ( const QString &GroupName,
00080 const QString &HostName ) = 0;
00081
00082 virtual bool AddStorageGroupDir ( const QString &GroupName,
00083 const QString &DirName,
00084 const QString &HostName ) = 0;
00085
00086 virtual bool RemoveStorageGroupDir( const QString &GroupName,
00087 const QString &DirName,
00088 const QString &HostName ) = 0;
00089
00090 virtual DTC::TimeZoneInfo* GetTimeZone ( ) = 0;
00091
00092 virtual DTC::LogMessageList* GetLogs ( const QString &HostName,
00093 const QString &Application,
00094 int PID,
00095 int TID,
00096 const QString &Thread,
00097 const QString &Filename,
00098 int Line,
00099 const QString &Function,
00100 const QDateTime &FromTime,
00101 const QDateTime &ToTime,
00102 const QString &Level,
00103 const QString &MsgContains ) = 0;
00104
00105 virtual DTC::SettingList* GetSetting ( const QString &HostName,
00106 const QString &Key,
00107 const QString &Default ) = 0;
00108
00109 virtual bool PutSetting ( const QString &HostName,
00110 const QString &Key,
00111 const QString &Value ) = 0;
00112
00113 virtual bool ChangePassword ( const QString &UserName,
00114 const QString &OldPassword,
00115 const QString &NewPassword ) = 0;
00116
00117 virtual bool TestDBSettings ( const QString &HostName,
00118 const QString &UserName,
00119 const QString &Password,
00120 const QString &DBName,
00121 int dbPort) = 0;
00122
00123 virtual bool SendMessage ( const QString &Message,
00124 const QString &Address,
00125 int udpPort,
00126 int Timeout ) = 0;
00127
00128 virtual bool BackupDatabase ( void ) = 0;
00129
00130 virtual bool CheckDatabase ( bool Repair ) = 0;
00131
00132 virtual bool ProfileSubmit ( void ) = 0;
00133
00134 virtual bool ProfileDelete ( void ) = 0;
00135
00136 virtual QString ProfileURL ( void ) = 0;
00137
00138 virtual QString ProfileUpdated ( void ) = 0;
00139
00140 virtual QString ProfileText ( void ) = 0;
00141 };
00142
00143 #endif
00144