File indexing completed on 2024-11-24 03:41:03
0001 /* 0002 This file is part of the KDE libraries 0003 SPDX-FileCopyrightText: 2022 Slava Aseev <nullptrnine@basealt.ru> 0004 0005 SPDX-License-Identifier: LGPL-2.0-or-later 0006 */ 0007 #include "static_mock.hpp" 0008 0009 #include "../kwalletd.h" 0010 #include "../kwalletfreedesktopcollection.h" 0011 #include "../kwalletfreedesktopitem.h" 0012 #include "../kwalletfreedesktopprompt.h" 0013 #include "../kwalletfreedesktopservice.h" 0014 #include "../kwalletfreedesktopsession.h" 0015 0016 KWalletD::KWalletD() 0017 : _syncTime(0) 0018 { 0019 } 0020 KWalletD::~KWalletD() 0021 { 0022 } 0023 0024 KWalletSessionStore::KWalletSessionStore() 0025 { 0026 } 0027 KWalletSessionStore::~KWalletSessionStore() 0028 { 0029 } 0030 0031 KTimeout::KTimeout(QObject *) 0032 { 0033 } 0034 KTimeout::~KTimeout() 0035 { 0036 } 0037 0038 MOCK_FUNCTION(KWalletD, encodeWalletName, 1, ); 0039 MOCK_FUNCTION(KWalletD, decodeWalletName, 1, ); 0040 0041 MOCK_FUNCTION(KTimeout, clear, 0, ); 0042 MOCK_FUNCTION(KTimeout, resetTimer, 2, ); 0043 MOCK_FUNCTION(KTimeout, removeTimer, 1, ); 0044 MOCK_FUNCTION(KTimeout, addTimer, 2, ); 0045 0046 void KTimeout::timerEvent(QTimerEvent *) 0047 { 0048 } 0049 0050 MOCK_FUNCTION(KWalletD, readEntry, 4, ); 0051 MOCK_FUNCTION(KWalletD, readMap, 4, ); 0052 MOCK_FUNCTION(KWalletD, readPassword, 4, ); 0053 0054 MOCK_FUNCTION_RES(KWalletD, removeEntry, 4, 0, ); 0055 MOCK_FUNCTION_RES(KWalletD, writeMap, 5, 0, ); 0056 MOCK_FUNCTION_RES(KWalletD, writePassword, 5, 0, ); 0057 0058 using OVWriteEntry_6 = int (KWalletD::*)(int, const QString &, const QString &, const QByteArray &, int, const QString &); 0059 MOCK_FUNCTION_OVERLOADED_RES(KWalletD, writeEntry, 6, 0, OVWriteEntry_6); 0060 0061 using OVWriteEntry_5 = int (KWalletD::*)(int, const QString &, const QString &, const QByteArray &, const QString &); 0062 MOCK_FUNCTION_OVERLOADED_RES(KWalletD, writeEntry, 5, 0, OVWriteEntry_5); 0063 0064 MOCK_FUNCTION(KWalletD, entryType, 4, ); 0065 MOCK_FUNCTION_RES(KWalletD, renameEntry, 5, 0, ); 0066 0067 MOCK_FUNCTION(KWalletD, isEnabled, 0, const); 0068 MOCK_FUNCTION(KWalletD, open, 3, ); 0069 MOCK_FUNCTION(KWalletD, openPath, 3, ); 0070 MOCK_FUNCTION(KWalletD, openPathAsync, 4, ); 0071 0072 using OVOpenAsync4 = int (KWalletD::*)(const QString &, qlonglong, const QString &, bool); 0073 MOCK_FUNCTION_OVERLOADED(KWalletD, openAsync, 4, OVOpenAsync4); 0074 0075 using OVOpenAsync6 = int (KWalletD::*)(const QString &, qlonglong, const QString &, bool, const QDBusConnection &, const QDBusMessage &); 0076 MOCK_FUNCTION_OVERLOADED(KWalletD, openAsync, 6, OVOpenAsync6); 0077 0078 using OVClose4 = int (KWalletD::*)(int, bool, const QString &, const QDBusMessage &); 0079 MOCK_FUNCTION_OVERLOADED(KWalletD, close, 4, OVClose4); 0080 0081 using OVClose2 = int (KWalletD::*)(const QString &, bool); 0082 MOCK_FUNCTION_OVERLOADED(KWalletD, close, 2, OVClose2); 0083 0084 using OVClose3 = int (KWalletD::*)(int, bool, const QString &); 0085 MOCK_FUNCTION_OVERLOADED(KWalletD, close, 3, OVClose3); 0086 0087 MOCK_FUNCTION(KWalletD, deleteWallet, 1, ); 0088 0089 MOCK_FUNCTION_OVERLOADED(KWalletD, isOpen, 1, bool (KWalletD::*)(const QString &)); 0090 MOCK_FUNCTION_OVERLOADED(KWalletD, isOpen, 1, bool (KWalletD::*)(int)); 0091 0092 MOCK_FUNCTION(KWalletD, users, 1, const); 0093 MOCK_FUNCTION(KWalletD, wallets, 0, const); 0094 MOCK_FUNCTION(KWalletD, folderList, 2, ); 0095 MOCK_FUNCTION(KWalletD, hasFolder, 3, ); 0096 MOCK_FUNCTION(KWalletD, createFolder, 3, ); 0097 MOCK_FUNCTION(KWalletD, removeFolder, 3, ); 0098 MOCK_FUNCTION(KWalletD, entryList, 3, ); 0099 0100 #if KWALLET_BUILD_DEPRECATED_SINCE(5, 72) 0101 MOCK_FUNCTION(KWalletD, readEntryList, 4, ); 0102 MOCK_FUNCTION(KWalletD, readMapList, 4, ); 0103 MOCK_FUNCTION(KWalletD, readPasswordList, 4, ); 0104 #endif 0105 0106 MOCK_FUNCTION(KWalletD, entriesList, 3, ); 0107 MOCK_FUNCTION(KWalletD, mapList, 3, ); 0108 MOCK_FUNCTION(KWalletD, passwordList, 3, ); 0109 MOCK_FUNCTION(KWalletD, renameWallet, 2, ); 0110 MOCK_FUNCTION(KWalletD, hasEntry, 4, ); 0111 MOCK_FUNCTION(KWalletD, disconnectApplication, 2, ); 0112 MOCK_FUNCTION(KWalletD, folderDoesNotExist, 2, ); 0113 MOCK_FUNCTION(KWalletD, keyDoesNotExist, 3, ); 0114 MOCK_FUNCTION(KWalletD, networkWallet, 0, ); 0115 MOCK_FUNCTION(KWalletD, localWallet, 0, ); 0116 MOCK_FUNCTION(KWalletD, pamOpen, 3, ); 0117 MOCK_FUNCTION(KWalletD, sync, 2, ); 0118 MOCK_FUNCTION(KWalletD, changePassword, 3, ); 0119 MOCK_FUNCTION(KWalletD, reconfigure, 0, ); 0120 MOCK_FUNCTION(KWalletD, closeAllWallets, 0, ); 0121 MOCK_FUNCTION(KWalletD, screenSaverChanged, 1, ); 0122 0123 void KWalletD::slotServiceOwnerChanged(const QString &, const QString &, const QString &) 0124 { 0125 } 0126 void KWalletD::emitWalletListDirty() 0127 { 0128 } 0129 void KWalletD::timedOutClose(int) 0130 { 0131 } 0132 void KWalletD::timedOutSync(int) 0133 { 0134 } 0135 void KWalletD::notifyFailures() 0136 { 0137 } 0138 void KWalletD::processTransactions() 0139 { 0140 } 0141 void KWalletD::activatePasswordDialog() 0142 { 0143 } 0144 0145 #include <QLoggingCategory> 0146 const QLoggingCategory &KWALLETD_LOG() 0147 { 0148 static const QLoggingCategory category("kf.wallet.kwalletd", QtFatalMsg); 0149 return category; 0150 }