diff --git a/src/main.cpp b/src/main.cpp index a034218f8a..e1cea23d07 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -105,7 +105,6 @@ int main ( int argc, char** argv ) ELicenceType eLicenceType = LT_NO_LICENCE; QString strConnOnStartupAddress = ""; QString strIniFileName = ""; - QString strHTMLStatusFileName = ""; QString strLoggingFileName = ""; QString strRecordingDirName = ""; QString strDirectoryAddress = ""; @@ -343,19 +342,6 @@ int main ( int argc, char** argv ) continue; } - // HTML status file ---------------------------------------------------- - if ( GetStringArgument ( argc, argv, i, "-m", "--htmlstatus", strArgument ) ) - { - qWarning() << qUtf8Printable ( - QString ( "- The HTML status file option (\"--htmlstatus\" or \"-m\") is deprecated and will be removed soon. Please use JSON-RPC " - "instead. See https://github.com/jamulussoftware/jamulus/blob/main/docs/JSON-RPC.md" ) ); - strHTMLStatusFileName = strArgument; - qInfo() << qUtf8Printable ( QString ( "- HTML status file name: %1" ).arg ( strHTMLStatusFileName ) ); - CommandLineOptions << "--htmlstatus"; - ServerOnlyOptions << "--htmlstatus"; - continue; - } - // Server info --------------------------------------------------------- if ( GetStringArgument ( argc, argv, i, "-o", "--serverinfo", strArgument ) ) { @@ -993,7 +979,6 @@ int main ( int argc, char** argv ) strServerBindIP, iPortNumber, iQosNumber, - strHTMLStatusFileName, strDirectoryAddress, strServerListFileName, strServerInfo, @@ -1121,7 +1106,6 @@ QString UsageArguments ( char** argv ) " -F, --fastupdate use 64 samples frame size mode\n" " -l, --log enable logging, set file name\n" " -L, --licence show an agreement window before users can connect\n" - " -m, --htmlstatus deprecated, please use JSON-RPC instead\n" " -o, --serverinfo registration info for this Server. Format:\n" " [name];[city];[country as two-letter ISO country code or Qt5 QLocale ID]\n" " --serverpublicip public IP address for this Server. Needed when\n" diff --git a/src/server.cpp b/src/server.cpp index 55dc5ed319..76d0e98bc7 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -30,7 +30,6 @@ CServer::CServer ( const int iNewMaxNumChan, const QString& strServerBindIP, const quint16 iPortNumber, const quint16 iQosNumber, - const QString& strHTMLStatusFileName, const QString& strDirectoryAddress, const QString& strServerListFileName, const QString& strServerInfo, @@ -54,8 +53,6 @@ CServer::CServer ( const int iNewMaxNumChan, Socket ( this, iPortNumber, iQosNumber, strServerBindIP, bNEnableIPv6 ), Logging(), iFrameCount ( 0 ), - bWriteStatusHTMLFile ( false ), - strServerHTMLFileListName ( strHTMLStatusFileName ), HighPrecisionTimer ( bNUseDoubleSystemFrameSize ), ServerListManager ( iPortNumber, strDirectoryAddress, @@ -193,14 +190,6 @@ CServer::CServer ( const int iNewMaxNumChan, Logging.Start ( strLoggingFileName ); } - // HTML status file writing - if ( !strServerHTMLFileListName.isEmpty() ) - { - // activate HTML file writing and write initial file - bWriteStatusHTMLFile = true; - WriteHTMLChannelList(); - } - // manage welcome message: if the welcome message is a valid link to a local // file, the content of that file is used as the welcome message (#361) SetWelcomeMessage ( strNewWelcomeMessage ); // first use given text, may be overwritten @@ -504,11 +493,6 @@ void CServer::OnAboutToQuit() } Stop(); - - if ( bWriteStatusHTMLFile ) - { - WriteHTMLServerQuit(); - } } void CServer::OnHandledSignal ( int sigNum ) @@ -1267,12 +1251,6 @@ void CServer::CreateAndSendChanListForAllConChannels() vecChannels[i].CreateConClientListMes ( vecChanInfo ); } } - - // create status HTML file if enabled - if ( bWriteStatusHTMLFile ) - { - WriteHTMLChannelList(); - } } void CServer::CreateAndSendChanListForThisChan ( const int iCurChanID ) @@ -1571,54 +1549,6 @@ void CServer::SetWelcomeMessage ( const QString& strNWelcMess ) strWelcomeMessage = strWelcomeMessage.left ( MAX_LEN_CHAT_TEXT ); } -void CServer::WriteHTMLChannelList() -{ - // prepare file and stream - QFile serverFileListFile ( strServerHTMLFileListName ); - - if ( serverFileListFile.open ( QIODevice::WriteOnly | QIODevice::Text ) ) - { - QTextStream streamFileOut ( &serverFileListFile ); - - // depending on number of connected clients write list - if ( GetNumberOfConnectedClients() == 0 ) - { - // no clients are connected -> empty server - streamFileOut << " No client connected\n"; - } - else - { - streamFileOut << "\n"; - } - } -} - -void CServer::WriteHTMLServerQuit() -{ - // prepare file and stream - QFile serverFileListFile ( strServerHTMLFileListName ); - - if ( !serverFileListFile.open ( QIODevice::WriteOnly | QIODevice::Text ) ) - { - return; - } - - QTextStream streamFileOut ( &serverFileListFile ); - streamFileOut << " Server terminated\n"; - serverFileListFile.close(); -} - void CServer::customEvent ( QEvent* pEvent ) { if ( pEvent->type() == QEvent::User + 11 ) diff --git a/src/server.h b/src/server.h index 6a42a8f9b8..b159064c5a 100644 --- a/src/server.h +++ b/src/server.h @@ -90,7 +90,6 @@ class CServer : public QObject, public CServerSlots const QString& strServerBindIP, const quint16 iPortNumber, const quint16 iQosNumber, - const QString& strHTMLStatusFileName, const QString& strDirectoryAddress, const QString& strServerListFileName, const QString& strServerInfo, @@ -194,9 +193,6 @@ class CServer : public QObject, public CServerSlots template inline void connectChannelSignalsToServerSlots(); - void WriteHTMLChannelList(); - void WriteHTMLServerQuit(); - static void DecodeReceiveDataBlocks ( CServer* pServer, const int iStartChanCnt, const int iStopChanCnt, const int iNumClients ); static void MixEncodeTransmitDataBlocks ( CServer* pServer, const int iStartChanCnt, const int iStopChanCnt, const int iNumClients ); @@ -281,10 +277,6 @@ class CServer : public QObject, public CServerSlots // channel level update frame interval counter int iFrameCount; - // HTML file server status - bool bWriteStatusHTMLFile; - QString strServerHTMLFileListName; - CHighPrecisionTimer HighPrecisionTimer; // server list