| 4014 | |
| 4015 | |
| 4016 | void CPartFile::ClientStateChanged( int oldState, int newState ) |
| 4017 | { |
| 4018 | if ( oldState == newState ) |
| 4019 | return; |
| 4020 | |
| 4021 | // If the state is -1, then it's an entirely new item |
| 4022 | if ( oldState != -1 ) { |
| 4023 | // Was the old state a valid state? |
| 4024 | if ( oldState == DS_ONQUEUE || oldState == DS_DOWNLOADING ) { |
| 4025 | m_validSources--; |
| 4026 | } else { |
| 4027 | if ( oldState == DS_CONNECTED /* || oldState == DS_REMOTEQUEUEFULL */ ) { |
| 4028 | m_validSources--; |
| 4029 | } |
| 4030 | |
| 4031 | m_notCurrentSources--; |
| 4032 | } |
| 4033 | } |
| 4034 | |
| 4035 | // If the state is -1, then the source is being removed |
| 4036 | if ( newState != -1 ) { |
| 4037 | // Was the old state a valid state? |
| 4038 | if ( newState == DS_ONQUEUE || newState == DS_DOWNLOADING ) { |
| 4039 | ++m_validSources; |
| 4040 | } else { |
| 4041 | if ( newState == DS_CONNECTED /* || newState == DS_REMOTEQUEUEFULL */ ) { |
| 4042 | ++m_validSources; |
| 4043 | } |
| 4044 | |
| 4045 | ++m_notCurrentSources; |
| 4046 | } |
| 4047 | } |
| 4048 | } |
| 4049 | |
| 4050 | |
| 4051 | bool CPartFile::AddSource( CUpDownClient* client ) |
no outgoing calls
no test coverage detected