MCPcopy Create free account
hub / github.com/amule-project/amule / WriteToFile

Method WriteToFile

src/Friend.cpp:146–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144
145
146void 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
169bool CFriend::HasFriendSlot() {

Callers 3

SaveListMethod · 0.45
SaveMethod · 0.45
AppendMethod · 0.45

Calls 5

WriteUInt32Method · 0.80
WriteUInt16Method · 0.80
WriteTagToFileMethod · 0.80
WriteHashMethod · 0.45
IsEmptyMethod · 0.45

Tested by

no test coverage detected