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
14 extern "C"
15 {
16 #include <sane/saneopts.h>
17 #include <sane/sane.h>
18 }
19 
20 namespace KSaneCore
21 {
22 
23 /**
24  * Sane authentication helpers.
25  */
27 {
28 public:
29  static Authentication *getInstance();
30  ~Authentication();
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 
36 private:
38  struct Private;
39  Private *const d;
40 };
41 
42 } // namespace KSaneCore
43 
44 #endif // KSANE_AUTHENTICATION_H
static void authorization(SANE_String_Const resource, SANE_Char *username, SANE_Char *password)
static function called by sane_open to get authorization from user
Sane authentication helpers.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Fri Aug 12 2022 03:58:29 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.