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

SNAC-UIN.h

00001 /*
00002  * SNAC - UIN
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 SNAC_UIN_H
00023 #define SNAC_UIN_H
00024 
00025 #include <string>
00026 
00027 #include <libicq2000/SNAC-base.h>
00028 
00029 namespace ICQ2000 {
00030 
00031   // UIN Registration (Family 0x0017)
00032   const unsigned short SNAC_UIN_RequestError = 0x0001;
00033   const unsigned short SNAC_UIN_Request = 0x0004;
00034   const unsigned short SNAC_UIN_Response = 0x0005;
00035 
00036   // --------------------- UIN Registration (Family 0x0017) SNACs ---------
00037 
00038   class UINFamilySNAC : virtual public SNAC {
00039    public:
00040     unsigned short Family() const { return SNAC_FAM_UIN; }
00041   };
00042 
00043   class UINRequestSNAC : public UINFamilySNAC, public OutSNAC {
00044    protected:
00045     string m_password;
00046     
00047     void OutputBody(Buffer& b) const;
00048 
00049    public:
00050     UINRequestSNAC(const string& p);
00051 
00052     unsigned short Subtype() const { return SNAC_UIN_Request; }
00053    };
00054  
00055    class UINRequestErrorSNAC : public UINFamilySNAC, public InSNAC {
00056     protected:
00057      void ParseBody(Buffer& b);
00058      
00059     public:
00060      UINRequestErrorSNAC();
00061      
00062      unsigned short Subtype() const { return SNAC_UIN_RequestError; }
00063   };
00064 
00065   class UINResponseSNAC : public UINFamilySNAC, public InSNAC {
00066    protected:
00067     unsigned int m_uin;
00068     
00069     void ParseBody(Buffer& b);
00070     
00071    public:
00072     UINResponseSNAC();
00073 
00074     unsigned short Subtype() const { return SNAC_UIN_Response; }
00075     unsigned int getUIN() const { return m_uin; }
00076   };
00077 
00078 }
00079 
00080 #endif

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