3
icqtlvinforequesttask.h - SNAC 0x15 parsing for full user info (TLV based)
5
Copyright (c) 2007 Roman Jarosz <kedgedev@centrum.cz>
7
Kopete (c) 2007 by the Kopete developers <kopete-devel@kde.org>
9
*************************************************************************
11
* This library is free software; you can redistribute it and/or *
12
* modify it under the terms of the GNU Lesser General Public *
13
* License as published by the Free Software Foundation; either *
14
* version 2 of the License, or (at your option) any later version. *
16
*************************************************************************
19
#ifndef ICQTLVINFOREQUESTTASK_H
20
#define ICQTLVINFOREQUESTTASK_H
23
#include "icquserinfo.h"
25
#include <QtCore/QMap>
30
* @author Roman Jarosz
32
class ICQTlvInfoRequestTask : public ICQTask
36
// Short TLVs: 60,85,150,160,170,180,190,200,250,260,280,390,400,410,420,430,440,450,460,470,480,490,500,505,510,520,530,540,550,560
37
// Medium TLVs: Short + 50,70,85,100,110,120,130,140,300,310,320,330,340,350,360,370,380
38
// Long TLVs: Medium + 270,290,291,292
40
enum InfoType { Short = 0x0001, Medium = 0x0002, Long = 0x0003 };
41
ICQTlvInfoRequestTask( Task* parent );
42
~ICQTlvInfoRequestTask();
44
void setUser( const QString& contactId ) { m_userToRequestFor = contactId; }
45
void setMetaInfoId( const QByteArray& id ) { m_metaInfoId = id; }
46
void setType( InfoType type ) { m_type = type; }
48
ICQFullInfo fullInfoFor( const QString& contact );
50
virtual bool forMe( const Transfer* transfer ) const;
51
virtual bool take( Transfer* transfer );
55
void receivedInfoFor( const QString& contact );
58
void parse( Oscar::DWORD seq, const QByteArray &data );
60
QMap<QString, ICQFullInfo> m_fullInfoMap;
61
QMap<int, QString> m_contactSequenceMap;
63
QString m_userToRequestFor;
66
QByteArray m_metaInfoId;