| 144 | |
| 145 | |
| 146 | void CFriend::WriteToFile(CFileDataIO* file) |
| 147 | { |
| 148 | wxASSERT( file ); |
| 149 | file->WriteHash(m_UserHash); |
| 150 | file->WriteUInt32(m_dwLastUsedIP); |
| 151 | file->WriteUInt16(m_nLastUsedPort); |
| 152 | file->WriteUInt32(m_dwLastSeen); |
| 153 | file->WriteUInt32(m_dwLastChatted); |
| 154 | |
| 155 | uint32 tagcount = ( m_strName.IsEmpty() ? 0 : 2 ) + ( m_HasFriendSlot ? 1 : 0 ); |
| 156 | file->WriteUInt32(tagcount); |
| 157 | if ( !m_strName.IsEmpty() ) { |
| 158 | CTagString nametag(FF_NAME, m_strName); |
| 159 | nametag.WriteTagToFile(file, utf8strOptBOM); |
| 160 | nametag.WriteTagToFile(file); |
| 161 | } |
| 162 | if ( m_HasFriendSlot ) { |
| 163 | CTagInt8 slottag(FF_FRIENDSLOT, 1); |
| 164 | slottag.WriteTagToFile(file); |
| 165 | } |
| 166 | } |
| 167 | |
| 168 | |
| 169 | bool CFriend::HasFriendSlot() { |
no test coverage detected