Skip to content

Commit 961aecc

Browse files
committed
add enum for feature set
1 parent 87e7c7a commit 961aecc

2 files changed

Lines changed: 22 additions & 8 deletions

File tree

src/server.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -479,14 +479,14 @@ void CServer::OnCLReqServerInfo ( CHostAddress RecHostAddr )
479479
{
480480
uint32_t iFeatures = 0;
481481

482-
iFeatures |= (bUseDoubleSystemFrameSize << 0);
483-
iFeatures |= (bUseMultithreading << 1);
484-
iFeatures |= (GetRecorderInitialised() << 2);
485-
iFeatures |= (GetDisableRecording() << 3);
486-
iFeatures |= ((JamController.GetRecorderState() != RS_RECORDING) << 4);
487-
iFeatures |= (bDelayPan << 5);
488-
iFeatures |= (bEnableIPv6 << 6);
489-
// iFeatures |= (bDisableRaw << 5);
482+
iFeatures |= ( !bUseDoubleSystemFrameSize << FS_SMALL_NETW_BUF );
483+
iFeatures |= ( bUseMultithreading << FS_MULTITHREADING );
484+
iFeatures |= ( GetRecorderInitialised() << FS_RECORDER_INIT );
485+
iFeatures |= ( GetDisableRecording() << FS_DISABLE_RECORDING );
486+
iFeatures |= ( (JamController.GetRecorderState() != RS_RECORDING) << FS_IS_RECORDING );
487+
iFeatures |= ( bDelayPan << FS_DELAY_PAN );
488+
iFeatures |= ( bEnableIPv6 << FS_ENABLE_IPV6 );
489+
// iFeatures |= ( bDisableRaw << FS_RAW_AUDIO );
490490

491491
ConnLessProtocol.CreateCLServerInfoMes ( RecHostAddr, iFeatures );
492492
}

src/util.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,20 @@ enum EDirectoryType
613613
AT_CUSTOM = 7 // Must be the last entry!
614614
};
615615

616+
// Server feature set ----------------------------------------------------------
617+
enum EFeatureSet
618+
{
619+
// used for protocol -> enum values must be fixed
620+
FS_SMALL_NETW_BUF = 0,
621+
FS_MULTITHREADING = 1,
622+
FS_RECORDER_INIT = 2,
623+
FS_DISABLE_RECORDING = 3,
624+
FS_IS_RECORDING = 4,
625+
FS_DELAY_PAN = 5,
626+
FS_ENABLE_IPV6 = 6,
627+
FS_RAW_AUDIO = 7
628+
};
629+
616630
inline QString DirectoryTypeToString ( EDirectoryType eAddrType )
617631
{
618632
switch ( eAddrType )

0 commit comments

Comments
 (0)