• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.10.4 API Reference
  • KDE Home
  • Contact Us
 

KIO

  • kio
  • kio
authinfo.h
Go to the documentation of this file.
1 /*
2  * This file is part of the KDE libraries
3  * Copyright (C) 2000-2001 Dawit Alemayehu <adawit@kde.org>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public License
16  * along with this library; see the file COPYING.LIB. If not, write to
17  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  * Boston, MA 02110-1301, USA.
19  */
20 
21 #ifndef KIO_AUTHINFO_H
22 #define KIO_AUTHINFO_H
23 
24 #include "kio_export.h"
25 
26 #include <QtCore/QMap>
27 #include <QtCore/QList>
28 #include <QtCore/QStringList>
29 #include <kurl.h>
30 
31 class QDBusArgument;
32 
33 namespace KIO {
34 
35 class AuthInfoPrivate;
36 
57 class KIO_EXPORT AuthInfo
58 {
59  KIO_EXPORT friend QDataStream& operator<< (QDataStream& s, const AuthInfo& a);
60  KIO_EXPORT friend QDataStream& operator>> (QDataStream& s, AuthInfo& a);
61 
62  KIO_EXPORT friend QDBusArgument &operator<<(QDBusArgument &argument, const AuthInfo &a);
63  KIO_EXPORT friend const QDBusArgument &operator>>(const QDBusArgument &argument, AuthInfo &a);
64 
65 public:
66 
70  AuthInfo();
71 
75  AuthInfo( const AuthInfo& info );
76 
81  ~AuthInfo();
82 
86  AuthInfo& operator=( const AuthInfo& info );
87 
92  bool isModified() const;
93 
98  void setModified( bool flag );
99 
110  KUrl url;
111 
115  QString username;
116 
120  QString password;
121 
131  QString prompt;
132 
142  QString caption;
143 
166  QString comment;
167 
175  QString commentLabel;
176 
189  QString realmValue;
190 
199  QString digestInfo;
200 
212  bool verifyPath;
213 
219  bool readOnly;
220 
232  bool keepPassword;
233 
238  enum FieldFlags
239  {
240  ExtraFieldNoFlags = 0,
241  ExtraFieldReadOnly = 1<<1,
242  ExtraFieldMandatory = 1<<2
243  };
244 
254  void setExtraField(const QString &fieldName, const QVariant & value);
255 
260  void setExtraFieldFlags(const QString &fieldName, const FieldFlags flags);
261 
267  QVariant getExtraField(const QString &fieldName) const;
268 
273  AuthInfo::FieldFlags getExtraFieldFlags(const QString &fieldName) const;
274 
281  static void registerMetaTypes();
282 
283 protected:
284  bool modified;
285 
286 private:
287  friend class ::KIO::AuthInfoPrivate;
288  AuthInfoPrivate * const d;
289 };
290 
291 KIO_EXPORT QDataStream& operator<< (QDataStream& s, const AuthInfo& a);
292 KIO_EXPORT QDataStream& operator>> (QDataStream& s, AuthInfo& a);
293 
294 KIO_EXPORT QDBusArgument &operator<<(QDBusArgument &argument, const AuthInfo &a);
295 KIO_EXPORT const QDBusArgument &operator>>(const QDBusArgument &argument, AuthInfo &a);
296 
306 class KIO_EXPORT NetRC
307 {
308 public:
309 
320  enum LookUpModeFlag
321  {
322  exactOnly = 0x0002,
323  defaultOnly = 0x0004,
324  presetOnly = 0x0008
325  };
326  Q_DECLARE_FLAGS(LookUpMode, LookUpModeFlag)
327 
328 
332  struct AutoLogin
333  {
334  QString type;
335  QString machine;
336  QString login;
337  QString password;
338  QMap<QString, QStringList> macdef;
339  };
340 
345  static NetRC* self();
346 
357  bool lookup( const KUrl& url, AutoLogin& login,
358  bool userealnetrc = false,
359  const QString &type = QString(),
360  LookUpMode mode = LookUpMode(exactOnly) | defaultOnly );
364  void reload();
365 
366 protected:
367  QString extract( const char*, const char*, int& );
368  int openf( const QString& );
369  bool parse( int );
370 
371 private:
372  NetRC();
373  ~NetRC();
374 
375 private:
376  static NetRC* instance;
377 
378  class NetRCPrivate;
379  NetRCPrivate* const d;
380 };
381 }
382 Q_DECLARE_OPERATORS_FOR_FLAGS(KIO::NetRC::LookUpMode)
383 Q_DECLARE_METATYPE(KIO::AuthInfo)
384 
385 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Mon Jul 15 2013 05:11:45 by doxygen 1.8.3.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KIO

Skip menu "KIO"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs-4.10.4 API Reference

Skip menu "kdelibs-4.10.4 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal