KIO

kprotocolinfo.h
1 /*
2  This file is part of the KDE libraries
3  SPDX-FileCopyrightText: 1999 Torben Weis <[email protected]>
4  SPDX-FileCopyrightText: 2000-2001 Waldo Bastian <[email protected]>
5  SPDX-FileCopyrightText: 2012 David Faure <[email protected]>
6 
7  SPDX-License-Identifier: LGPL-2.0-only
8 */
9 
10 #ifndef KPROTOCOLINFO_H
11 #define KPROTOCOLINFO_H
12 
13 #include "kiocore_export.h"
14 #include <QVariant>
15 #include <QStringList>
16 
33 class KIOCORE_EXPORT KProtocolInfo
34 {
35 public:
36  //
37  // Static functions:
38  //
39 
44  static QStringList protocols();
45 
53  static bool isKnownProtocol(const QUrl &url);
54 
59  static bool isKnownProtocol(const QString &protocol);
60 
72  static QString exec(const QString &protocol);
73 
81  enum Type { T_STREAM,
84  T_ERROR
85  };
86 
95  struct ExtraField {
96 
97  enum Type { String = QVariant::String, DateTime = QVariant::DateTime, Invalid = QVariant::Invalid };
98 
99  ExtraField() : type(Invalid) {}
100  ExtraField(const QString &_name, Type _type)
101  : name(_name), type(_type)
102  {
103  }
104  QString name;
105  Type type;
106  };
115  static ExtraFieldList extraFields(const QUrl &url);
116 
129  static bool isHelperProtocol(const QUrl &url);
130 
135  static bool isHelperProtocol(const QString &protocol);
136 
153  static bool isFilterProtocol(const QUrl &url);
154 
159  static bool isFilterProtocol(const QString &protocol);
160 
169  static QString icon(const QString &protocol);
170 
182  static QString config(const QString &protocol);
183 
196  static int maxSlaves(const QString &protocol);
197 
209  static int maxSlavesPerHost(const QString &protocol);
210 
222  static bool determineMimetypeFromExtension(const QString &protocol);
223 
233  static QString defaultMimetype(const QString &protocol);
234 
243  static QString docPath(const QString &protocol);
244 
260  static QString protocolClass(const QString &protocol);
261 
272  static bool showFilePreview(const QString &protocol);
273 
290  static QStringList capabilities(const QString &protocol);
291 
302  static QStringList archiveMimetypes(const QString &protocol);
303 
315  static QStringList slaveHandlesNotify(const QString &protocol);
316 
326  static QString proxiedBy(const QString &protocol);
327 
328  typedef enum { Name, FromUrl, DisplayName } FileNameUsedForCopying;
329 
330 private:
331  Q_DISABLE_COPY(KProtocolInfo)
332 };
333 
334 #endif
no information about the type available
Definition: kprotocolinfo.h:83
Information about I/O (Internet, etc.) protocols supported by KDE.
Definition: kprotocolinfo.h:33
Definition of an extra field in the UDS entries, returned by a listDir operation. ...
Definition: kprotocolinfo.h:95
structured directory
Definition: kprotocolinfo.h:82
Type
Describes the type of a protocol.
Definition: kprotocolinfo.h:81
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Aug 12 2020 23:00:48 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.