Skip to content

Commit 2abdc4a

Browse files
committed
add enum for feature set
1 parent 94ad42b commit 2abdc4a

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
@@ -457,14 +457,14 @@ void CServer::OnCLReqServerInfo ( CHostAddress RecHostAddr )
457457
{
458458
uint32_t iFeatures = 0;
459459

460-
iFeatures |= (bUseDoubleSystemFrameSize << 0);
461-
iFeatures |= (bUseMultithreading << 1);
462-
iFeatures |= (GetRecorderInitialised() << 2);
463-
iFeatures |= (GetDisableRecording() << 3);
464-
iFeatures |= ((JamController.GetRecorderState() != RS_RECORDING) << 4);
465-
iFeatures |= (bDelayPan << 5);
466-
iFeatures |= (bEnableIPv6 << 6);
467-
// iFeatures |= (bDisableRaw << 5);
460+
iFeatures |= ( !bUseDoubleSystemFrameSize << FS_SMALL_NETW_BUF );
461+
iFeatures |= ( bUseMultithreading << FS_MULTITHREADING );
462+
iFeatures |= ( GetRecorderInitialised() << FS_RECORDER_INIT );
463+
iFeatures |= ( GetDisableRecording() << FS_DISABLE_RECORDING );
464+
iFeatures |= ( (JamController.GetRecorderState() != RS_RECORDING) << FS_IS_RECORDING );
465+
iFeatures |= ( bDelayPan << FS_DELAY_PAN );
466+
iFeatures |= ( bEnableIPv6 << FS_ENABLE_IPV6 );
467+
// iFeatures |= ( bDisableRaw << FS_RAW_AUDIO );
468468

469469
ConnLessProtocol.CreateCLServerInfoMes ( RecHostAddr, iFeatures );
470470
}

src/util.h

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

594+
// Server feature set ----------------------------------------------------------
595+
enum EFeatureSet
596+
{
597+
// used for protocol -> enum values must be fixed
598+
FS_SMALL_NETW_BUF = 0,
599+
FS_MULTITHREADING = 1,
600+
FS_RECORDER_INIT = 2,
601+
FS_DISABLE_RECORDING = 3,
602+
FS_IS_RECORDING = 4,
603+
FS_DELAY_PAN = 5,
604+
FS_ENABLE_IPV6 = 6,
605+
FS_RAW_AUDIO = 7
606+
};
607+
594608
inline QString DirectoryTypeToString ( EDirectoryType eAddrType )
595609
{
596610
switch ( eAddrType )

0 commit comments

Comments
 (0)