00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef SNAC_BOS_H
00025 #define SNAC_BOS_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
00038 const unsigned short SNAC_BOS_Add_Visible = 0x0005;
00039 const unsigned short SNAC_BOS_Remove_Visible = 0x0006;
00040 const unsigned short SNAC_BOS_Add_Invisible = 0x0007;
00041 const unsigned short SNAC_BOS_Remove_Invisible = 0x0008;
00042
00043
00044
00045 class BOSFamilySNAC : virtual public SNAC {
00046 public:
00047 unsigned short Family() const { return SNAC_FAM_BOS; }
00048 };
00049
00050 class AddVisibleSNAC : public BOSFamilySNAC, public OutSNAC {
00051 private:
00052 list<string> m_buddy_list;
00053
00054 protected:
00055 void OutputBody(Buffer& b) const;
00056
00057 public:
00058 AddVisibleSNAC();
00059 AddVisibleSNAC(const ContactList& l);
00060 AddVisibleSNAC(const Contact& c);
00061
00062 void addVisible(const Contact& c);
00063
00064 unsigned short Subtype() const { return SNAC_BOS_Add_Visible; }
00065 };
00066
00067 class RemoveVisibleSNAC : public BOSFamilySNAC, public OutSNAC {
00068 private:
00069 list<string> m_buddy_list;
00070
00071 protected:
00072 void OutputBody(Buffer& b) const;
00073
00074 public:
00075 RemoveVisibleSNAC();
00076 RemoveVisibleSNAC(const ContactList& l);
00077 RemoveVisibleSNAC(const string& s);
00078
00079 void removeVisible(const Contact& c);
00080
00081 unsigned short Subtype() const { return SNAC_BOS_Remove_Visible; }
00082 };
00083
00084 class AddInvisibleSNAC : public BOSFamilySNAC, public OutSNAC {
00085 private:
00086 list<string> m_buddy_list;
00087
00088 protected:
00089 void OutputBody(Buffer& b) const;
00090
00091 public:
00092 AddInvisibleSNAC();
00093 AddInvisibleSNAC(const ContactList& l);
00094 AddInvisibleSNAC(const Contact& c);
00095
00096 void addInvisible(const Contact& c);
00097
00098 unsigned short Subtype() const { return SNAC_BOS_Add_Invisible; }
00099 };
00100
00101 class RemoveInvisibleSNAC : public BOSFamilySNAC, public OutSNAC {
00102 private:
00103 list<string> m_buddy_list;
00104
00105 protected:
00106 void OutputBody(Buffer& b) const;
00107
00108 public:
00109 RemoveInvisibleSNAC();
00110 RemoveInvisibleSNAC(const ContactList& l);
00111 RemoveInvisibleSNAC(const string& s);
00112
00113 void removeInvisible(const Contact& c);
00114
00115 unsigned short Subtype() const { return SNAC_BOS_Remove_Invisible; }
00116 };
00117
00118 }
00119
00120 #endif