00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
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
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
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