Show
Ignore:
Timestamp:
07/03/08 07:19:15 (5 months ago)
Author:
eugene
Message:

Made server-side users be collected into a separate map and processed all at once when contact list is received.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/licq/include/licq_icqd.h

    r6402 r6404  
    1111#include <map> 
    1212#include <string> 
     13 
     14#include <boost/shared_array.hpp> 
    1315 
    1416#include "licq_events.h" 
     
    140142 
    141143typedef std::list<CConversation *> ConversationList; 
     144 
     145/** 
     146 * Internal template class for storing and processing received contact list. 
     147 */ 
     148class CUserProperties 
     149{ 
     150public: 
     151  CUserProperties(); 
     152 
     153private: 
     154  boost::shared_array<char> newAlias; 
     155  boost::shared_array<char> newCellular; 
     156 
     157  unsigned short normalSid; 
     158  unsigned short groupId; 
     159 
     160  unsigned short visibleSid; 
     161  unsigned short invisibleSid; 
     162  bool inIgnoreList; 
     163 
     164  bool awaitingAuth; 
     165 
     166  TLVList tlvs; 
     167 
     168friend class CICQDaemon; 
     169}; 
     170 
     171typedef std::map<std::string, CUserProperties*> ContactUserList; 
     172typedef ContactUserList::iterator ContactUserListIter; 
    142173 
    143174//=====CICQDaemon=============================================================== 
     
    745776  static pthread_cond_t  cond_reverseconnect_done; 
    746777 
     778  ContactUserList receivedUserList; 
     779 
    747780  ConversationList m_lConversations; 
    748781  pthread_mutex_t mutex_conversations; 
     
    830863  void ProcessListFam(CBuffer &, unsigned short); 
    831864  void ProcessAuthFam(CBuffer &, unsigned short); 
     865 
     866  void ProcessUserList(); 
    832867 
    833868  void ProcessSystemMessage(CBuffer &packet, unsigned long checkUin, unsigned short newCommand, time_t timeSent);