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
27 #include "SNAC-base.h"
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
{
40 unsigned short Family() const { return SNAC_FAM_UIN
; }
43 class UINRequestSNAC
: public UINFamilySNAC
, public OutSNAC
{
45 std::string m_password
;
47 void OutputBody(Buffer
& b
) const;
50 UINRequestSNAC(const std::string
& p
);
52 unsigned short Subtype() const { return SNAC_UIN_Request
; }
55 class UINRequestErrorSNAC
: public UINFamilySNAC
, public InSNAC
{
57 void ParseBody(Buffer
& b
);
60 UINRequestErrorSNAC();
62 unsigned short Subtype() const { return SNAC_UIN_RequestError
; }
65 class UINResponseSNAC
: public UINFamilySNAC
, public InSNAC
{
69 void ParseBody(Buffer
& b
);
74 unsigned short Subtype() const { return SNAC_UIN_Response
; }
75 unsigned int getUIN() const { return m_uin
; }