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 const unsigned short SNAC_BOS_Add_Tmp_Visible = 0x000A;
00043 const unsigned short SNAC_BOS_Remove_Tmp_Visible = 0x000B;
00044
00045
00046
00047 class BOSFamilySNAC : virtual public SNAC {
00048 public:
00049 unsigned short Family() const { return SNAC_FAM_BOS; }
00050 };
00051
00052 class BOSListSNAC : virtual public BOSFamilySNAC, public OutSNAC {
00053 protected:
00054 std::list<std::string> m_buddy_list;
00055 void OutputBody(Buffer& b) const;
00056
00057 public:
00058 BOSListSNAC();
00059 BOSListSNAC(const ContactList& l);
00060 BOSListSNAC(const ContactRef& c);
00061 BOSListSNAC(const std::string& s);
00062 void addContact(const ContactRef& c);
00063 };
00064
00065
00066 class AddVisibleSNAC : public BOSListSNAC {
00067 public:
00068 unsigned short Subtype() const { return SNAC_BOS_Add_Visible; }
00069 AddVisibleSNAC();
00070 AddVisibleSNAC(const ContactList& l);
00071 AddVisibleSNAC(const ContactRef& c);
00072 AddVisibleSNAC(const std::string& s);
00073 };
00074
00075 class AddInvisibleSNAC : public BOSListSNAC {
00076 public:
00077 unsigned short Subtype() const { return SNAC_BOS_Add_Invisible; }
00078 AddInvisibleSNAC();
00079 AddInvisibleSNAC(const ContactList& l);
00080 AddInvisibleSNAC(const ContactRef& c);
00081 AddInvisibleSNAC(const std::string& s);
00082 };
00083
00084 class AddTmpVisibleSNAC : public BOSListSNAC {
00085 public:
00086 unsigned short Subtype() const { return SNAC_BOS_Add_Tmp_Visible; }
00087 AddTmpVisibleSNAC();
00088 AddTmpVisibleSNAC(const ContactList& l);
00089 AddTmpVisibleSNAC(const ContactRef& c);
00090 AddTmpVisibleSNAC(const std::string& s);
00091 };
00092
00093 class RemoveVisibleSNAC : public BOSListSNAC {
00094 public:
00095 unsigned short Subtype() const { return SNAC_BOS_Remove_Visible; }
00096 RemoveVisibleSNAC();
00097 RemoveVisibleSNAC(const ContactList& l);
00098 RemoveVisibleSNAC(const ContactRef& c);
00099 RemoveVisibleSNAC(const std::string& s);
00100 };
00101
00102 class RemoveInvisibleSNAC : public BOSListSNAC {
00103 public:
00104 unsigned short Subtype() const { return SNAC_BOS_Remove_Invisible; }
00105 RemoveInvisibleSNAC();
00106 RemoveInvisibleSNAC(const ContactList& l);
00107 RemoveInvisibleSNAC(const ContactRef& c);
00108 RemoveInvisibleSNAC(const std::string& s);
00109 };
00110
00111 class RemoveTmpVisibleSNAC : public BOSListSNAC {
00112 public:
00113 unsigned short Subtype() const { return SNAC_BOS_Remove_Tmp_Visible; }
00114 RemoveTmpVisibleSNAC();
00115 RemoveTmpVisibleSNAC(const ContactList& l);
00116 RemoveTmpVisibleSNAC(const ContactRef& c);
00117 RemoveTmpVisibleSNAC(const std::string& s);
00118 };
00119
00120 }
00121
00122 #endif