File tree Expand file tree Collapse file tree 8 files changed +530
-3
lines changed
Expand file tree Collapse file tree 8 files changed +530
-3
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ add_feature_info(AppImageUpdate WITH_APPIMAGEUPDATER "Built-in libappimageupdate
103103option (WITH_EXTERNAL_BRANDING "A URL to an external branding repo" "" )
104104
105105# specify additional vfs plugins
106- set (VIRTUAL_FILE_SYSTEM_PLUGINS off cfapi CACHE STRING "Name of internal plugin in src/libsync/vfs or the locations of virtual file plugins" )
106+ set (VIRTUAL_FILE_SYSTEM_PLUGINS off cfapi xattr CACHE STRING "Name of internal plugin in src/libsync/vfs or the locations of virtual file plugins" )
107107
108108if (APPLE )
109109 set ( SOCKETAPI_TEAM_IDENTIFIER_PREFIX "" CACHE STRING "SocketApi prefix (including a following dot) that must match the codesign key's TeamIdentifier/Organizational Unit" )
Original file line number Diff line number Diff line change 1919
2020using namespace OCC ;
2121
22+
23+ template <>
24+ QString Utility::enumToDisplayName (PinState pState)
25+ {
26+ switch (pState) {
27+ case PinState::AlwaysLocal:
28+ return QStringLiteral (" alwayslocal" );
29+ case PinState::Excluded:
30+ return QStringLiteral (" excluded" );
31+ case PinState::Inherited:
32+ return QStringLiteral (" inherited" );
33+ case PinState::OnlineOnly:
34+ return QStringLiteral (" onlineonly" );
35+ case PinState::Unspecified:
36+ return QStringLiteral (" unspecified" );
37+ }
38+ Q_UNREACHABLE ();
39+ }
40+
41+
2242template <>
2343QString Utility::enumToDisplayName (VfsItemAvailability availability)
2444{
Original file line number Diff line number Diff line change @@ -137,6 +137,8 @@ using namespace PinStateEnums;
137137
138138template <>
139139OPENCLOUD_SYNC_EXPORT QString Utility::enumToDisplayName (VfsItemAvailability availability);
140+ template <>
141+ OPENCLOUD_SYNC_EXPORT QString Utility::enumToDisplayName (PinState pState);
140142}
141143
142144#endif
Original file line number Diff line number Diff line change @@ -51,6 +51,8 @@ Optional<Vfs::Mode> Vfs::modeFromString(const QString &str)
5151 return Off;
5252 } else if (str == QLatin1String (" cfapi" )) {
5353 return WindowsCfApi;
54+ } else if (str == QLatin1String (" xattr" )) {
55+ return XAttr;
5456 }
5557 return {};
5658}
@@ -65,6 +67,8 @@ QString Utility::enumToString(Vfs::Mode mode)
6567 return QStringLiteral (" cfapi" );
6668 case Vfs::Mode::Off:
6769 return QStringLiteral (" off" );
70+ case Vfs::Mode::XAttr:
71+ return QStringLiteral (" xattr" );
6872 }
6973 Q_UNREACHABLE ();
7074}
@@ -146,6 +150,7 @@ void Vfs::wipeDehydratedVirtualFiles()
146150
147151QFuture<Result<void , QString>> Vfs::hydrateFile (const QByteArray &fileId)
148152{
153+ Q_UNUSED (fileId)
149154 // nothing to do
150155 return QtFuture::makeReadyValueFuture (Result<void , QString>{});
151156}
@@ -207,6 +212,8 @@ Vfs::Mode OCC::VfsPluginManager::bestAvailableVfsMode() const
207212{
208213 if (isVfsPluginAvailable (Vfs::WindowsCfApi)) {
209214 return Vfs::WindowsCfApi;
215+ } else if (isVfsPluginAvailable (Vfs::XAttr)) {
216+ return Vfs::XAttr;
210217 } else if (isVfsPluginAvailable (Vfs::Off)) {
211218 return Vfs::Off;
212219 }
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ class OPENCLOUD_SYNC_EXPORT Vfs : public QObject
9797 * Currently plugins and modes are one-to-one but that's not required.
9898 * The raw integer values are used in Qml
9999 */
100- enum Mode : uint8_t { Off = 0 , WindowsCfApi = 1 };
100+ enum Mode : uint8_t { Off = 0 , WindowsCfApi = 1 , XAttr = 2 };
101101 Q_ENUM (Mode)
102102 enum class ConvertToPlaceholderResult : uint8_t { Ok, Locked };
103103 Q_ENUM (ConvertToPlaceholderResult)
@@ -251,9 +251,9 @@ public Q_SLOTS:
251251 */
252252 virtual void startImpl (const VfsSetupParams ¶ms) = 0;
253253
254- private:
255254 // the parameters passed to start()
256255 std::unique_ptr<VfsSetupParams> _setupParams;
256+ private:
257257
258258 friend class OwncloudPropagator ;
259259};
Original file line number Diff line number Diff line change 1+ add_vfs_plugin(NAME xattr
2+ SRC
3+ vfs_xattr.cpp
4+ )
You can’t perform that action at this time.
0 commit comments