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

SNAC-SBL.h

00001 /*
00002  * SNAC - Server-based list management
00003  * Mitz Pettel, 2001
00004  *
00005  * based on: SNAC - Buddy (Contact) list management
00006  * Copyright (C) 2001 Barnaby Gray <barnaby@beedesign.co.uk>.
00007  *
00008  * This program is free software; you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation; either version 2 of the License, or (at
00011  * your option) any later version.
00012  *
00013  * This program is distributed in the hope that it will be useful, but
00014  * WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016  * General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU General Public License
00019  * along with this program; if not, write to the Free Software
00020  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00021  *
00022  */
00023 
00024 #ifndef SNAC_SBL_H
00025 #define SNAC_SBL_H
00026 
00027 #include <string>
00028 #include <list>
00029 
00030 #include <libicq2000/SNAC-base.h>
00031 #include <libicq2000/Contact.h>
00032 #include <libicq2000/ContactList.h>
00033 #include <libicq2000/UserInfoBlock.h>
00034 
00035 namespace ICQ2000 {
00036 
00037   // Server-based list stuff (Family 0x0013)
00038   const unsigned short SNAC_SBL_Request_List = 0x0005;
00039   const unsigned short SNAC_SBL_List_From_Server = 0x0006;
00040 
00041   // ----------------- Server-based Lists (Family 0x0013) SNACs -----------
00042 
00043   class SBLFamilySNAC : virtual public SNAC {
00044    public:
00045     unsigned short Family() const { return SNAC_FAM_SBL; }
00046   };
00047 
00048   class RequestSBLSNAC : public SBLFamilySNAC, public OutSNAC {
00049     
00050    protected:
00051     void OutputBody(Buffer& b) const;
00052 
00053    public:
00054     RequestSBLSNAC();
00055 
00056     unsigned short Subtype() const { return SNAC_SBL_Request_List; }
00057   };
00058   
00059   class SBLListSNAC : public SBLFamilySNAC, public InSNAC {
00060    private:
00061     ContactList m_contacts;
00062      
00063    protected:
00064     void ParseBody(Buffer& b);
00065 
00066    public:
00067     SBLListSNAC();
00068     
00069     const ContactList& getContactList() const { return m_contacts; }
00070     unsigned short Subtype() const { return SNAC_SBL_List_From_Server; }
00071   };
00072   
00073 }
00074 
00075 #endif

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