Accept number of items and days as arguments
This commit is contained in:
parent
f04eb1e7ed
commit
f20d7feab1
1 changed files with 45 additions and 0 deletions
45
src/main.cpp
45
src/main.cpp
|
@ -53,6 +53,8 @@ int main ( int argc, char** argv )
|
||||||
bool bCentServPingServerInList = false;
|
bool bCentServPingServerInList = false;
|
||||||
bool bNoAutoJackConnect = false;
|
bool bNoAutoJackConnect = false;
|
||||||
int iNumServerChannels = DEFAULT_USED_NUM_CHANNELS;
|
int iNumServerChannels = DEFAULT_USED_NUM_CHANNELS;
|
||||||
|
int iNumItemsHistory = NUM_ITEMS_HISTORY;
|
||||||
|
int iMaxDaysHistory = MAX_DAYS_HISTORY;
|
||||||
int iCtrlMIDIChannel = INVALID_MIDI_CH;
|
int iCtrlMIDIChannel = INVALID_MIDI_CH;
|
||||||
quint16 iPortNumber = LLCON_DEFAULT_PORT_NUMBER;
|
quint16 iPortNumber = LLCON_DEFAULT_PORT_NUMBER;
|
||||||
ELicenceType eLicenceType = LT_NO_LICENCE;
|
ELicenceType eLicenceType = LT_NO_LICENCE;
|
||||||
|
@ -129,6 +131,45 @@ int main ( int argc, char** argv )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Maximum items in history display ------------------------------------
|
||||||
|
if ( GetNumericArgument ( tsConsole,
|
||||||
|
argc,
|
||||||
|
argv,
|
||||||
|
i,
|
||||||
|
"-I",
|
||||||
|
"--histitems",
|
||||||
|
1,
|
||||||
|
65535,
|
||||||
|
rDbleArgument ) )
|
||||||
|
{
|
||||||
|
iNumItemsHistory = static_cast<int> ( rDbleArgument );
|
||||||
|
|
||||||
|
tsConsole << "- maximum items in history display: "
|
||||||
|
<< iNumItemsHistory << endl;
|
||||||
|
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Maximum days in history display ------------------------------------
|
||||||
|
if ( GetNumericArgument ( tsConsole,
|
||||||
|
argc,
|
||||||
|
argv,
|
||||||
|
i,
|
||||||
|
"-D",
|
||||||
|
"--histdays",
|
||||||
|
1,
|
||||||
|
366,
|
||||||
|
rDbleArgument ) )
|
||||||
|
{
|
||||||
|
iMaxDaysHistory = static_cast<int> ( rDbleArgument );
|
||||||
|
|
||||||
|
tsConsole << "- maximum days in history display: "
|
||||||
|
<< iMaxDaysHistory << endl;
|
||||||
|
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Start minimized -----------------------------------------------------
|
// Start minimized -----------------------------------------------------
|
||||||
if ( GetFlagArgument ( argv,
|
if ( GetFlagArgument ( argv,
|
||||||
|
@ -496,6 +537,8 @@ int main ( int argc, char** argv )
|
||||||
// Server:
|
// Server:
|
||||||
// actual server object
|
// actual server object
|
||||||
CServer Server ( iNumServerChannels,
|
CServer Server ( iNumServerChannels,
|
||||||
|
iNumItemsHistory,
|
||||||
|
iMaxDaysHistory,
|
||||||
strLoggingFileName,
|
strLoggingFileName,
|
||||||
iPortNumber,
|
iPortNumber,
|
||||||
strHTMLStatusFileName,
|
strHTMLStatusFileName,
|
||||||
|
@ -610,6 +653,8 @@ QString UsageArguments ( char **argv )
|
||||||
" -w, --welcomemessage welcome message on connect (server only)\n"
|
" -w, --welcomemessage welcome message on connect (server only)\n"
|
||||||
" -y, --history enable connection history and set file\n"
|
" -y, --history enable connection history and set file\n"
|
||||||
" name (server only)\n"
|
" name (server only)\n"
|
||||||
|
" -I, --histitems number of history items to display (server only)\n"
|
||||||
|
" -D, --histdays number of days of history to display (server only)\n"
|
||||||
" -z, --startminimized start minimizied (server only)\n"
|
" -z, --startminimized start minimizied (server only)\n"
|
||||||
" --ctrlmidich MIDI controller channel to listen (client only)"
|
" --ctrlmidich MIDI controller channel to listen (client only)"
|
||||||
"\nExample: " + QString ( argv[0] ) + " -l -inifile myinifile.ini\n";
|
"\nExample: " + QString ( argv[0] ) + " -l -inifile myinifile.ini\n";
|
||||||
|
|
Loading…
Reference in a new issue