TDE core libraries
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

kprotocolinfo.h 24KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688
  1. /* This file is part of the KDE libraries
  2. Copyright (C) 1999 Torben Weis <weis@kde.org>
  3. Copyright (C) 2000-2001 Waldo Bastian <bastian@kde.org>
  4. This library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Library General Public
  6. License version 2 as published by the Free Software Foundation.
  7. This library is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  10. Library General Public License for more details.
  11. You should have received a copy of the GNU Library General Public License
  12. along with this library; see the file COPYING.LIB. If not, write to
  13. the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  14. Boston, MA 02110-1301, USA.
  15. */
  16. #ifndef __kprotocolinfo_h__
  17. #define __kprotocolinfo_h__
  18. #include <tqstring.h>
  19. #include <tqstringlist.h>
  20. #include <tqdatastream.h>
  21. #include <kurl.h>
  22. #include <tdesycocaentry.h>
  23. #include <tdesycocatype.h>
  24. /**
  25. * Information about I/O (Internet, etc.) protocols supported by KDE.
  26. * This class is useful if you want to know which protocols
  27. * KDE supports. In addition you can find out lots of information
  28. * about a certain protocol. A KProtocolInfo instance represents a
  29. * single protocol. Most of the functionality is provided by the static
  30. * methods that scan the *.protocol files of all installed tdeioslaves to get
  31. * this information.
  32. *
  33. * *.protocol files are installed in the "services" resource.
  34. *
  35. * @author Torben Weis <weis@kde.org>
  36. */
  37. class TDEIO_EXPORT KProtocolInfo : public KSycocaEntry
  38. {
  39. friend class KProtocolInfoFactory;
  40. K_SYCOCATYPE( KST_KProtocolInfo, KSycocaEntry )
  41. public:
  42. typedef KSharedPtr<KProtocolInfo> Ptr;
  43. public:
  44. /**
  45. * Read a protocol description file
  46. * @param path the path of the description file
  47. */
  48. KProtocolInfo( const TQString & path); // KDE4: make private and add friend class KProtocolInfoBuildFactory
  49. // Then we can get rid of the d pointer
  50. /**
  51. * Returns whether the protocol description file is valid.
  52. * @return true if valid, false otherwise
  53. */
  54. virtual bool isValid() const { return !m_name.isEmpty(); }
  55. /**
  56. * Returns the name of the protocol.
  57. *
  58. * This corresponds to the "protocol=" field in the protocol description file.
  59. *
  60. * @return the name of the protocol
  61. * @see KURL::protocol()
  62. */
  63. virtual TQString name() const { return m_name; }
  64. //
  65. // Static functions:
  66. //
  67. /**
  68. * Returns list of all known protocols.
  69. * @return a list of all known protocols
  70. */
  71. static TQStringList protocols();
  72. /**
  73. * Returns whether a protocol is installed that is able to handle @p url.
  74. *
  75. * @param url the url to check
  76. * @return true if the protocol is known
  77. * @see name()
  78. */
  79. static bool isKnownProtocol( const KURL &url );
  80. /**
  81. * Same as above except you can supply just the protocol instead of
  82. * the whole URL.
  83. */
  84. static bool isKnownProtocol( const TQString& protocol )
  85. #ifdef KPROTOCOLINFO_TDECORE
  86. KDE_WEAK_SYMBOL
  87. #endif
  88. ;
  89. /**
  90. * Returns the library / executable to open for the protocol @p protocol
  91. * Example : "tdeio_ftp", meaning either the executable "tdeio_ftp" or
  92. * the library "tdeio_ftp.la" (recommended), whichever is available.
  93. *
  94. * This corresponds to the "exec=" field in the protocol description file.
  95. * @param protocol the protocol to check
  96. * @return the executable of library to open, or TQString::null for
  97. * unsupported protocols
  98. * @see KURL::protocol()
  99. */
  100. static TQString exec( const TQString& protocol );
  101. /**
  102. * Describes the type of a protocol.
  103. */
  104. enum Type { T_STREAM, ///< protocol returns a stream
  105. T_FILESYSTEM, ///<protocol describes location in a file system
  106. T_NONE, ///< no information about the tyope available
  107. T_ERROR ///< used to signal an error
  108. };
  109. /**
  110. * Returns whether the protocol should be treated as a filesystem
  111. * or as a stream when reading from it.
  112. *
  113. * This corresponds to the "input=" field in the protocol description file.
  114. * Valid values for this field are "filesystem", "stream" or "none" (default).
  115. *
  116. * @param url the url to check
  117. * @return the input type of the given @p url
  118. */
  119. static Type inputType( const KURL &url );
  120. /**
  121. * Returns whether the protocol should be treated as a filesystem
  122. * or as a stream when writing to it.
  123. *
  124. * This corresponds to the "output=" field in the protocol description file.
  125. * Valid values for this field are "filesystem", "stream" or "none" (default).
  126. *
  127. * @param url the url to check
  128. * @return the output type of the given @p url
  129. */
  130. static Type outputType( const KURL &url );
  131. /**
  132. * Returns the list of fields this protocol returns when listing
  133. * The current possibilities are
  134. * Name, Type, Size, Date, AccessDate, Access, Owner, Group, Link, URL, MimeType
  135. * as well as Extra1, Extra2 etc. for extra fields (see extraFields).
  136. *
  137. * This corresponds to the "listing=" field in the protocol description file.
  138. * The supported fields should be separated with ',' in the protocol description file.
  139. *
  140. * @param url the url to check
  141. * @return a list of field names
  142. */
  143. static TQStringList listing( const KURL &url );
  144. /**
  145. * Definition of an extra field in the UDS entries, returned by a listDir operation.
  146. *
  147. * The name is the name of the column, translated.
  148. *
  149. * The type name comes from TQVariant::typeName()
  150. * Currently supported types: "TQString", "TQDateTime" (ISO-8601 format)
  151. *
  152. * @since 3.2
  153. */
  154. struct ExtraField {
  155. ExtraField() {} // for QValueList
  156. ExtraField(const TQString& _name, const TQString& _type )
  157. : name(_name), type(_type) {
  158. }
  159. TQString name;
  160. TQString type; // KDE4: make it TQVariant::Type
  161. };
  162. typedef TQValueList<ExtraField > ExtraFieldList;
  163. /**
  164. * Definition of extra fields in the UDS entries, returned by a listDir operation.
  165. *
  166. * This corresponds to the "ExtraNames=" and "ExtraTypes=" fields in the protocol description file.
  167. * Those two lists should be separated with ',' in the protocol description file.
  168. * See ExtraField for details about names and types
  169. *
  170. * @since 3.2
  171. */
  172. static ExtraFieldList extraFields( const KURL& url );
  173. /**
  174. * Returns whether the protocol can act as a source protocol.
  175. *
  176. * A source protocol retrieves data from or stores data to the
  177. * location specified by a URL.
  178. * A source protocol is the opposite of a filter protocol.
  179. *
  180. * The "source=" field in the protocol description file determines
  181. * whether a protocol is a source protocol or a filter protocol.
  182. * @param url the url to check
  183. * @return true if the protocol is a source of data (e.g. http), false if the
  184. * protocol is a filter (e.g. gzip)
  185. */
  186. static bool isSourceProtocol( const KURL &url );
  187. /**
  188. * Returns whether the protocol can act as a helper protocol.
  189. * A helper protocol invokes an external application and does not return
  190. * a file or stream.
  191. *
  192. * This corresponds to the "helper=" field in the protocol description file.
  193. * Valid values for this field are "true" or "false" (default).
  194. *
  195. * @param url the url to check
  196. * @return true if the protocol is a helper protocol (e.g. vnc), false
  197. * if not (e.g. http)
  198. */
  199. static bool isHelperProtocol( const KURL &url );
  200. /**
  201. * Same as above except you can supply just the protocol instead of
  202. * the whole URL.
  203. */
  204. static bool isHelperProtocol( const TQString& protocol )
  205. #ifdef KPROTOCOLINFO_TDECORE
  206. KDE_WEAK_SYMBOL
  207. #endif
  208. ;
  209. /**
  210. * Returns whether the protocol can act as a filter protocol.
  211. *
  212. * A filter protocol can operate on data that is passed to it
  213. * but does not retrieve/store data itself, like gzip.
  214. * A filter protocol is the opposite of a source protocol.
  215. *
  216. * The "source=" field in the protocol description file determines
  217. * whether a protocol is a source protocol or a filter protocol.
  218. * Valid values for this field are "true" (default) for source protocol or
  219. * "false" for filter protocol.
  220. *
  221. * @param url the url to check
  222. * @return true if the protocol is a filter (e.g. gzip), false if the
  223. * protocol is a helper or source
  224. */
  225. static bool isFilterProtocol( const KURL &url );
  226. /**
  227. * Same as above except you can supply just the protocol instead of
  228. * the whole URL.
  229. */
  230. static bool isFilterProtocol( const TQString& protocol )
  231. #ifdef KPROTOCOLINFO_TDECORE
  232. KDE_WEAK_SYMBOL
  233. #endif
  234. ;
  235. /**
  236. * Returns whether the protocol can list files/objects.
  237. * If a protocol supports listing it can be browsed in e.g. file-dialogs
  238. * and konqueror.
  239. *
  240. * Whether a protocol supports listing is determined by the "listing="
  241. * field in the protocol description file.
  242. * If the protocol support listing it should list the fields it provides in
  243. * this field. If the protocol does not support listing this field should
  244. * remain empty (default.)
  245. *
  246. * @param url the url to check
  247. * @return true if the protocol support listing
  248. * @see listing()
  249. */
  250. static bool supportsListing( const KURL &url );
  251. /**
  252. * Returns whether the protocol can retrieve data from URLs.
  253. *
  254. * This corresponds to the "reading=" field in the protocol description file.
  255. * Valid values for this field are "true" or "false" (default).
  256. *
  257. * @param url the url to check
  258. * @return true if it is possible to read from the URL
  259. */
  260. static bool supportsReading( const KURL &url );
  261. /**
  262. * Returns whether the protocol can store data to URLs.
  263. *
  264. * This corresponds to the "writing=" field in the protocol description file.
  265. * Valid values for this field are "true" or "false" (default).
  266. *
  267. * @param url the url to check
  268. * @return true if the protocol supports writing
  269. */
  270. static bool supportsWriting( const KURL &url );
  271. /**
  272. * Returns whether the protocol can create directories/folders.
  273. *
  274. * This corresponds to the "makedir=" field in the protocol description file.
  275. * Valid values for this field are "true" or "false" (default).
  276. *
  277. * @param url the url to check
  278. * @return true if the protocol can create directories
  279. */
  280. static bool supportsMakeDir( const KURL &url );
  281. /**
  282. * Returns whether the protocol can delete files/objects.
  283. *
  284. * This corresponds to the "deleting=" field in the protocol description file.
  285. * Valid values for this field are "true" or "false" (default).
  286. *
  287. * @param url the url to check
  288. * @return true if the protocol supports deleting
  289. */
  290. static bool supportsDeleting( const KURL &url );
  291. /**
  292. * Returns whether the protocol can create links between files/objects.
  293. *
  294. * This corresponds to the "linking=" field in the protocol description file.
  295. * Valid values for this field are "true" or "false" (default).
  296. *
  297. * @param url the url to check
  298. * @return true if the protocol supports linking
  299. */
  300. static bool supportsLinking( const KURL &url );
  301. /**
  302. * Returns whether the protocol can move files/objects between different
  303. * locations.
  304. *
  305. * This corresponds to the "moving=" field in the protocol description file.
  306. * Valid values for this field are "true" or "false" (default).
  307. *
  308. * @param url the url to check
  309. * @return true if the protocol supports moving
  310. */
  311. static bool supportsMoving( const KURL &url );
  312. /**
  313. * Returns whether the protocol can copy files/objects directly from the
  314. * filesystem itself. If not, the application will read files from the
  315. * filesystem using the file-protocol and pass the data on to the destination
  316. * protocol.
  317. *
  318. * This corresponds to the "copyFromFile=" field in the protocol description file.
  319. * Valid values for this field are "true" or "false" (default).
  320. *
  321. * @param url the url to check
  322. * @return true if the protocol can copy files from the local file system
  323. */
  324. static bool canCopyFromFile( const KURL &url );
  325. /**
  326. * Returns whether the protocol can copy files/objects directly to the
  327. * filesystem itself. If not, the application will receive the data from
  328. * the source protocol and store it in the filesystem using the
  329. * file-protocol.
  330. *
  331. * This corresponds to the "copyToFile=" field in the protocol description file.
  332. * Valid values for this field are "true" or "false" (default).
  333. *
  334. * @param url the url to check
  335. * @return true if the protocol can copy files to the local file system
  336. */
  337. static bool canCopyToFile( const KURL &url );
  338. /**
  339. * Returns whether the protocol can rename (i.e. move fast) files/objects
  340. * directly from the filesystem itself. If not, the application will read
  341. * files from the filesystem using the file-protocol and pass the data on
  342. * to the destination protocol.
  343. *
  344. * This corresponds to the "renameFromFile=" field in the protocol description file.
  345. * Valid values for this field are "true" or "false" (default).
  346. *
  347. * @param url the url to check
  348. * @return true if the protocol can rename/move files from the local file system
  349. * @since 3.4
  350. */
  351. static bool canRenameFromFile( const KURL &url );
  352. /**
  353. * Returns whether the protocol can rename (i.e. move fast) files/objects
  354. * directly to the filesystem itself. If not, the application will receive
  355. * the data from the source protocol and store it in the filesystem using the
  356. * file-protocol.
  357. *
  358. * This corresponds to the "renameToFile=" field in the protocol description file.
  359. * Valid values for this field are "true" or "false" (default).
  360. *
  361. * @param url the url to check
  362. * @return true if the protocol can rename files to the local file system
  363. * @since 3.4
  364. */
  365. static bool canRenameToFile( const KURL &url );
  366. /**
  367. * Returns whether the protocol can recursively delete directories by itself.
  368. * If not (the usual case) then KIO will list the directory and delete files
  369. * and empty directories one by one.
  370. *
  371. * This corresponds to the "deleteRecursive=" field in the protocol description file.
  372. * Valid values for this field are "true" or "false" (default).
  373. *
  374. * @param url the url to check
  375. * @return true if the protocol can delete non-empty directories by itself.
  376. * @since 3.4
  377. */
  378. static bool canDeleteRecursive( const KURL &url );
  379. typedef enum { Name, FromURL } FileNameUsedForCopying;
  380. /**
  381. * This setting defines the strategy to use for generating a filename, when
  382. * copying a file or directory to another directory. By default the destination
  383. * filename is made out of the filename in the source URL. However if the
  384. * ioslave displays names that are different from the filename of the URL
  385. * (e.g. tdeio_fonts shows Arial for arial.ttf, or tdeio_trash shows foo.txt and
  386. * uses some internal URL), using Name means that the display name (UDS_NAME)
  387. * will be used to as the filename in the destination directory.
  388. *
  389. * This corresponds to the "fileNameUsedForCopying=" field in the protocol description file.
  390. * Valid values for this field are "Name" or "FromURL" (default).
  391. *
  392. * @param url the url to check
  393. * @return how to generate the filename in the destination directory when copying/moving
  394. * @since 3.4
  395. */
  396. static FileNameUsedForCopying fileNameUsedForCopying( const KURL &url );
  397. /**
  398. * Returns default mimetype for this URL based on the protocol.
  399. *
  400. * This corresponds to the "defaultMimetype=" field in the protocol description file.
  401. *
  402. * @param url the url to check
  403. * @return the default mime type of the protocol, or null if unknown
  404. */
  405. static TQString defaultMimetype( const KURL& url );
  406. /**
  407. * Returns the name of the icon, associated with the specified protocol.
  408. *
  409. * This corresponds to the "Icon=" field in the protocol description file.
  410. *
  411. * @param protocol the protocol to check
  412. * @return the icon of the protocol, or null if unknown
  413. */
  414. static TQString icon( const TQString& protocol );
  415. /**
  416. * Returns the name of the config file associated with the
  417. * specified protocol. This is useful if two similar protocols
  418. * need to share a single config file, e.g. http and https.
  419. *
  420. * This corresponds to the "config=" field in the protocol description file.
  421. * The default is the protocol name, see name()
  422. *
  423. * @param protocol the protocol to check
  424. * @return the config file, or null if unknown
  425. */
  426. static TQString config( const TQString& protocol );
  427. /**
  428. * Returns the soft limit on the number of slaves for this protocol.
  429. * This limits the number of slaves used for a single operation, note
  430. * that multiple operations may result in a number of instances that
  431. * exceeds this soft limit.
  432. *
  433. * This corresponds to the "maxInstances=" field in the protocol description file.
  434. * The default is 1.
  435. *
  436. * @param protocol the protocol to check
  437. * @return the maximum number of slaves, or 1 if unknown
  438. */
  439. static int maxSlaves( const TQString& protocol );
  440. /**
  441. * Returns whether mimetypes can be determined based on extension for this
  442. * protocol. For some protocols, e.g. http, the filename extension in the URL
  443. * can not be trusted to truly reflect the file type.
  444. *
  445. * This corresponds to the "determineMimetypeFromExtension=" field in the protocol description file.
  446. * Valid values for this field are "true" (default) or "false".
  447. *
  448. * @param protocol the protocol to check
  449. * @return true if the mime types can be determined by extension
  450. */
  451. static bool determineMimetypeFromExtension( const TQString &protocol );
  452. /**
  453. * Returns the documentation path for the specified protocol.
  454. *
  455. * This corresponds to the "DocPath=" field in the protocol description file.
  456. *
  457. * @param protocol the protocol to check
  458. * @return the docpath of the protocol, or null if unknown
  459. * @since 3.2
  460. */
  461. static TQString docPath( const TQString& protocol );
  462. /**
  463. * Returns the protocol class for the specified protocol.
  464. *
  465. * This corresponds to the "Class=" field in the protocol description file.
  466. *
  467. * The following classes are defined:
  468. * @li ":internet" for common internet protocols
  469. * @li ":local" for protocols that access local resources
  470. *
  471. * Protocol classes always start with a ':' so that they can not be confused with
  472. * the protocols themselves.
  473. *
  474. * @param protocol the protocol to check
  475. * @return the class of the protocol, or null if unknown
  476. * @since 3.2
  477. */
  478. static TQString protocolClass( const TQString& protocol );
  479. /**
  480. * Returns whether file previews should be shown for the specified protocol.
  481. *
  482. * This corresponds to the "ShowPreviews=" field in the protocol description file.
  483. *
  484. * By default previews are shown if protocolClass is :local.
  485. *
  486. * @param protocol the protocol to check
  487. * @return true if previews should be shown by default, false otherwise
  488. * @since 3.2
  489. */
  490. static bool showFilePreview( const TQString& protocol );
  491. /**
  492. * Returns the suggested URI parsing mode for the KURL parser.
  493. *
  494. * This corresponds to the "URIMode=" field in the protocol description file.
  495. *
  496. * The following parsing modes are defined:
  497. * @li "url" for a standards compliant URL
  498. * @li "rawuri" for a non-conformant URI for which URL parsing would be meaningless
  499. * @li "mailto" for a mailto style URI (the path part contains only an email address)
  500. *
  501. * @param protocol the protocol to check
  502. * @return the suggested parsing mode, or KURL::Auto if unspecified
  503. *
  504. * @since 3.2
  505. */
  506. static KURL::URIMode uriParseMode( const TQString& protocol );
  507. /**
  508. * Returns the list of capabilities provided by the tdeioslave implementing
  509. * this protocol.
  510. *
  511. * This corresponds to the "Capabilities=" field in the protocol description file.
  512. *
  513. * The capability names are not defined globally, they are up to each
  514. * slave implementation. For example when adding support for a new
  515. * special command for mounting, one would add the string "Mount" to the
  516. * capabilities list, and applications could check for that string
  517. * before sending a special() command that would otherwise do nothing
  518. * on older tdeioslave implementations.
  519. *
  520. * @param protocol the protocol to check
  521. * @return the list of capabilities.
  522. *
  523. * @since 3.3
  524. */
  525. static TQStringList capabilities( const TQString& protocol );
  526. /**
  527. * Returns the name of the protocol through which the request
  528. * will be routed if proxy support is enabled.
  529. *
  530. * A good example of this is the ftp protocol for which proxy
  531. * support is commonly handled by the http protocol.
  532. *
  533. * This corresponds to the "ProxiedBy=" in the protocol description file.
  534. *
  535. * @since 3.3
  536. */
  537. static TQString proxiedBy( const TQString& protocol );
  538. public:
  539. // Internal functions:
  540. /**
  541. * @internal construct a KProtocolInfo from a stream
  542. */
  543. KProtocolInfo( TQDataStream& _str, int offset);
  544. virtual ~KProtocolInfo();
  545. /**
  546. * @internal
  547. * Load the protocol info from a stream.
  548. */
  549. virtual void load(TQDataStream& );
  550. /**
  551. * @internal
  552. * Save the protocol info to a stream.
  553. */
  554. virtual void save(TQDataStream& );
  555. ////////////////////////// DEPRECATED /////////////////////////
  556. // The following methods are deprecated:
  557. /// @deprecated
  558. static Type inputType( const TQString& protocol ) KDE_DEPRECATED;
  559. /// @deprecated
  560. static Type outputType( const TQString& protocol ) KDE_DEPRECATED;
  561. /**
  562. * @deprecated
  563. * Returns the list of fields this protocol returns when listing
  564. * The current possibilities are
  565. * Name, Type, Size, Date, AccessDate, Access, Owner, Group, Link, URL, MimeType
  566. */
  567. static TQStringList listing( const TQString& protocol ) KDE_DEPRECATED;
  568. /// @deprecated
  569. static bool isSourceProtocol( const TQString& protocol ) KDE_DEPRECATED;
  570. /// @deprecated
  571. static bool supportsListing( const TQString& protocol ) KDE_DEPRECATED;
  572. /// @deprecated
  573. static bool supportsReading( const TQString& protocol ) KDE_DEPRECATED;
  574. /// @deprecated
  575. static bool supportsWriting( const TQString& protocol ) KDE_DEPRECATED;
  576. /// @deprecated
  577. static bool supportsMakeDir( const TQString& protocol ) KDE_DEPRECATED;
  578. /// @deprecated
  579. static bool supportsDeleting( const TQString& protocol ) KDE_DEPRECATED;
  580. /// @deprecated
  581. static bool supportsLinking( const TQString& protocol ) KDE_DEPRECATED;
  582. /// @deprecated
  583. static bool supportsMoving( const TQString& protocol ) KDE_DEPRECATED;
  584. /// @deprecated
  585. static bool canCopyFromFile( const TQString& protocol ) KDE_DEPRECATED;
  586. /// @deprecated
  587. static bool canCopyToFile( const TQString& protocol ) KDE_DEPRECATED;
  588. /// @deprecated
  589. static TQString defaultMimetype( const TQString& protocol) KDE_DEPRECATED;
  590. //////////////////////// END DEPRECATED ///////////////////////
  591. protected:
  592. TQString m_name;
  593. TQString m_exec;
  594. Type m_inputType;
  595. Type m_outputType;
  596. TQStringList m_listing;
  597. bool m_isSourceProtocol;
  598. bool m_isHelperProtocol;
  599. bool m_supportsListing;
  600. bool m_supportsReading;
  601. bool m_supportsWriting;
  602. bool m_supportsMakeDir;
  603. bool m_supportsDeleting;
  604. bool m_supportsLinking;
  605. bool m_supportsMoving;
  606. TQString m_defaultMimetype;
  607. bool m_determineMimetypeFromExtension;
  608. TQString m_icon;
  609. bool m_canCopyFromFile;
  610. bool m_canCopyToFile;
  611. TQString m_config;
  612. int m_maxSlaves;
  613. bool canRenameFromFile() const; // for kprotocolinfo_tdecore
  614. bool canRenameToFile() const; // for kprotocolinfo_tdecore
  615. bool canDeleteRecursive() const; // for kprotocolinfo_tdecore
  616. FileNameUsedForCopying fileNameUsedForCopying() const; // for kprotocolinfo_tdecore
  617. static KProtocolInfo* findProtocol(const KURL &url); // for kprotocolinfo_tdecore
  618. protected:
  619. virtual void virtual_hook( int id, void* data );
  620. private:
  621. class KProtocolInfoPrivate;
  622. KProtocolInfoPrivate* d;
  623. };
  624. TDEIO_EXPORT TQDataStream& operator>>( TQDataStream& s, KProtocolInfo::ExtraField& field );
  625. TDEIO_EXPORT TQDataStream& operator<<( TQDataStream& s, const KProtocolInfo::ExtraField& field );
  626. #endif