Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KDE PIM Runtime
Commits
7cb2e5d1
Commit
7cb2e5d1
authored
Oct 31, 2021
by
David Faure
Browse files
pop3: merge common.h into pop3.cpp, it's not used anywhere else
parent
d0930c90
Pipeline
#92658
failed with stage
in 14 minutes and 58 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
kioslave/pop3/common.h
deleted
100644 → 0
View file @
d0930c90
/* This file is part of the KDE project
SPDX-FileCopyrightText: 2008 Jarosław Staniek <staniek@kde.org>
SPDX-License-Identifier: LGPL-2.0-or-later
*/
#pragma once
#include
<QDir>
#include
<QFile>
#include
<stdio.h>
extern
"C"
{
#include
<sasl/sasl.h>
}
inline
bool
initSASL
()
{
#ifdef Q_OS_WIN32 // krazy:exclude=cpp
#if 0
QByteArray libInstallPath(QFile::encodeName(QDir::toNativeSeparators(KGlobal::dirs()->installPath("lib") + QLatin1String("sasl2"))));
QByteArray configPath(QFile::encodeName(QDir::toNativeSeparators(KGlobal::dirs()->installPath("config") + QLatin1String("sasl2"))));
if (sasl_set_path(SASL_PATH_TYPE_PLUGIN, libInstallPath.data()) != SASL_OK
|| sasl_set_path(SASL_PATH_TYPE_CONFIG, configPath.data()) != SASL_OK) {
fprintf(stderr, "SASL path initialization failed!\n");
return false;
}
#endif
#endif
if
(
sasl_client_init
(
nullptr
)
!=
SASL_OK
)
{
fprintf
(
stderr
,
"SASL library initialization failed!
\n
"
);
return
false
;
}
return
true
;
}
kioslave/pop3/pop3.cpp
View file @
7cb2e5d1
...
...
@@ -7,7 +7,6 @@
*
*/
#include
"pop3.h"
#include
"common.h"
extern
"C"
{
#include
<sasl/sasl.h>
...
...
@@ -16,12 +15,12 @@ extern "C" {
#include
"pop3_debug.h"
#include
<QByteArray>
#include
<QCoreApplication>
#include
<QRegularExpression>
#include
<KLocalizedString>
#include
<QCryptographicHash>
#include
<QFile>
#include
<QNetworkProxy>
#include
<QRegularExpression>
#include
<KLocalizedString>
#include
<KIO/SlaveInterface>
...
...
@@ -66,6 +65,27 @@ static const sasl_callback_t callbacks[] = {
{
SASL_CB_LIST_END
,
nullptr
,
nullptr
},
};
static
bool
initSASL
()
{
#ifdef Q_OS_WIN32 // krazy:exclude=cpp
#if 0
QByteArray libInstallPath(QFile::encodeName(QDir::toNativeSeparators(KGlobal::dirs()->installPath("lib") + QLatin1String("sasl2"))));
QByteArray configPath(QFile::encodeName(QDir::toNativeSeparators(KGlobal::dirs()->installPath("config") + QLatin1String("sasl2"))));
if (sasl_set_path(SASL_PATH_TYPE_PLUGIN, libInstallPath.data()) != SASL_OK
|| sasl_set_path(SASL_PATH_TYPE_CONFIG, configPath.data()) != SASL_OK) {
fprintf(stderr, "SASL path initialization failed!\n");
return false;
}
#endif
#endif
if
(
sasl_client_init
(
nullptr
)
!=
SASL_OK
)
{
fprintf
(
stderr
,
"SASL library initialization failed!
\n
"
);
return
false
;
}
return
true
;
}
int
kdemain
(
int
argc
,
char
**
argv
)
{
if
(
argc
!=
4
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment