KSaneCore

authentication.h
1/*
2 * SPDX-FileCopyrightText: 2010 Kare Sars <kare dot sars at iki dot fi>
3 *
4 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5 */
6
7#ifndef KSANE_AUTHENTICATION_H
8#define KSANE_AUTHENTICATION_H
9
10// Qt includes
11#include <QString>
12
13// Sane includes
14extern "C"
15{
16#include <sane/saneopts.h>
17#include <sane/sane.h>
18}
19
20namespace KSaneCore
21{
22
23/**
24 * Sane authentication helpers.
25 */
27{
28public:
29 static Authentication *getInstance();
31
32 void setDeviceAuth(const QString &resource, const QString &username, const QString &password);
33 void clearDeviceAuth(const QString &resource);
34 static void authorization(SANE_String_Const resource, SANE_Char *username, SANE_Char *password);
35
36private:
38 struct Private;
39 Private *const d;
40};
41
42} // namespace KSaneCore
43
44#endif // KSANE_AUTHENTICATION_H
Sane authentication helpers.
static void authorization(SANE_String_Const resource, SANE_Char *username, SANE_Char *password)
static function called by sane_open to get authorization from user
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:19:34 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.