This repository has been archived by the owner on Apr 24, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdisco_feature.h
78 lines (63 loc) · 1.93 KB
/
disco_feature.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/*
* kJabber
*
* Please READ & ACCEPT /License.txt FIRST!
*
* Copyright (C)2005,2006 Rafa³ Lindemann, STAMINA
* http://www.stamina.pl/ , http://www.konnekt.info/
*
* $Id: $
*/
#pragma once
#include "xData.h"
namespace kJabber {
namespace JEP {
class cFeatureXData: public SigC::Object {
public:
cFeatureXData(cJabber & jab, HWND hwnd, const CStdString & jid, const CStdString & title);
virtual ~cFeatureXData();
protected:
virtual void OnCommand(int command);
virtual void Submit(bool cancel) {}
judo::Element * BuildIQ(const CStdString & type = "get");
judo::Element * BuildX(judo::Element & parent, bool cancel);
struct tSafeOnIQ {
jabberoo::ElementCallbackFunc f;
const judo::Element * e;
bool processed;
};
static void CALLBACK SafeOnIQAPC(tSafeOnIQ * safe);
bool SafeOnIQ(jabberoo::ElementCallbackFunc f , const judo::Element & e);
bool IsError(const judo::Element & e);
void Create();
cXData xData;
cJabber & jab;
CStdString id;
CStdString jid;
};
class cFeatureNeg: public cFeatureXData {
public:
cFeatureNeg(cJabber & jab, HWND hwnd, const CStdString & jid, const CStdString & title, const CStdString & feature);
private:
void OnIQ(const judo::Element & e);
void Submit(bool cancel);
CStdString feature;
};
class cFeatureIQRegister: public cFeatureXData {
public:
cFeatureIQRegister(cJabber & jab, HWND hwnd, const CStdString & jid, const CStdString & title);
private:
void OnIQ(const judo::Element & e);
void Submit(bool cancel);
void OnCommand(int command);
};
class cFeatureIQSearch: public cFeatureXData {
public:
cFeatureIQSearch(cJabber & jab, HWND hwnd, const CStdString & jid, const CStdString & title);
private:
void OnIQ(const judo::Element & e);
void Submit(bool cancel);
void OnCommand(int command);
};
}
}