| 117 | |
| 118 | |
| 119 | void CFriend::LoadFromFile(CFileDataIO* file) |
| 120 | { |
| 121 | wxASSERT( file ); |
| 122 | |
| 123 | m_UserHash = file->ReadHash(); |
| 124 | m_dwLastUsedIP = file->ReadUInt32(); |
| 125 | m_nLastUsedPort = file->ReadUInt16(); |
| 126 | m_dwLastSeen = file->ReadUInt32(); |
| 127 | m_dwLastChatted = file->ReadUInt32(); |
| 128 | |
| 129 | uint32 tagcount = file->ReadUInt32(); |
| 130 | for ( uint32 j = 0; j != tagcount; j++) { |
| 131 | CTag newtag(*file, true); |
| 132 | switch ( newtag.GetNameID() ) { |
| 133 | case FF_NAME: |
| 134 | if (m_strName.IsEmpty()) { |
| 135 | m_strName = newtag.GetStr(); |
| 136 | } |
| 137 | break; |
| 138 | case FF_FRIENDSLOT: |
| 139 | m_HasFriendSlot = newtag.GetInt() != 0; |
| 140 | break; |
| 141 | } |
| 142 | } |
| 143 | } |
| 144 | |
| 145 | |
| 146 | void CFriend::WriteToFile(CFileDataIO* file) |
no test coverage detected