Main Page   Class Hierarchy   Compound List   File List   Compound Members   Related Pages  

UserInfoBlock.h

00001 /*
00002  * UserInfoBlock
00003  *
00004  * Copyright (C) 2001 Barnaby Gray <barnaby@beedesign.co.uk>.
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Lesser General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2.1 of the License, or (at your option) any later version.
00010  *
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Lesser General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public
00017  * License along with this library; if not, write to the Free Software
00018  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
00019  *
00020  */
00021 
00022 #ifndef USERINFOBLOCK_H
00023 #define USERINFOBLOCK_H
00024 
00025 #include <string>
00026 
00027 #include <libicq2000/buffer.h>
00028 
00029 namespace ICQ2000 {
00030  
00031   /* the user information block of screenname and then TLVs
00032    * of user info appears in several different SNACs so
00033    * encapsulate it here
00034    */
00035   class UserInfoBlock {
00036    public:
00037     enum tristate {
00038       tri_unknown,
00039       tri_true,
00040       tri_false
00041     };
00042         
00043    protected:
00044     string m_screenname;
00045     unsigned short m_warninglevel, m_userClass;
00046     unsigned char m_allowDirect, m_webAware;
00047     unsigned short m_status;
00048     unsigned int m_timeOnline;
00049     unsigned int m_signupDate, m_signonDate;
00050     unsigned int m_lan_ip, m_ext_ip;
00051     unsigned short m_lan_port, m_ext_port, m_firewall;
00052     unsigned char m_tcp_version;
00053     tristate m_accept_adv_msgs;
00054     
00055    public:
00056     UserInfoBlock() : m_accept_adv_msgs(tri_unknown) { }
00057 
00058     string getScreenName() const;
00059     unsigned int getUIN() const;
00060     unsigned int getTimeOnline() const;
00061     unsigned int getLanIP() const;
00062     unsigned int getExtIP() const;
00063     unsigned short getLanPort() const;
00064     unsigned short getExtPort() const;
00065     unsigned short getFirewall() const;
00066     unsigned char getTCPVersion() const;
00067     tristate getAcceptAdvMsgs() const;
00068     unsigned short getStatus() const;
00069 
00070     void Parse(Buffer& b);
00071   };
00072 
00073 }
00074 
00075 #endif

Generated on Tue Jan 15 12:24:36 2002 for libicq2000 by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001