Changeset 6462 for trunk/licq
- Timestamp:
- 07/24/08 04:07:24 (4 months ago)
- Location:
- trunk/licq
- Files:
-
- 5 modified
-
include/licq_history.h (modified) (1 diff)
-
include/licq_user.h (modified) (13 diffs)
-
src/history.cpp (modified) (1 diff)
-
src/icqd-srv.cpp (modified) (19 diffs)
-
src/user.cpp (modified) (22 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/licq/include/licq_history.h
r6177 r6462 17 17 void SetFile(const char *, const char *, unsigned long); 18 18 void Append(const char* buf) { Write(buf, true); } 19 bool Load(HistoryList &);19 bool Load(HistoryList& history) const; 20 20 static void Clear(HistoryList &); 21 21 void Save(const char* buf) { Write(buf, false); } 22 const char *Description(){ return m_szDescription; }23 const char *FileName(){ return m_szFileName; }22 const char* Description() const { return m_szDescription; } 23 const char* FileName() const { return m_szFileName; } 24 24 25 25 /** -
trunk/licq/include/licq_user.h
r6459 r6462 331 331 332 332 bool Get(unsigned d,unsigned short *id, char const ** descr) const; 333 UserCat GetCategory() { return m_uc; }333 UserCat GetCategory() const { return m_uc; } 334 334 335 335 static const unsigned MAX_CATEGORIES = 4; … … 409 409 void SetActive(long nEntry); 410 410 411 bool Get(unsigned long nEntry, const struct PhoneBookEntry **entry);411 bool Get(unsigned long nEntry, const struct PhoneBookEntry** entry) const; 412 412 413 413 private: … … 451 451 // General Info 452 452 //!Retrieves the user's alias. 453 c har *GetAlias() { return m_szAlias;}453 const char* GetAlias() const { return m_szAlias; } 454 454 //!Retrieves the user's first name. 455 c har *GetFirstName() { return m_szFirstName;}455 const char* GetFirstName() const { return m_szFirstName; } 456 456 //!Retrieves the user's last name. 457 c har *GetLastName() { return m_szLastName;}457 const char* GetLastName() const { return m_szLastName; } 458 458 //!Retrieves the user's primary e-mail address. 459 c har *GetEmailPrimary() { return m_szEmailPrimary;}459 const char* GetEmailPrimary() const { return m_szEmailPrimary; } 460 460 //!Retrieves the user's secondary e-mail address. 461 c har *GetEmailSecondary() { return m_szEmailSecondary;}461 const char* GetEmailSecondary() const { return m_szEmailSecondary; } 462 462 //!Retrieves the user's old e-mail address. 463 c har *GetEmailOld() { return m_szEmailOld;}463 const char* GetEmailOld() const { return m_szEmailOld; } 464 464 //!Retrieves the user's city. 465 c har *GetCity() { return m_szCity;}465 const char* GetCity() const { return m_szCity; } 466 466 //!Retrieves the user's state. 467 c har *GetState() { return m_szState;}467 const char* GetState() const { return m_szState; } 468 468 //!Retrieves the user's phone number. 469 c har *GetPhoneNumber() { return m_szPhoneNumber;}469 const char* GetPhoneNumber() const { return m_szPhoneNumber; } 470 470 //!Retrieves the user's fax number. 471 c har *GetFaxNumber() { return m_szFaxNumber;}471 const char* GetFaxNumber() const { return m_szFaxNumber; } 472 472 //!Retrieves the user's street address. 473 c har *GetAddress() { return m_szAddress;}473 const char* GetAddress() const { return m_szAddress; } 474 474 //!Retrieves the user's cellular phone number. 475 c har *GetCellularNumber() { return m_szCellularNumber;}475 const char* GetCellularNumber() const { return m_szCellularNumber; } 476 476 //!Retrieves the user's zip code. 477 c har *GetZipCode() { return m_szZipCode;}477 const char* GetZipCode() const { return m_szZipCode; } 478 478 //!Retrieves the user's country code. Used to lookup the country name. 479 unsigned short GetCountryCode() { return m_nCountryCode;}479 unsigned short GetCountryCode() const { return m_nCountryCode; } 480 480 //!Retrieves the user's time code. 481 char GetTimezone() { return m_nTimezone;}481 char GetTimezone() const { return m_nTimezone; } 482 482 //!Returns true if the user requires you to be authorized to add 483 483 //!them to anyone's ICQ list. 484 bool GetAuthorization() { return m_bAuthorization;}484 bool GetAuthorization() const { return m_bAuthorization; } 485 485 //!Retrieves the users's web status 486 unsigned char GetWebAwareStatus() {return m_nWebAwareStatus; }486 unsigned char GetWebAwareStatus() const { return m_nWebAwareStatus; } 487 487 //!Returns true if the user has attempted to hide the e-mail addresses 488 488 //!provided in their information. 489 bool GetHideEmail() { return m_bHideEmail;}489 bool GetHideEmail() const { return m_bHideEmail; } 490 490 491 491 // More Info 492 492 //!Retrieves the user's age. 493 unsigned short GetAge() { return m_nAge;}493 unsigned short GetAge() const { return m_nAge; } 494 494 //!Retrieves the user's gender. 495 char GetGender() { return m_nGender;}495 char GetGender() const { return m_nGender; } 496 496 //!Retrieves the user's homepage URL. 497 c har *GetHomepage() { return m_szHomepage;}497 const char* GetHomepage() const { return m_szHomepage; } 498 498 //!Retrieves the user's year they were born ih. 499 unsigned short GetBirthYear() { return m_nBirthYear;}499 unsigned short GetBirthYear() const { return m_nBirthYear; } 500 500 //!Retrieves the user's month they were born in. 501 char GetBirthMonth() { return m_nBirthMonth;}501 char GetBirthMonth() const { return m_nBirthMonth; } 502 502 //!Retrieves the user's day they were born in. 503 char GetBirthDay() { return m_nBirthDay;}503 char GetBirthDay() const { return m_nBirthDay; } 504 504 //!Retrieves the user's first language. 505 char GetLanguage1() { return m_nLanguage[0];}505 char GetLanguage1() const { return m_nLanguage[0]; } 506 506 //!Retrieves the user's second language. 507 char GetLanguage2() { return m_nLanguage[1];}507 char GetLanguage2() const { return m_nLanguage[1]; } 508 508 //!Retrieves the user's third language. 509 char GetLanguage3() { return m_nLanguage[2];}509 char GetLanguage3() const { return m_nLanguage[2]; } 510 510 //!Retrieves the user's language as specified by the parameter. 511 511 //!Useful when retrieving their languages in a loop. 512 char GetLanguage(unsigned char l) { return m_nLanguage[l];}512 char GetLanguage(unsigned char l) const { return m_nLanguage[l]; } 513 513 514 514 // Homepage Info 515 515 //!Returns true if the user has entered a homepage category 516 bool GetHomepageCatPresent() { return m_bHomepageCatPresent; }516 bool GetHomepageCatPresent() const { return m_bHomepageCatPresent; } 517 517 //!Retrieves the user's homepage category code 518 unsigned short GetHomepageCatCode() { return m_nHomepageCatCode; }518 unsigned short GetHomepageCatCode() const { return m_nHomepageCatCode; } 519 519 //!Retrivies the users homepage description 520 c har *GetHomepageDesc(){ return m_szHomepageDesc; }521 //!Returns true if the user has an ICQ homepage (http://<uin>.home.icq.com/) 522 bool GetICQHomepagePresent() { return m_bICQHomepagePresent; }520 const char* GetHomepageDesc() const { return m_szHomepageDesc; } 521 //!Returns true if the user has an ICQ homepage (http://<uin>.home.icq.com/) const 522 bool GetICQHomepagePresent() const { return m_bICQHomepagePresent; } 523 523 524 524 // Work Info 525 525 //!Retrieves the city of the company the user is employed by. 526 c har *GetCompanyCity() { return m_szCompanyCity;}526 const char* GetCompanyCity() const { return m_szCompanyCity; } 527 527 //!Retrieves the state of the company the user is employed by. 528 c har *GetCompanyState() { return m_szCompanyState;}528 const char* GetCompanyState() const { return m_szCompanyState; } 529 529 //!Retrieves the phone number of the company's phone number the user is employed by. 530 c har *GetCompanyPhoneNumber(){ return m_szCompanyPhoneNumber; }530 const char* GetCompanyPhoneNumber() const { return m_szCompanyPhoneNumber; } 531 531 //!Retrieves the fax bynber of the company the user is employed by. 532 c har *GetCompanyFaxNumber() { return m_szCompanyFaxNumber;}532 const char* GetCompanyFaxNumber() const { return m_szCompanyFaxNumber; } 533 533 //!Retrieves the street address of the company the user is employed by. 534 c har *GetCompanyAddress() { return m_szCompanyAddress;}534 const char* GetCompanyAddress() const { return m_szCompanyAddress; } 535 535 //!Retrieves the zip code of the company the user is employed by. 536 c har *GetCompanyZip() { return m_szCompanyZip;}536 const char* GetCompanyZip() const { return m_szCompanyZip; } 537 537 //!Retrieves the country code of the company the user is employed by. 538 538 //!Used to look up the country name. 539 unsigned short GetCompanyCountry() { return m_nCompanyCountry;}539 unsigned short GetCompanyCountry() const { return m_nCompanyCountry; } 540 540 //!Retrieves the name of the company the user is employed by. 541 c har *GetCompanyName() { return m_szCompanyName;}541 const char* GetCompanyName() const { return m_szCompanyName; } 542 542 //!Retrieves the department the user is in. 543 c har *GetCompanyDepartment() { return m_szCompanyDepartment;}543 const char* GetCompanyDepartment() const { return m_szCompanyDepartment; } 544 544 //!Retrieves the user's job title. 545 c har *GetCompanyPosition() { return m_szCompanyPosition;}545 const char* GetCompanyPosition() const { return m_szCompanyPosition; } 546 546 //!Retrieves the users's occupation code 547 unsigned short GetCompanyOccupation() { return m_nCompanyOccupation; }547 unsigned short GetCompanyOccupation() const { return m_nCompanyOccupation; } 548 548 //!Retrieves the URL of the company the user is employed by. 549 c har *GetCompanyHomepage() { return m_szCompanyHomepage;}549 const char* GetCompanyHomepage() const { return m_szCompanyHomepage; } 550 550 551 551 // About Info 552 552 //!Retrieves the self description of the user. 553 c har *GetAbout(){ return m_szAbout; }553 const char* GetAbout() const { return m_szAbout; } 554 554 555 555 // More2 Info 556 556 //!Retrieves the user's interests 557 557 ICQUserCategory *GetInterests() { return m_Interests; } 558 const ICQUserCategory* GetInterests() const { return m_Interests; } 558 559 //!Retrieves the user's backgrounds 559 560 ICQUserCategory *GetBackgrounds() { return m_Backgrounds; } 561 const ICQUserCategory* GetBackgrounds() const { return m_Backgrounds; } 560 562 //!Retrieves the user's organizations 561 563 ICQUserCategory *GetOrganizations() { return m_Organizations; } 564 const ICQUserCategory* GetOrganizations() const { return m_Organizations; } 562 565 563 566 // Phone Book Info 564 567 //!Retrives the user's phone book 565 568 ICQUserPhoneBook *GetPhoneBook() { return m_PhoneBook; } 569 const ICQUserPhoneBook* GetPhoneBook() const { return m_PhoneBook; } 566 570 567 571 // Picture Info 568 bool GetPicturePresent() { return m_bPicturePresent; }572 bool GetPicturePresent() const { return m_bPicturePresent; } 569 573 unsigned short BuddyIconType() { return m_nBuddyIconType; } 570 574 char BuddyIconHashType() { return m_nBuddyIconHashType; } … … 576 580 577 581 // Licq Info 578 bool GetAwaitingAuth() { return m_bAwaitingAuth; }579 unsigned short GetSID() { return m_nSID[NORMAL_SID]; }580 unsigned short GetInvisibleSID() { return m_nSID[INV_SID]; }581 unsigned short GetVisibleSID() { return m_nSID[VIS_SID]; }582 unsigned short GetGSID() { return m_nGSID; }583 unsigned short GetTyping() { return m_nTyping; }582 bool GetAwaitingAuth() const { return m_bAwaitingAuth; } 583 unsigned short GetSID() const { return m_nSID[NORMAL_SID]; } 584 unsigned short GetInvisibleSID() const { return m_nSID[INV_SID]; } 585 unsigned short GetVisibleSID() const { return m_nSID[VIS_SID]; } 586 unsigned short GetGSID() const { return m_nGSID; } 587 unsigned short GetTyping() const { return m_nTyping; } 584 588 //!Retrieves the user's auto response message that was last seen. 585 c har *AutoResponse(){ return m_szAutoResponse; }589 const char* AutoResponse() const { return m_szAutoResponse; } 586 590 //!Retrieves the encoding Licq uses for this user 587 c har* UserEncoding();591 const char* UserEncoding() const; 588 592 //!True if they have sent the UTF8 Cap 589 bool SupportsUTF8() { return m_bSupportsUTF8; }590 bool SendServer() { return m_bSendServer; }591 unsigned short SendLevel() { return m_nSendLevel; }592 bool EnableSave() { return m_bEnableSave; }593 bool ShowAwayMsg() { return m_bShowAwayMsg; }593 bool SupportsUTF8() const { return m_bSupportsUTF8; } 594 bool SendServer() const { return m_bSendServer; } 595 unsigned short SendLevel() const { return m_nSendLevel; } 596 bool EnableSave() const { return m_bEnableSave; } 597 bool ShowAwayMsg() const { return m_bShowAwayMsg; } 594 598 unsigned short Sequence(bool = false); 595 char Mode() { return m_nMode; }596 unsigned long Version() { return m_nVersion; }597 c har *ClientInfo(){ return m_szClientInfo; }598 unsigned long ClientTimestamp() { return m_nClientTimestamp; }599 unsigned long OurClientTimestamp() { return m_nOurClientTimestamp; }600 unsigned long ClientInfoTimestamp() { return m_nClientInfoTimestamp; }601 unsigned long OurClientInfoTimestamp() { return m_nOurClientInfoTimestamp; }602 unsigned long ClientStatusTimestamp() { return m_nClientStatusTimestamp; }603 unsigned long OurClientStatusTimestamp() { return m_nOurClientStatusTimestamp; }604 bool UserUpdated() { return m_bUserUpdated; }605 SecureChannelSupport_et SecureChannelSupport() ;606 unsigned short LicqVersion() ;607 unsigned short ConnectionVersion() ;608 time_t LastOnline() { return m_nLastCounters[LAST_ONLINE]; }609 time_t LastSentEvent() { return m_nLastCounters[LAST_SENT_EVENT]; }610 time_t LastReceivedEvent() { return m_nLastCounters[LAST_RECV_EVENT]; }611 time_t LastCheckedAutoResponse() { return m_nLastCounters[LAST_CHECKED_AR]; }612 time_t OnlineSince() { return m_nOnlineSince; }613 time_t IdleSince() { return m_nIdleSince; }614 time_t RegisteredTime() { return m_nRegisteredTime; }615 bool UseGPG() { return m_bUseGPG; }616 c har* GPGKey(){ return m_szGPGKey; }617 bool AutoChatAccept() { return m_nAutoAccept & AUTO_ACCEPT_CHAT; }618 bool AutoFileAccept() { return m_nAutoAccept & AUTO_ACCEPT_FILE; }619 bool AutoSecure() { return m_nAutoAccept & AUTO_SECURE; }620 bool AcceptInAway() { return m_nAutoAccept & ACCEPT_IN_AWAY; }621 bool AcceptInNA() { return m_nAutoAccept & ACCEPT_IN_NA; }622 bool AcceptInOccupied() { return m_nAutoAccept & ACCEPT_IN_OCCUPIED; }623 bool AcceptInDND() { return m_nAutoAccept & ACCEPT_IN_DND; }624 unsigned short StatusToUser() { return m_nStatusToUser; }625 bool KeepAliasOnUpdate() { return m_bKeepAliasOnUpdate; }626 char *CustomAutoResponse() { return m_szCustomAutoResponse; }627 unsigned long PPID() { return m_nPPID; }628 c har *IdString(){ return m_szId; }629 bool NotInList() { return m_bNotInList; }630 631 char *usprintf(const char *szFormat, unsigned long nFlags = 0);599 char Mode() const { return m_nMode; } 600 unsigned long Version() const { return m_nVersion; } 601 const char* ClientInfo() const { return m_szClientInfo; } 602 unsigned long ClientTimestamp() const { return m_nClientTimestamp; } 603 unsigned long OurClientTimestamp() const { return m_nOurClientTimestamp; } 604 unsigned long ClientInfoTimestamp() const { return m_nClientInfoTimestamp; } 605 unsigned long OurClientInfoTimestamp() const { return m_nOurClientInfoTimestamp; } 606 unsigned long ClientStatusTimestamp() const { return m_nClientStatusTimestamp; } 607 unsigned long OurClientStatusTimestamp() const { return m_nOurClientStatusTimestamp; } 608 bool UserUpdated() const { return m_bUserUpdated; } 609 SecureChannelSupport_et SecureChannelSupport() const; 610 unsigned short LicqVersion() const; 611 unsigned short ConnectionVersion() const; 612 time_t LastOnline() const { return m_nLastCounters[LAST_ONLINE]; } 613 time_t LastSentEvent() const { return m_nLastCounters[LAST_SENT_EVENT]; } 614 time_t LastReceivedEvent() const { return m_nLastCounters[LAST_RECV_EVENT]; } 615 time_t LastCheckedAutoResponse() const { return m_nLastCounters[LAST_CHECKED_AR]; } 616 time_t OnlineSince() const { return m_nOnlineSince; } 617 time_t IdleSince() const { return m_nIdleSince; } 618 time_t RegisteredTime() const { return m_nRegisteredTime; } 619 bool UseGPG() const { return m_bUseGPG; } 620 const char* GPGKey() const { return m_szGPGKey; } 621 bool AutoChatAccept() const { return m_nAutoAccept & AUTO_ACCEPT_CHAT; } 622 bool AutoFileAccept() const { return m_nAutoAccept & AUTO_ACCEPT_FILE; } 623 bool AutoSecure() const { return m_nAutoAccept & AUTO_SECURE; } 624 bool AcceptInAway() const { return m_nAutoAccept & ACCEPT_IN_AWAY; } 625 bool AcceptInNA() const { return m_nAutoAccept & ACCEPT_IN_NA; } 626 bool AcceptInOccupied() const { return m_nAutoAccept & ACCEPT_IN_OCCUPIED; } 627 bool AcceptInDND() const { return m_nAutoAccept & ACCEPT_IN_DND; } 628 unsigned short StatusToUser() const { return m_nStatusToUser; } 629 bool KeepAliasOnUpdate() const { return m_bKeepAliasOnUpdate; } 630 char *CustomAutoResponse() const { return m_szCustomAutoResponse; } 631 unsigned long PPID() const { return m_nPPID; } 632 const char* IdString() const { return m_szId; } 633 bool NotInList() const { return m_bNotInList; } 634 635 char* usprintf(const char* szFormat, unsigned long nFlags = 0) const; 632 636 633 637 // General Info … … 745 749 746 750 // Status 747 unsigned short Status() ;748 unsigned long StatusFull() {return m_nStatus; }749 bool StatusInvisible() {return StatusOffline() ? false : m_nStatus & ICQ_STATUS_FxPRIVATE; }750 bool StatusWebPresence() { return m_nStatus & ICQ_STATUS_FxWEBxPRESENCE;}751 bool StatusHideIp() {return m_nStatus & ICQ_STATUS_FxHIDExIP; }752 bool StatusBirthday() { return m_nStatus & ICQ_STATUS_FxBIRTHDAY;}753 bool StatusOffline() { return (unsigned short)m_nStatus == ICQ_STATUS_OFFLINE;}754 unsigned long PhoneFollowMeStatus() { return m_nPhoneFollowMeStatus; }755 unsigned long ICQphoneStatus() { return m_nICQphoneStatus; }756 unsigned long SharedFilesStatus() { return m_nSharedFilesStatus; }751 unsigned short Status() const; 752 unsigned long StatusFull() const { return m_nStatus; } 753 bool StatusInvisible() const { return StatusOffline() ? false : m_nStatus & ICQ_STATUS_FxPRIVATE; } 754 bool StatusWebPresence() const { return m_nStatus & ICQ_STATUS_FxWEBxPRESENCE; } 755 bool StatusHideIp() const { return m_nStatus & ICQ_STATUS_FxHIDExIP; } 756 bool StatusBirthday() const { return m_nStatus & ICQ_STATUS_FxBIRTHDAY; } 757 bool StatusOffline() const { return (unsigned short)m_nStatus == ICQ_STATUS_OFFLINE; } 758 unsigned long PhoneFollowMeStatus() const { return m_nPhoneFollowMeStatus; } 759 unsigned long ICQphoneStatus() const { return m_nICQphoneStatus; } 760 unsigned long SharedFilesStatus() const { return m_nSharedFilesStatus; } 757 761 void SetStatus(unsigned long n) { m_nStatus = n; } 758 762 void SetPhoneFollowMeStatus(unsigned long n) { m_nPhoneFollowMeStatus = n; SaveLicqInfo(); } … … 760 764 void SetSharedFilesStatus(unsigned long n) { m_nSharedFilesStatus = n; } 761 765 virtual void SetStatusOffline(); 762 const char *StatusStr();763 const char *StatusStrShort();764 bool Away() ;765 static const char *StatusToStatusStr(unsigned short, bool);766 static const char *StatusToStatusStrShort(unsigned short, bool);766 const char* StatusStr() const; 767 const char* StatusStrShort() const; 768 bool Away() const; 769 static const char* StatusToStatusStr(unsigned short n, bool b); 770 static const char* StatusToStatusStrShort(unsigned short n, bool b); 767 771 static char *MakeRealId(const char *, unsigned long, char *&); 768 int Birthday(unsigned short nDayRange = 0) ;772 int Birthday(unsigned short nDayRange = 0) const; 769 773 770 774 // Message/History functions 771 unsigned short NewMessages() { return(m_vcMessages.size()); }775 unsigned short NewMessages() const { return(m_vcMessages.size()); } 772 776 CUserEvent *EventPeek(unsigned short); 777 const CUserEvent* EventPeek(unsigned short index) const; 773 778 CUserEvent *EventPeekId(int); 774 CUserEvent *EventPeekFirst(); 775 CUserEvent *EventPeekLast(); 779 const CUserEvent* EventPeekId(int id) const; 780 const CUserEvent* EventPeekFirst() const; 781 const CUserEvent* EventPeekLast() const; 776 782 CUserEvent *EventPop(); 777 783 void EventClear(unsigned short); … … 780 786 void WriteToHistory(const char *); 781 787 void SetHistoryFile(const char *); 782 int GetHistory(HistoryList &h) { return m_fHistory.Load(h); }788 int GetHistory(HistoryList& history) const { return m_fHistory.Load(history); } 783 789 static void ClearHistory(HistoryList &h) { CUserHistory::Clear(h); } 784 790 void SaveHistory(const char *buf) { m_fHistory.Save(buf); } 785 const char *HistoryName(){ return m_fHistory.Description(); }786 const char *HistoryFile(){ return m_fHistory.FileName(); }791 const char* HistoryName() const { return m_fHistory.Description(); } 792 const char* HistoryFile() const { return m_fHistory.FileName(); } 787 793 788 794 /** … … 850 856 851 857 // Short cuts to above functions 852 bool InvisibleList() { return GetInGroup(GROUPS_SYSTEM, GROUP_INVISIBLE_LIST); }853 bool VisibleList() { return GetInGroup(GROUPS_SYSTEM, GROUP_VISIBLE_LIST); }854 bool OnlineNotify() { return GetInGroup(GROUPS_SYSTEM, GROUP_ONLINE_NOTIFY); }855 bool IgnoreList() { return GetInGroup(GROUPS_SYSTEM, GROUP_IGNORE_LIST); }856 bool NewUser() { return GetInGroup(GROUPS_SYSTEM, GROUP_NEW_USERS); }858 bool InvisibleList() const { return GetInGroup(GROUPS_SYSTEM, GROUP_INVISIBLE_LIST); } 859 bool VisibleList() const { return GetInGroup(GROUPS_SYSTEM, GROUP_VISIBLE_LIST); } 860 bool OnlineNotify() const { return GetInGroup(GROUPS_SYSTEM, GROUP_ONLINE_NOTIFY); } 861 bool IgnoreList() const { return GetInGroup(GROUPS_SYSTEM, GROUP_IGNORE_LIST); } 862 bool NewUser() const { return GetInGroup(GROUPS_SYSTEM, GROUP_NEW_USERS); } 857 863 void SetInvisibleList(bool s) { SetInGroup(GROUPS_SYSTEM, GROUP_INVISIBLE_LIST, s); } 858 864 void SetVisibleList(bool s) { SetInGroup(GROUPS_SYSTEM, GROUP_VISIBLE_LIST, s); } … … 862 868 863 869 // Time 864 time_t LocalTime() ;865 int LocalTimeGMTOffset() ;866 int LocalTimeOffset() ;870 time_t LocalTime() const; 871 int LocalTimeGMTOffset() const; 872 int LocalTimeOffset() const; 867 873 static int SystemTimeGMTOffset(); 868 874 static char SystemTimezone(); 869 875 870 876 // Ip/Port functions 871 unsigned long Ip() { return m_nIp; }872 unsigned long IntIp() { return m_nIntIp; }873 unsigned short Port() { return m_nPort; }874 unsigned short LocalPort() { return m_nLocalPort; }875 unsigned long Cookie() { return m_nCookie; }877 unsigned long Ip() const { return m_nIp; } 878 unsigned long IntIp() const { return m_nIntIp; } 879 unsigned short Port() const { return m_nPort; } 880 unsigned short LocalPort() const { return m_nLocalPort; } 881 unsigned long Cookie() const { return m_nCookie; } 876 882 void SetIpPort(unsigned long nIp, unsigned short nPort); 877 883 void SetIp(unsigned long nIp) { SetIpPort(nIp, Port()); } … … 880 886 void SetCookie(unsigned long nCookie) { m_nCookie = nCookie; } 881 887 882 bool SendIntIp() { return m_bSendIntIp; }888 bool SendIntIp() const { return m_bSendIntIp; } 883 889 void SetSendIntIp(bool s) { m_bSendIntIp = s; } 884 890 885 891 // for backward compatibility 886 unsigned long RealIp() { return IntIp(); }892 unsigned long RealIp() const { return IntIp(); } 887 893 void SetRealIp(unsigned long s) { SetIntIp(s); } 888 bool SendRealIp() { return SendIntIp(); }894 bool SendRealIp() const { return SendIntIp(); } 889 895 void SetSendRealIp(bool s) { SetSendIntIp(s); } 890 896 891 char *IpStr(char *rbuf);892 char *IntIpStr(char *rbuf);893 char *PortStr(char *rbuf);897 char* IpStr(char* rbuf) const; 898 char* IntIpStr(char* rbuf) const; 899 char* PortStr(char* rbuf) const; 894 900 895 901 // User TLV List handling … … 900 906 901 907 // Don't call these: 902 int SocketDesc(unsigned char );908 int SocketDesc(unsigned char channel) const; 903 909 void ClearSocketDesc(unsigned char nChannel = 0x00); 904 910 void SetSocketDesc(TCPSocket *); … … 910 916 911 917 // Last event functions 912 time_t Touched() {return m_nTouched; }918 time_t Touched() const { return m_nTouched; } 913 919 void Touch() { m_nTouched = time(NULL); } 914 920 915 921 // Crypto 916 bool Secure() { return m_bSecure; }917 918 virtual bool User() { return true; }922 bool Secure() const { return m_bSecure; } 923 924 virtual bool User() const { return true; } 919 925 void Lock(unsigned short lockType) const; 920 926 void Unlock() const; … … 1143 1149 virtual void SetStatusOffline(); 1144 1150 1145 virtual bool User() { return false; }1151 virtual bool User() const { return false; } 1146 1152 protected: 1147 1153 char *m_szPassword; -
trunk/licq/src/history.cpp
r6405 r6462 148 148 } 149 149 150 bool CUserHistory::Load(HistoryList &lHistory) 150 bool CUserHistory::Load(HistoryList &lHistory) const 151 151 { 152 152 if (m_szFileName == NULL) -
trunk/licq/src/icqd-srv.cpp
r6438 r6462 282 282 // Get their old SID 283 283 ICQUser* u = gUserManager.FetchUser(_szId, _nPPID, LOCK_R); 284 c har* alias = u->GetAlias();284 const char* alias = u->GetAlias(); 285 285 int nSID = u->GetSID(); 286 286 gUserManager.DropUser(u); … … 476 476 ICQUser *u = gUserManager.FetchUser(_szId, LICQ_PPID, LOCK_R); 477 477 if (u == NULL) return; 478 c har *szNewAlias = u->GetAlias();478 const char* szNewAlias = u->GetAlias(); 479 479 gUserManager.DropUser(u); 480 480 … … 2569 2569 { 2570 2570 gLog.Info(tr("%sReceived user information for %s.\n"), L_SRVxSTR, szId); 2571 gTranslator.ServerToClient(szInfo); 2571 2572 ICQUser *u = gUserManager.FetchUser(szId, LICQ_PPID, LOCK_W); 2572 2573 u->SetEnableSave(false); … … 2575 2576 2576 2577 // translating string with Translation Table 2577 gTranslator.ServerToClient(u->GetAbout());2578 2578 2579 2579 delete [] szId; … … 5208 5208 5209 5209 // translating string with Translation Table
