adding missing includes; trivial fix - comparison with string literal. by
[centerim.git] / libicq2000 / src / SNAC-UIN.h
blob43b65893c71cd5c998bfa9776012bbad72716233
1 /*
2 * SNAC - UIN
4 * Copyright (C) 2001 Barnaby Gray <barnaby@beedesign.co.uk>
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #ifndef SNAC_UIN_H
23 #define SNAC_UIN_H
25 #include <string>
27 #include "SNAC-base.h"
29 namespace ICQ2000 {
31 // UIN Registration (Family 0x0017)
32 const unsigned short SNAC_UIN_RequestError = 0x0001;
33 const unsigned short SNAC_UIN_Request = 0x0004;
34 const unsigned short SNAC_UIN_Response = 0x0005;
36 // --------------------- UIN Registration (Family 0x0017) SNACs ---------
38 class UINFamilySNAC : virtual public SNAC {
39 public:
40 unsigned short Family() const { return SNAC_FAM_UIN; }
43 class UINRequestSNAC : public UINFamilySNAC, public OutSNAC {
44 protected:
45 std::string m_password;
47 void OutputBody(Buffer& b) const;
49 public:
50 UINRequestSNAC(const std::string& p);
52 unsigned short Subtype() const { return SNAC_UIN_Request; }
55 class UINRequestErrorSNAC : public UINFamilySNAC, public InSNAC {
56 protected:
57 void ParseBody(Buffer& b);
59 public:
60 UINRequestErrorSNAC();
62 unsigned short Subtype() const { return SNAC_UIN_RequestError; }
65 class UINResponseSNAC : public UINFamilySNAC, public InSNAC {
66 protected:
67 unsigned int m_uin;
69 void ParseBody(Buffer& b);
71 public:
72 UINResponseSNAC();
74 unsigned short Subtype() const { return SNAC_UIN_Response; }
75 unsigned int getUIN() const { return m_uin; }
80 #endif