Main Page   Namespace List   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 #include <libicq2000/Capabilities.h>
00029 
00030 namespace ICQ2000 {
00031  
00032   /* the user information block of screenname and then TLVs
00033    * of user info appears in several different SNACs so
00034    * encapsulate it here
00035    */
00036   class UserInfoBlock {
00037    protected:
00038     string m_screenname;
00039     unsigned short m_warninglevel, m_userClass;
00040     unsigned char m_allowDirect, m_webAware;
00041     unsigned short m_status;
00042     unsigned int m_timeOnline;
00043     unsigned int m_signupDate, m_signonDate;
00044     unsigned int m_lan_ip, m_ext_ip;
00045     unsigned short m_lan_port, m_ext_port, m_firewall;
00046     unsigned char m_tcp_version;
00047     bool m_contains_capabilities;
00048     Capabilities m_capabilities;
00049     
00050    public:
00051     UserInfoBlock();
00052 
00053     string getScreenName() const;
00054     unsigned int getUIN() const;
00055     unsigned int getTimeOnline() const;
00056     unsigned int getSignupDate() const;
00057     unsigned int getSignonDate() const;
00058     unsigned int getLanIP() const;
00059     unsigned int getExtIP() const;
00060     unsigned short getLanPort() const;
00061     unsigned short getExtPort() const;
00062     unsigned short getFirewall() const;
00063     unsigned char getTCPVersion() const;
00064     unsigned short getStatus() const;
00065 
00066     bool contains_capabilities() const;
00067     Capabilities get_capabilities() const;
00068 
00069     void Parse(Buffer& b);
00070   };
00071 
00072 }
00073 
00074 #endif

Generated on Fri Apr 26 23:48:15 2002 for libicq2000 by doxygen1.2.15