Changeset 4416
- Timestamp:
- 05/02/06 07:22:56 (3 years ago)
- Location:
- branches/newapi/licq
- Files:
-
- 35 modified
-
doc/PLUGINS.HOWTO (modified) (1 diff)
-
doc/README.CodingStyle (modified) (1 diff)
-
include/licq_chat.h (modified) (4 diffs)
-
include/licq_events.h (modified) (6 diffs)
-
include/licq_filetransfer.h (modified) (3 diffs)
-
include/licq_icqd.h (modified) (11 diffs)
-
include/licq_message.h (modified) (19 diffs)
-
include/licq_onevent.h (modified) (2 diffs)
-
include/licq_packets.h (modified) (65 diffs)
-
include/licq_plugin.h (modified) (3 diffs)
-
include/licq_plugind.h (modified) (2 diffs)
-
include/licq_protoplugin.h (modified) (3 diffs)
-
include/licq_protoplugind.h (modified) (3 diffs)
-
include/licq_user.h (modified) (17 diffs)
-
include/licq_utility.h (modified) (3 diffs)
-
src/fifo.cpp (modified) (18 diffs)
-
src/gpg.cpp (modified) (1 diff)
-
src/icqd-chat.cpp (modified) (8 diffs)
-
src/icqd-filetransfer.cpp (modified) (5 diffs)
-
src/icqd-srv.cpp (modified) (144 diffs)
-
src/icqd-tcp.cpp (modified) (78 diffs)
-
src/icqd-threads.cpp (modified) (9 diffs)
-
src/icqd-udp.cpp (modified) (49 diffs)
-
src/icqd.cpp (modified) (81 diffs)
-
src/icqevent.cpp (modified) (3 diffs)
-
src/icqpacket.cpp (modified) (69 diffs)
-
src/licq.cpp (modified) (2 diffs)
-
src/licq.h (modified) (2 diffs)
-
src/message.cpp (modified) (17 diffs)
-
src/onevent.cpp (modified) (1 diff)
-
src/rtf.cc (modified) (3 diffs)
-
src/rtf.ll (modified) (3 diffs)
-
src/socket.cpp (modified) (1 diff)
-
src/user.cpp (modified) (118 diffs)
-
src/utility.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/newapi/licq/doc/PLUGINS.HOWTO
r3506 r4416 39 39 function should return whether or not it was successful in 40 40 initializing the plugin. 41 LP_Main(C ICQDaemon *): This function is called within its own thread41 LP_Main(CLicqDaemon *): This function is called within its own thread 42 42 and should actually run the plugin. It can exit by calling 43 43 LP_Exit(int) or by returning an integer return code. 44 44 45 45 2. Each plugin must register with the licq daemon it gets passed in 46 LP_Main(). This is done simply by calling C ICQDaemon::Register().46 LP_Main(). This is done simply by calling CLicqDaemon::Register(). 47 47 This function returns the descriptor of the pipe to listen on for 48 48 notification of signals and events. If a plugin exits without either 49 calling C ICQDaemon::Shutdown() or receiving a shutdown signal then it50 must call C ICQDaemon::Unregister() to unregister itself.49 calling CLicqDaemon::Shutdown() or receiving a shutdown signal then it 50 must call CLicqDaemon::Unregister() to unregister itself. 51 51 52 52 3. Each plugin must exit properly when it receives a PLUGIN_SHUTDOWN -
branches/newapi/licq/doc/README.CodingStyle
r3506 r4416 125 125 * remote user should be notified or not. 126 126 */ 127 class AddUserDlg (C ICQDaemon *s, QWidget *parent)127 class AddUserDlg (CLicqDaemon *s, QWidget *parent) 128 128 : QDialog(parent, "AddUserDialog") 129 129 { -
branches/newapi/licq/include/licq_chat.h
r3958 r4416 5 5 6 6 #include "licq_packets.h" 7 class C ICQDaemon;7 class CLicqDaemon; 8 8 9 9 … … 234 234 public: 235 235 CChatClient(); 236 CChatClient( ICQUser *);236 CChatClient(CLicqUser *); 237 237 CChatClient(const CChatClient &); 238 238 CChatClient& operator=(const CChatClient &); … … 557 557 { 558 558 public: 559 CChatManager(C ICQDaemon *d, unsigned long nUin,559 CChatManager(CLicqDaemon *d, unsigned long nUin, 560 560 const char *fontFamily = "courier", 561 561 unsigned char fontEncoding = ENCODING_DEFAULT, … … 617 617 static pthread_mutex_t waiting_thread_cancel_mutex; 618 618 619 C ICQDaemon *licqDaemon;619 CLicqDaemon *licqDaemon; 620 620 int pipe_events[2], pipe_thread[2]; 621 621 unsigned long m_nUin; -
branches/newapi/licq/include/licq_events.h
r4296 r4416 12 12 13 13 class CPacket; 14 class C ICQDaemon;14 class CLicqDaemon; 15 15 class CUserEvent; 16 class ICQUser;16 class CLicqUser; 17 17 18 18 //-----CExtendedAck---------------------------------------------------------- … … 44 44 char *m_szResponse; 45 45 46 friend class C ICQDaemon;46 friend class CLicqDaemon; 47 47 }; 48 48 … … 114 114 char m_nAuth; 115 115 116 friend class C ICQDaemon;116 friend class CLicqDaemon; 117 117 }; 118 118 … … 227 227 //!to avoid having to add the user to the list before checking their 228 228 //!other information. 229 ICQUser *UnknownUser() { return m_pUnknownUser; }229 CLicqUser *UnknownUser() { return m_pUnknownUser; } 230 230 231 231 // Returns the event and transfers ownership to the calling function 232 232 CUserEvent *GrabUserEvent(); 233 233 CSearchAck *GrabSearchAck(); 234 ICQUser *GrabUnknownUser();234 CLicqUser *GrabUnknownUser(); 235 235 236 236 //!Compare this event to the id to see if the plugin matches a waiting … … 241 241 242 242 protected: 243 ICQEvent(C ICQDaemon *_xDaemon, int _nSocketDesc, CPacket *p, ConnectType _eConnect,243 ICQEvent(CLicqDaemon *_xDaemon, int _nSocketDesc, CPacket *p, ConnectType _eConnect, 244 244 unsigned long _nUin, CUserEvent *e); 245 ICQEvent(C ICQDaemon *_xDaemon, int _nSocketDesc, CPacket *p, ConnectType _eConnect,245 ICQEvent(CLicqDaemon *_xDaemon, int _nSocketDesc, CPacket *p, ConnectType _eConnect, 246 246 const char *_szId, unsigned long _nPPID, CUserEvent *e); 247 247 ICQEvent(ICQEvent *); … … 283 283 CExtendedAck *m_pExtendedAck; 284 284 CSearchAck *m_pSearchAck; 285 ICQUser *m_pUnknownUser;286 287 C ICQDaemon *m_pDaemon;285 CLicqUser *m_pUnknownUser; 286 287 CLicqDaemon *m_pDaemon; 288 288 289 289 unsigned long m_nEventId; 290 290 static unsigned long s_nNextEventId; 291 291 292 friend class C ICQDaemon;292 friend class CLicqDaemon; 293 293 friend class CMSN; 294 294 friend void *ProcessRunningEvent_Client_tep(void *p); -
branches/newapi/licq/include/licq_filetransfer.h
r3958 r4416 58 58 59 59 #include "licq_packets.h" 60 class C ICQDaemon;60 class CLicqDaemon; 61 61 62 62 … … 190 190 { 191 191 public: 192 CFileTransferManager(C ICQDaemon *d, unsigned long nUin);192 CFileTransferManager(CLicqDaemon *d, unsigned long nUin); 193 193 ~CFileTransferManager(); 194 194 … … 246 246 pthread_t m_tThread; 247 247 248 C ICQDaemon *licqDaemon;248 CLicqDaemon *licqDaemon; 249 249 int pipe_events[2], pipe_thread[2]; 250 250 FileTransferEventList ftEvents; -
branches/newapi/licq/include/licq_icqd.h
r4355 r4416 36 36 class CLicq; 37 37 class CUserManager; 38 class ICQUser;38 class CLicqUser; 39 39 class CICQEventTag; 40 40 class TCPSocket; … … 103 103 char m_szName[32]; 104 104 105 friend class C ICQDaemon;105 friend class CLicqDaemon; 106 106 friend class CMSN; 107 107 }; … … 144 144 static pthread_mutex_t s_xMutex; 145 145 146 friend class C ICQDaemon;146 friend class CLicqDaemon; 147 147 }; 148 148 149 149 typedef std::list<CConversation *> ConversationList; 150 150 151 //=====C ICQDaemon===============================================================151 //=====CLicqDaemon=============================================================== 152 152 enum EDaemonStatus {STATUS_ONLINE, STATUS_OFFLINE_MANUAL, STATUS_OFFLINE_FORCED }; 153 153 154 class C ICQDaemon154 class CLicqDaemon 155 155 { 156 156 public: 157 C ICQDaemon(CLicq *);158 ~C ICQDaemon();157 CLicqDaemon(CLicq *); 158 ~CLicqDaemon(); 159 159 int RegisterPlugin(unsigned long _nSignalMask); 160 160 void UnregisterPlugin(); … … 416 416 char nLanguage2, char nLanguage3); 417 417 unsigned long icqSetSecurityInfo(bool bAuthorize, bool bHideIp, bool bWebAware); 418 unsigned long icqSetInterestsInfo(const ICQUserCategory *interests);419 unsigned long icqSetOrgBackInfo(const ICQUserCategory *orgs,420 const ICQUserCategory *background);418 unsigned long icqSetInterestsInfo(const CLicqUserCategory *interests); 419 unsigned long icqSetOrgBackInfo(const CLicqUserCategory *orgs, 420 const CLicqUserCategory *background); 421 421 unsigned long icqSetHomepageInfo(bool bCatetory, unsigned short nCategory, 422 422 const char *szHomepageDesc, bool bICQHomepage); … … 536 536 bool bTempUser = false); 537 537 bool AddUserToList(unsigned long _nUin, bool bNotify = true); 538 void AddUserToList( ICQUser *);538 void AddUserToList(CLicqUser *); 539 539 void RemoveUserFromList(unsigned long _nUin); 540 540 void RemoveUserFromList(const char *szId, unsigned long nPPID); … … 638 638 639 639 // Common message handler 640 void ProcessMessage( ICQUser *user, CBuffer &packet, char *message,640 void ProcessMessage(CLicqUser *user, CBuffer &packet, char *message, 641 641 unsigned short nMsgType, unsigned long nMask, 642 642 unsigned long nMsgID[], unsigned short nSequence, 643 643 bool bIsAck, bool &bNewUser); 644 644 645 bool ProcessPluginMessage(CBuffer &packet, ICQUser *u, unsigned char nChannel,645 bool ProcessPluginMessage(CBuffer &packet, CLicqUser *u, unsigned char nChannel, 646 646 bool bIsAck, unsigned long nMsgID1, 647 647 unsigned long nMsgID2, unsigned short nSequence, … … 733 733 unsigned short m_nServerAck; 734 734 735 void ChangeUserStatus( ICQUser *u, unsigned long s);736 bool AddUserEvent( ICQUser *, CUserEvent *);735 void ChangeUserStatus(CLicqUser *u, unsigned long s); 736 bool AddUserEvent(CLicqUser *, CUserEvent *); 737 737 void RejectEvent(unsigned long, CUserEvent *); 738 ICQUser *FindUserForInfoUpdate(const char *szId, ICQEvent *e, const char *);738 CLicqUser *FindUserForInfoUpdate(const char *szId, ICQEvent *e, const char *); 739 739 unsigned long FindUinByCellular(const char *_szCellular); 740 740 … … 769 769 ICQEvent *SendExpectEvent_Server(unsigned long nUin, CPacket *, CUserEvent *, bool = false); 770 770 ICQEvent *SendExpectEvent_Server(const char *, unsigned long, CPacket *, CUserEvent *, bool = false); 771 ICQEvent *SendExpectEvent_Client( ICQUser *, CPacket *, CUserEvent *);771 ICQEvent *SendExpectEvent_Client(CLicqUser *, CPacket *, CUserEvent *); 772 772 ICQEvent *SendExpectEvent(ICQEvent *, void *(*fcn)(void *)); 773 773 void AckTCP(CPacketTcp &, int); … … 811 811 812 812 // Protected plugin related stuff 813 unsigned long icqRequestInfoPlugin( ICQUser *, bool, const char *);814 unsigned long icqRequestStatusPlugin( ICQUser *, bool, const char *);813 unsigned long icqRequestInfoPlugin(CLicqUser *, bool, const char *); 814 unsigned long icqRequestStatusPlugin(CLicqUser *, bool, const char *); 815 815 void icqUpdateInfoTimestamp(const char *); 816 816 … … 826 826 friend void *Shutdown_tep(void *p); 827 827 friend void *ConnectToServer_tep(void *s); 828 friend class ICQUser;828 friend class CLicqUser; 829 829 friend class CSocketManager; 830 830 friend class CChatManager; … … 837 837 838 838 // Global pointer 839 extern C ICQDaemon *gLicqDaemon;839 extern CLicqDaemon *gLicqDaemon; 840 840 841 841 // Helper functions for the daemon -
branches/newapi/licq/include/licq_message.h
r4300 r4416 23 23 const unsigned long E_UNKNOWN = 0x80000000; 24 24 25 class ICQUser;25 class CLicqUser; 26 26 27 27 … … 61 61 62 62 protected: 63 virtual void AddToHistory( ICQUser *, unsigned long, direction) = 0;63 virtual void AddToHistory(CLicqUser *, unsigned long, direction) = 0; 64 64 int AddToHistory_Header(direction, char *); 65 void AddToHistory_Flush( ICQUser *, unsigned long, char *);65 void AddToHistory_Flush(CLicqUser *, unsigned long, char *); 66 66 67 67 void SetDirection(direction d) { m_eDir = d; } … … 88 88 unsigned long m_nConvoId; 89 89 90 friend class C ICQDaemon;90 friend class CLicqDaemon; 91 91 friend class CMSN; 92 92 friend class CUserHistory; … … 109 109 } 110 110 const char *Message() { return m_szMessage; } 111 virtual void AddToHistory( ICQUser *, unsigned long, direction);111 virtual void AddToHistory(CLicqUser *, unsigned long, direction); 112 112 113 113 static CEventMsg *Parse(char *sz, unsigned short nCmd, time_t nTime, … … 129 129 unsigned long _nMsgID1 = 0, unsigned long _nMsgID2 = 0); 130 130 virtual ~CEventFile(); 131 virtual void AddToHistory( ICQUser *, unsigned long, direction);131 virtual void AddToHistory(CLicqUser *, unsigned long, direction); 132 132 virtual CEventFile *Copy() 133 133 { … … 162 162 unsigned long _nFlags, unsigned long _nConvoId = 0); 163 163 virtual ~CEventUrl(); 164 virtual void AddToHistory( ICQUser *, unsigned long, direction);164 virtual void AddToHistory(CLicqUser *, unsigned long, direction); 165 165 virtual CEventUrl *Copy() 166 166 { … … 193 193 unsigned long _nConvoId = 0, unsigned long nMsgID1 = 0, unsigned long nMsgID2 = 0); 194 194 virtual ~CEventChat(); 195 virtual void AddToHistory( ICQUser *, unsigned long, direction);195 virtual void AddToHistory(CLicqUser *, unsigned long, direction); 196 196 virtual CEventChat *Copy() 197 197 { … … 225 225 unsigned short _nCommand, time_t _tTime, unsigned long _nFlags); 226 226 virtual ~CEventAdded(); 227 virtual void AddToHistory( ICQUser *, unsigned long, direction);227 virtual void AddToHistory(CLicqUser *, unsigned long, direction); 228 228 virtual CEventAdded *Copy() 229 229 { … … 261 261 unsigned short _nCommand, time_t _tTime, unsigned long _nFlags); 262 262 virtual ~CEventAuthRequest(); 263 virtual void AddToHistory( ICQUser *, unsigned long, direction);263 virtual void AddToHistory(CLicqUser *, unsigned long, direction); 264 264 virtual CEventAuthRequest *Copy() 265 265 { … … 295 295 unsigned short _nCommand, time_t _tTime, unsigned long _nFlags); 296 296 virtual ~CEventAuthGranted(); 297 virtual void AddToHistory( ICQUser *, unsigned long, direction);297 virtual void AddToHistory(CLicqUser *, unsigned long, direction); 298 298 virtual CEventAuthGranted *Copy() 299 299 { … … 324 324 unsigned short _nCommand, time_t _tTime, unsigned long _nFlags); 325 325 virtual ~CEventAuthRefused(); 326 virtual void AddToHistory( ICQUser *, unsigned long, direction);326 virtual void AddToHistory(CLicqUser *, unsigned long, direction); 327 327 virtual CEventAuthRefused *Copy() 328 328 { … … 351 351 unsigned short _nCommand, time_t _tTime, unsigned long _nFlags); 352 352 virtual ~CEventWebPanel(); 353 virtual void AddToHistory( ICQUser *, unsigned long, direction);353 virtual void AddToHistory(CLicqUser *, unsigned long, direction); 354 354 virtual CEventWebPanel *Copy() 355 355 { … … 374 374 unsigned short _nCommand, time_t _tTime, unsigned long _nFlags); 375 375 virtual ~CEventEmailPager(); 376 virtual void AddToHistory( ICQUser *, unsigned long, direction);376 virtual void AddToHistory(CLicqUser *, unsigned long, direction); 377 377 virtual CEventEmailPager *Copy() 378 378 { … … 419 419 time_t tTime, unsigned long nFlags); 420 420 virtual ~CEventContactList(); 421 virtual void AddToHistory( ICQUser *, unsigned long, direction);421 virtual void AddToHistory(CLicqUser *, unsigned long, direction); 422 422 virtual CEventContactList *Copy() 423 423 { … … 452 452 const char *Number() { return m_szNumber; } 453 453 const char *Message() { return m_szMessage; } 454 virtual void AddToHistory( ICQUser *, unsigned long, direction);454 virtual void AddToHistory(CLicqUser *, unsigned long, direction); 455 455 456 456 static CEventSms *Parse(char *sz, unsigned short nCmd, time_t nTime, unsigned long nFlags); … … 469 469 virtual ~CEventServerMessage(); 470 470 471 virtual void AddToHistory( ICQUser *, unsigned long, direction);471 virtual void AddToHistory(CLicqUser *, unsigned long, direction); 472 472 473 473 virtual CEventServerMessage *Copy() … … 501 501 virtual ~CEventEmailAlert(); 502 502 503 virtual void AddToHistory( ICQUser *, unsigned long, direction);503 virtual void AddToHistory(CLicqUser *, unsigned long, direction); 504 504 505 505 virtual CEventEmailAlert *Copy() … … 552 552 time_t tTime, unsigned long nFlags); 553 553 ~CEventPlugin(); 554 virtual void AddToHistory( ICQUser *, unsigned long, direction);554 virtual void AddToHistory(CLicqUser *, unsigned long, direction); 555 555 virtual CEventPlugin *Copy() 556 556 { return new CEventPlugin(m_sz, m_nSubCommand, m_tTime, m_nFlags); } … … 576 576 time_t _tTime, unsigned long _nFlags); 577 577 ~CEventUnknownSysMsg(); 578 virtual void AddToHistory( ICQUser *, unsigned long, direction);578 virtual void AddToHistory(CLicqUser *, unsigned long, direction); 579 579 virtual CEventUnknownSysMsg *Copy() 580 580 { -
branches/newapi/licq/include/licq_onevent.h
r3961 r4416 5 5 //#include "pthread_rdwr.h" 6 6 7 class ICQUser;7 class CLicqUser; 8 8 9 9 //=====COnEventManager========================================================== … … 27 27 ~COnEventManager(); 28 28 29 void Do(unsigned short m_nEvent, ICQUser *u);29 void Do(unsigned short m_nEvent, CLicqUser *u); 30 30 void SetParameters(const char *, const char **); 31 31 void SetCommandType(unsigned short _nCommandType); -
branches/newapi/licq/include/licq_packets.h
r4356 r4416 654 654 { 655 655 public: 656 CPU_Type2Message( ICQUser *u, bool _bAck, bool _bDirectInfo, const char *cap,656 CPU_Type2Message(CLicqUser *u, bool _bAck, bool _bDirectInfo, const char *cap, 657 657 unsigned long nMsgID1 = 0, 658 658 unsigned long nMsgID2 = 0); … … 660 660 void InitBuffer(); 661 661 662 ICQUser *m_pUser;662 CLicqUser *m_pUser; 663 663 bool m_bAck; 664 664 bool m_bDirectInfo; … … 672 672 { 673 673 public: 674 CPU_ReverseConnect( ICQUser *u, unsigned long nLocalIP,674 CPU_ReverseConnect(CLicqUser *u, unsigned long nLocalIP, 675 675 unsigned short nLocalPort, unsigned short nRemotePort); 676 676 }; … … 689 689 { 690 690 public: 691 CPU_PluginMessage( ICQUser *u, bool bAck, const char *PluginGUID,691 CPU_PluginMessage(CLicqUser *u, bool bAck, const char *PluginGUID, 692 692 unsigned long nMsgID1 = 0, unsigned long nMsgID2 = 0); 693 693 … … 702 702 { 703 703 public: 704 CPU_InfoPluginReq( ICQUser *u, const char *GUID, unsigned long nTime);704 CPU_InfoPluginReq(CLicqUser *u, const char *GUID, unsigned long nTime); 705 705 virtual const char *RequestGUID() { return m_ReqGUID; } 706 706 virtual const unsigned short ExtraInfo() { return ServerInfoPluginRequest; } … … 714 714 { 715 715 public: 716 CPU_StatusPluginReq( ICQUser *u, const char *GUID, unsigned long nTime);716 CPU_StatusPluginReq(CLicqUser *u, const char *GUID, unsigned long nTime); 717 717 virtual const unsigned short ExtraInfo() { return ServerStatusPluginRequest; } 718 718 virtual const char *RequestGUID() { return m_ReqGUID; } … … 726 726 { 727 727 public: 728 CPU_AdvancedMessage( ICQUser *u, unsigned short _nMsgType,728 CPU_AdvancedMessage(CLicqUser *u, unsigned short _nMsgType, 729 729 unsigned short _nMsgFlags, bool _bAck, 730 730 unsigned short _nSequence, … … 744 744 public: 745 745 CPU_ChatRequest(char *szReason, const char *szChatUsers, unsigned short nPort, 746 unsigned short nLevel, ICQUser *pUser, bool bICBM);746 unsigned short nLevel, CLicqUser *pUser, bool bICBM); 747 747 }; 748 748 … … 751 751 { 752 752 public: 753 CPU_FileTransfer( ICQUser *, ConstFileList &lFileList, const char *_szFile,753 CPU_FileTransfer(CLicqUser *, ConstFileList &lFileList, const char *_szFile, 754 754 const char *_szDesc, unsigned short nLevel, bool bICBM); 755 755 }; … … 759 759 { 760 760 public: 761 CPU_NoManager( ICQUser *u, unsigned long nMsgID1, unsigned long nMsgID2);761 CPU_NoManager(CLicqUser *u, unsigned long nMsgID1, unsigned long nMsgID2); 762 762 }; 763 763 … … 766 766 { 767 767 public: 768 CPU_AckThroughServer( ICQUser *u, unsigned long msgid1,768 CPU_AckThroughServer(CLicqUser *u, unsigned long msgid1, 769 769 unsigned long msgid2, unsigned short sequence, 770 770 unsigned short msgType, bool bAccept, … …
