File: LdapNetworkObjectDirectory.h

package info (click to toggle)
veyon 4.9.7%2Brepack1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 14,028 kB
  • sloc: cpp: 52,043; ansic: 7,307; python: 228; makefile: 222; sh: 48
file content (36 lines) | stat: -rw-r--r-- 1,206 bytes parent folder | download
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
// Copyright (c) 2019-2025 Tobias Junghans <tobydox@veyon.io>
// This file is part of Veyon - https://veyon.io
// SPDX-License-Identifier: LGPL-2.0-or-later

#pragma once

#include "LdapDirectory.h"
#include "NetworkObjectDirectory.h"

class LDAP_COMMON_EXPORT LdapNetworkObjectDirectory : public NetworkObjectDirectory
{
	Q_OBJECT
public:
	LdapNetworkObjectDirectory(const LdapConfiguration& ldapConfiguration, QObject* parent);

	NetworkObjectList queryObjects(NetworkObject::Type type,
								   NetworkObject::Attribute attribute, const QVariant& value) override;
	NetworkObjectList queryParents(const NetworkObject& childId) override;

	static NetworkObject computerToObject(LdapDirectory* directory, const QString& computerDn);

private:
	void update() override;
	void fetchObjects(const NetworkObject& parent) override;

	void updateObjects(const NetworkObject& parent);

	NetworkObjectList queryLocations(NetworkObject::Attribute attribute, const QVariant& value);
	NetworkObjectList queryHosts(NetworkObject::Attribute attribute, const QVariant& value);

	void updateLocations(const NetworkObject& parent);
	void updateComputers(const NetworkObject& parent);

	LdapDirectory m_ldapDirectory;

};