Changeset View
Changeset View
Standalone View
Standalone View
smb/kio_smb.cpp
Show All 29 Lines | |||||
30 | 30 | | |||
31 | #include "kio_smb.h" | 31 | #include "kio_smb.h" | ||
32 | #include "kio_smb_internal.h" | 32 | #include "kio_smb_internal.h" | ||
33 | #include <QCoreApplication> | 33 | #include <QCoreApplication> | ||
34 | #include <QVersionNumber> | 34 | #include <QVersionNumber> | ||
35 | 35 | | |||
36 | Q_LOGGING_CATEGORY(KIO_SMB, "kio_smb") | 36 | Q_LOGGING_CATEGORY(KIO_SMB, "kio_smb") | ||
37 | 37 | | |||
38 | // Pseudo plugin class to embed meta data | ||||
39 | class KIOPluginForMetaData : public QObject | ||||
40 | { | ||||
41 | Q_OBJECT | ||||
42 | Q_PLUGIN_METADATA(IID "org.kde.kio.slave.smb" FILE "smb.json") | ||||
apol: Shouldn't this go in the SMBSlave class? | |||||
No this is fine, this is done the same way in trash, file, recentlyused io~slaves... meven: No this is fine, this is done the same way in trash, file, recentlyused io~slaves...
Follows… | |||||
43 | }; | ||||
44 | | ||||
38 | bool needsEEXISTWorkaround() | 45 | bool needsEEXISTWorkaround() | ||
39 | { | 46 | { | ||
40 | /* There is an issue with some libsmbclient versions that return EEXIST | 47 | /* There is an issue with some libsmbclient versions that return EEXIST | ||
41 | * return code from smbc_opendir() instead of EPERM when the user | 48 | * return code from smbc_opendir() instead of EPERM when the user | ||
42 | * tries to access a resource that requires login authetification. | 49 | * tries to access a resource that requires login authetification. | ||
43 | * We are working around the issue by treating EEXIST as a special case | 50 | * We are working around the issue by treating EEXIST as a special case | ||
44 | * of "invalid/unavailable credentials" if we detect that we are using | 51 | * of "invalid/unavailable credentials" if we detect that we are using | ||
45 | * the affected versions of libsmbclient | 52 | * the affected versions of libsmbclient | ||
▲ Show 20 Lines • Show All 60 Lines • ▼ Show 20 Line(s) | 105 | { | |||
106 | 113 | | |||
107 | SMBSlave slave( argv[2], argv[3] ); | 114 | SMBSlave slave( argv[2], argv[3] ); | ||
108 | 115 | | |||
109 | slave.dispatchLoop(); | 116 | slave.dispatchLoop(); | ||
110 | 117 | | |||
111 | return 0; | 118 | return 0; | ||
112 | } | 119 | } | ||
113 | 120 | | |||
121 | #include "kio_smb.moc" |
Shouldn't this go in the SMBSlave class?