-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathobjectdata.h
More file actions
101 lines (92 loc) · 2.13 KB
/
Copy pathobjectdata.h
File metadata and controls
101 lines (92 loc) · 2.13 KB
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#ifndef OBJECTDATA_H
#define OBJECTDATA_H
#include <QMap>
#include <QString>
#include <QVariant>
enum AttributeName
{
NameAttr,
DNAttr,
CNAttr,
DistinguishedNameAttr,
ShowInAdvancedViewOnlyAttr,
ObjectCategoryAttr,
ObjectClassAttr,
ObjectGUIDAttr,
ObjectSidAttr,
uSNChangedAttr,
uSNCreatedAttr,
WhenChangedAttr,
WhenCreatedAttr,
InstanceTypeAttr,
AdminCountAttr,
sAMAccountNameAttr,
sAMAccountTypeAttr,
DescriptionAttr,
UserAccountControlAttr,
CodePageAttr,
CountryCodeAttr,
AccountExpiresAttr,
LastLogoffAttr,
LastLogonAttr,
LogonCountAttr,
PrimaryGroupIDAttr,
BadPwdCountAttr,
BadPasswordTimeAttr,
PwdLastSetAttr,
MemberAttr,
MemberOfAttr,
SystemFlagsAttr,
isCriticalSystemObjectAttr,
UnknownAttr
};
enum AttributeType {
BooleanType,
IntegerType,
EnumerationType,
LargeIntegerType,
ObjectAccessPointType,
ObjectDNStringType,
ObjectORNameType,
ObjectDNBinaryType,
ObjectDSDNType,
ObjectPresentationAddressType,
ObjectReplicaLinkType,
StringCaseType,
StringIA5Type,
StringNTSecDescType,
StringNumericType,
StringObjectIdentifierType,
StringOctetType,
StringPrintableType,
StringSidType,
StringTeletexType,
StringUnicodeType,
StringUTCTimeType,
StringGeneralizedTimeType,
UnknownAttributeType,
FirstAttributeType = BooleanType
};
enum AttributeFormat {
StringFormat,
BASE64Format
};
QString attributeName(AttributeName attr);
class Attribute: public QStringList
{
public:
Attribute(): type(UnknownAttributeType), format(StringFormat) {}
Attribute(QString &s, AttributeType t, AttributeFormat f = StringFormat): QStringList(s), type(t), format(f) {}
AttributeType type;
AttributeFormat format;
};
typedef QMap<QString, Attribute> ObjectMap;
class ObjectData: public ObjectMap
{
public:
ObjectData();
void insert(AttributeName attrName, AttributeType attrType, QString val);
void insert(QString attr, QString type, QString val);
QVariant value(AttributeName attrName) const;
};
#endif // OBJECTDATA_H