Mercurial > pidgin
comparison libgaim/protocols/oscar/family_locate.c @ 14549:e63769f7aaed
[gaim-migrate @ 17272]
Comment cleanup
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 14 Sep 2006 00:56:36 +0000 |
parents | 60b1bc8dbf37 |
children | fb67a345056e |
comparison
equal
deleted
inserted
replaced
14548:c810c38ca2c2 | 14549:e63769f7aaed |
---|---|
179 {OSCAR_CAPABILITY_ICQUTF8OLD, | 179 {OSCAR_CAPABILITY_ICQUTF8OLD, |
180 {0x2e, 0x7a, 0x64, 0x75, 0xfa, 0xdf, 0x4d, 0xc8, | 180 {0x2e, 0x7a, 0x64, 0x75, 0xfa, 0xdf, 0x4d, 0xc8, |
181 0x88, 0x6f, 0xea, 0x35, 0x95, 0xfd, 0xb6, 0xdf}}, | 181 0x88, 0x6f, 0xea, 0x35, 0x95, 0xfd, 0xb6, 0xdf}}, |
182 | 182 |
183 /* | 183 /* |
184 {OSCAR_CAPABILITY_ICQ2GO, | |
185 {0x56, 0x3f, 0xc8, 0x09, 0x0b, 0x6f, 0x41, 0xbd, | |
186 0x9f, 0x79, 0x42, 0x26, 0x09, 0xdf, 0xa2, 0xf3}}, | |
187 */ | |
188 | |
189 /* | |
184 * Chat is oddball. | 190 * Chat is oddball. |
185 */ | 191 */ |
186 {OSCAR_CAPABILITY_CHAT, | 192 {OSCAR_CAPABILITY_CHAT, |
187 {0x74, 0x8f, 0x24, 0x20, 0x62, 0x87, 0x11, 0xd1, | 193 {0x74, 0x8f, 0x24, 0x20, 0x62, 0x87, 0x11, 0xd1, |
188 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}, | 194 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}, |
189 | |
190 /* | |
191 {OSCAR_CAPABILITY_ICQ2GO, | |
192 {0x56, 0x3f, 0xc8, 0x09, 0x0b, 0x6f, 0x41, 0xbd, | |
193 0x9f, 0x79, 0x42, 0x26, 0x09, 0xdf, 0xa2, 0xf3}}, | |
194 */ | |
195 | 195 |
196 {OSCAR_CAPABILITY_ICQRTF, | 196 {OSCAR_CAPABILITY_ICQRTF, |
197 {0x97, 0xb1, 0x27, 0x51, 0x24, 0x3c, 0x43, 0x34, | 197 {0x97, 0xb1, 0x27, 0x51, 0x24, 0x3c, 0x43, 0x34, |
198 0xad, 0x22, 0xd6, 0xab, 0xf7, 0x3f, 0x14, 0x92}}, | 198 0xad, 0x22, 0xd6, 0xab, 0xf7, 0x3f, 0x14, 0x92}}, |
199 | 199 |
609 | 609 |
610 endpos = byte_stream_curpos(bs) + length; | 610 endpos = byte_stream_curpos(bs) + length; |
611 | 611 |
612 if (type == 0x0001) { | 612 if (type == 0x0001) { |
613 /* | 613 /* |
614 * Type = 0x0001: User flags | 614 * User flags |
615 * | 615 * |
616 * Specified as any of the following ORed together: | 616 * Specified as any of the following ORed together: |
617 * 0x0001 Trial (user less than 60days) | 617 * 0x0001 Trial (user less than 60days) |
618 * 0x0002 Unknown bit 2 | 618 * 0x0002 Unknown bit 2 |
619 * 0x0004 AOL Main Service user | 619 * 0x0004 AOL Main Service user |
620 * 0x0008 Unknown bit 4 | 620 * 0x0008 Unknown bit 4 |
621 * 0x0010 Free (AIM) user | 621 * 0x0010 Free (AIM) user |
622 * 0x0020 Away | 622 * 0x0020 Away |
623 * 0x0400 ActiveBuddy | 623 * 0x0400 ActiveBuddy |
624 * | |
625 */ | 624 */ |
626 outinfo->flags = byte_stream_get16(bs); | 625 outinfo->flags = byte_stream_get16(bs); |
627 outinfo->present |= AIM_USERINFO_PRESENT_FLAGS; | 626 outinfo->present |= AIM_USERINFO_PRESENT_FLAGS; |
628 | 627 |
629 } else if (type == 0x0002) { | 628 } else if (type == 0x0002) { |
630 /* | 629 /* |
631 * Type = 0x0002: Account creation time. | 630 * Account creation time |
632 * | 631 * |
633 * The time/date that the user originally registered for | 632 * The time/date that the user originally registered for |
634 * the service, stored in time_t format. | 633 * the service, stored in time_t format. |
635 * | 634 * |
636 * I'm not sure how this differs from type 5 ("member | 635 * I'm not sure how this differs from type 5 ("member |
643 outinfo->createtime = byte_stream_get32(bs); | 642 outinfo->createtime = byte_stream_get32(bs); |
644 outinfo->present |= AIM_USERINFO_PRESENT_CREATETIME; | 643 outinfo->present |= AIM_USERINFO_PRESENT_CREATETIME; |
645 | 644 |
646 } else if (type == 0x0003) { | 645 } else if (type == 0x0003) { |
647 /* | 646 /* |
648 * Type = 0x0003: On-Since date. | 647 * On-Since date |
649 * | 648 * |
650 * The time/date that the user started their current | 649 * The time/date that the user started their current |
651 * session, stored in time_t format. | 650 * session, stored in time_t format. |
652 */ | 651 */ |
653 outinfo->onlinesince = byte_stream_get32(bs); | 652 outinfo->onlinesince = byte_stream_get32(bs); |
654 outinfo->present |= AIM_USERINFO_PRESENT_ONLINESINCE; | 653 outinfo->present |= AIM_USERINFO_PRESENT_ONLINESINCE; |
655 | 654 |
656 } else if (type == 0x0004) { | 655 } else if (type == 0x0004) { |
657 /* | 656 /* |
658 * Type = 0x0004: Idle time. | 657 * Idle time |
659 * | 658 * |
660 * Number of minutes since the user actively used the | 659 * Number of minutes since the user actively used the |
661 * service. | 660 * service. |
662 * | 661 * |
663 * Note that the client tells the server when to start | 662 * Note that the client tells the server when to start |
667 outinfo->idletime = byte_stream_get16(bs); | 666 outinfo->idletime = byte_stream_get16(bs); |
668 outinfo->present |= AIM_USERINFO_PRESENT_IDLE; | 667 outinfo->present |= AIM_USERINFO_PRESENT_IDLE; |
669 | 668 |
670 } else if (type == 0x0005) { | 669 } else if (type == 0x0005) { |
671 /* | 670 /* |
672 * Type = 0x0005: Member since date. | 671 * Member since date |
673 * | 672 * |
674 * The time/date that the user originally registered for | 673 * The time/date that the user originally registered for |
675 * the service, stored in time_t format. | 674 * the service, stored in time_t format. |
676 * | 675 * |
677 * This is sometimes sent instead of type 2 ("account | 676 * This is sometimes sent instead of type 2 ("account |
681 outinfo->membersince = byte_stream_get32(bs); | 680 outinfo->membersince = byte_stream_get32(bs); |
682 outinfo->present |= AIM_USERINFO_PRESENT_MEMBERSINCE; | 681 outinfo->present |= AIM_USERINFO_PRESENT_MEMBERSINCE; |
683 | 682 |
684 } else if (type == 0x0006) { | 683 } else if (type == 0x0006) { |
685 /* | 684 /* |
686 * Type = 0x0006: ICQ Online Status | 685 * ICQ Online Status |
687 * | 686 * |
688 * ICQ's Away/DND/etc "enriched" status. Some decoding | 687 * ICQ's Away/DND/etc "enriched" status. Some decoding |
689 * of values done by Scott <darkagl@pcnet.com> | 688 * of values done by Scott <darkagl@pcnet.com> |
690 */ | 689 */ |
691 byte_stream_get16(bs); | 690 byte_stream_get16(bs); |
692 outinfo->icqinfo.status = byte_stream_get16(bs); | 691 outinfo->icqinfo.status = byte_stream_get16(bs); |
693 outinfo->present |= AIM_USERINFO_PRESENT_ICQEXTSTATUS; | 692 outinfo->present |= AIM_USERINFO_PRESENT_ICQEXTSTATUS; |
694 | 693 |
695 } else if (type == 0x0008) { | 694 } else if (type == 0x0008) { |
696 /* | 695 /* |
697 * Type = 0x0008 | |
698 * | |
699 * Client type, or some such. | 696 * Client type, or some such. |
700 */ | 697 */ |
701 | 698 |
702 } else if (type == 0x000a) { | 699 } else if (type == 0x000a) { |
703 /* | 700 /* |
704 * Type = 0x000a | 701 * ICQ User IP Address |
705 * | 702 * |
706 * ICQ User IP Address. | |
707 * Ahh, the joy of ICQ security. | 703 * Ahh, the joy of ICQ security. |
708 */ | 704 */ |
709 outinfo->icqinfo.ipaddr = byte_stream_get32(bs); | 705 outinfo->icqinfo.ipaddr = byte_stream_get32(bs); |
710 outinfo->present |= AIM_USERINFO_PRESENT_ICQIPADDR; | 706 outinfo->present |= AIM_USERINFO_PRESENT_ICQIPADDR; |
711 | 707 |
712 } else if (type == 0x000c) { | 708 } else if (type == 0x000c) { |
713 /* | 709 /* |
714 * Type = 0x000c | 710 * Random crap containing the IP address, |
715 * | |
716 * random crap containing the IP address, | |
717 * apparently a port number, and some Other Stuff. | 711 * apparently a port number, and some Other Stuff. |
718 * | 712 * |
719 * Format is: | 713 * Format is: |
720 * 4 bytes - Our IP address, 0xc0 a8 01 2b for 192.168.1.43 | 714 * 4 bytes - Our IP address, 0xc0 a8 01 2b for 192.168.1.43 |
721 * | |
722 * | |
723 */ | 715 */ |
724 byte_stream_getrawbuf(bs, outinfo->icqinfo.crap, 0x25); | 716 byte_stream_getrawbuf(bs, outinfo->icqinfo.crap, 0x25); |
725 outinfo->present |= AIM_USERINFO_PRESENT_ICQDATA; | 717 outinfo->present |= AIM_USERINFO_PRESENT_ICQDATA; |
726 | 718 |
727 } else if (type == 0x000d) { | 719 } else if (type == 0x000d) { |
728 /* | 720 /* |
729 * Type = 0x000d | 721 * OSCAR Capability information |
730 * | |
731 * OSCAR Capability information. | |
732 * | |
733 */ | 722 */ |
734 outinfo->capabilities |= aim_locate_getcaps(od, bs, length); | 723 outinfo->capabilities |= aim_locate_getcaps(od, bs, length); |
735 outinfo->present |= AIM_USERINFO_PRESENT_CAPABILITIES; | 724 outinfo->present |= AIM_USERINFO_PRESENT_CAPABILITIES; |
736 | 725 |
737 } else if (type == 0x000e) { | 726 } else if (type == 0x000e) { |
738 /* | 727 /* |
739 * Type = 0x000e | 728 * AOL capability information |
740 * | |
741 * AOL capability information. | |
742 * | |
743 */ | 729 */ |
744 | 730 |
745 } else if ((type == 0x000f) || (type == 0x0010)) { | 731 } else if ((type == 0x000f) || (type == 0x0010)) { |
746 /* | 732 /* |
747 * Type = 0x000f: Session Length. (AIM) | 733 * Type = 0x000f: Session Length. (AIM) |
750 * The duration, in seconds, of the user's current | 736 * The duration, in seconds, of the user's current |
751 * session. | 737 * session. |
752 * | 738 * |
753 * Which TLV type this comes in depends on the | 739 * Which TLV type this comes in depends on the |
754 * service the user is using (AIM or AOL). | 740 * service the user is using (AIM or AOL). |
755 * | |
756 */ | 741 */ |
757 outinfo->sessionlen = byte_stream_get32(bs); | 742 outinfo->sessionlen = byte_stream_get32(bs); |
758 outinfo->present |= AIM_USERINFO_PRESENT_SESSIONLEN; | 743 outinfo->present |= AIM_USERINFO_PRESENT_SESSIONLEN; |
759 | 744 |
760 } else if (type == 0x0019) { | 745 } else if (type == 0x0019) { |
761 /* | 746 /* |
762 * Type = 0x0019 | |
763 * | |
764 * OSCAR short capability information. A shortened | 747 * OSCAR short capability information. A shortened |
765 * form of the normal capabilities. | 748 * form of the normal capabilities. |
766 */ | 749 */ |
767 outinfo->capabilities |= aim_locate_getcaps_short(od, bs, length); | 750 outinfo->capabilities |= aim_locate_getcaps_short(od, bs, length); |
768 outinfo->present |= AIM_USERINFO_PRESENT_CAPABILITIES; | 751 outinfo->present |= AIM_USERINFO_PRESENT_CAPABILITIES; |
769 | 752 |
770 } else if (type == 0x001b) { | 753 } else if (type == 0x001a) { |
771 /* | 754 /* |
772 * Type = 0x001a | 755 * Type = 0x001a |
773 * | 756 * |
774 * AOL short capability information. A shortened | 757 * AOL short capability information. A shortened |
775 * form of the normal capabilities. | 758 * form of the normal capabilities. |
776 */ | 759 */ |
777 | 760 |
778 } else if (type == 0x001b) { | 761 } else if (type == 0x001b) { |
779 /* | 762 /* |
780 * Type = 0x0019 | |
781 * | |
782 * Encryption certification MD5 checksum. | 763 * Encryption certification MD5 checksum. |
783 */ | 764 */ |
784 | 765 |
785 } else if (type == 0x001d) { | 766 } else if (type == 0x001d) { |
786 /* | 767 /* |
787 * Type = 0x001d | |
788 * | |
789 * Buddy icon information and status/available messages. | 768 * Buddy icon information and status/available messages. |
790 * | 769 * |
791 * This almost seems like the AIM protocol guys gave | 770 * This almost seems like the AIM protocol guys gave |
792 * the iChat guys a Type, and the iChat guys tried to | 771 * the iChat guys a Type, and the iChat guys tried to |
793 * cram as much cool shit into it as possible. Then | 772 * cram as much cool shit into it as possible. Then |
850 } | 829 } |
851 } | 830 } |
852 | 831 |
853 } else if (type == 0x001e) { | 832 } else if (type == 0x001e) { |
854 /* | 833 /* |
855 * Type 30: Unknown. | |
856 * | |
857 * Always four bytes, but it doesn't look like an int. | 834 * Always four bytes, but it doesn't look like an int. |
858 */ | 835 */ |
859 | 836 |
860 } else if (type == 0x001f) { | 837 } else if (type == 0x001f) { |
861 /* | 838 /* |
862 * Type 31: Unknown. | |
863 * | |
864 * Seen on a buddy using DeadAIM. Data was 4 bytes: | 839 * Seen on a buddy using DeadAIM. Data was 4 bytes: |
865 * 0x00 00 00 10 | 840 * 0x00 00 00 10 |
866 */ | 841 */ |
867 | 842 |
868 } else { | 843 } else { |