• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KIO

authinfo.h

Go to the documentation of this file.
00001 /*
00002  *  This file is part of the KDE libraries
00003  *  Copyright (C) 2000-2001 Dawit Alemayehu <adawit@kde.org>
00004  *
00005  *  This library is free software; you can redistribute it and/or
00006  *  modify it under the terms of the GNU Library General Public
00007  *  License as published by the Free Software Foundation; either
00008  *  version 2 of the License, or (at your option) any later version.
00009  *
00010  *  This library is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  *  Library General Public License for more details.
00014  *
00015  *  You should have received a copy of the GNU Library General Public License
00016  *  along with this library; see the file COPYING.LIB.  If not, write to
00017  *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018  *  Boston, MA 02110-1301, USA.
00019  */
00020 
00021 #ifndef KIO_AUTHINFO_H
00022 #define KIO_AUTHINFO_H
00023 
00024 #include "kio_export.h"
00025 
00026 #include <QtCore/QMap>
00027 #include <QtCore/QList>
00028 #include <QtCore/QStringList>
00029 #include <kurl.h>
00030 
00031 namespace KIO {
00032 
00033 class AuthInfoPrivate;
00034 
00055 class KIO_EXPORT AuthInfo
00056 {
00057     KIO_EXPORT friend QDataStream& operator<< (QDataStream& s, const AuthInfo& a);
00058     KIO_EXPORT friend QDataStream& operator>> (QDataStream& s, AuthInfo& a);
00059 
00060 public:
00061     
00065    AuthInfo();
00066 
00070    AuthInfo( const AuthInfo& info );
00071    
00076    ~AuthInfo();
00077    
00081    AuthInfo& operator=( const AuthInfo& info );
00082 
00087    bool isModified() const;
00088 
00093    void setModified( bool flag );
00094 
00105    KUrl url;
00106 
00110    QString username;
00111 
00115    QString password;
00116 
00126    QString prompt;
00127 
00137    QString caption;
00138 
00161    QString comment;
00162 
00170    QString commentLabel;
00171 
00188    QString realmValue;
00189 
00198    QString digestInfo;
00199 
00211    bool verifyPath;
00212 
00218    bool readOnly;
00219 
00231    bool keepPassword;
00232    
00237    enum FieldFlags
00238    {
00239        ExtraFieldNoFlags = 0,
00240        ExtraFieldReadOnly = 1<<1,
00241        ExtraFieldMandatory = 1<<2
00242    };   
00243    
00253    void setExtraField(const QString &fieldName, const QVariant & value);
00254    
00259    void setExtraFieldFlags(const QString &fieldName, const FieldFlags flags);
00260    
00266    QVariant getExtraField(const QString &fieldName) const;
00267    
00272    AuthInfo::FieldFlags getExtraFieldFlags(const QString &fieldName) const;
00273    
00274 protected:
00275     bool modified;
00276 private:
00277     friend class ::KIO::AuthInfoPrivate;
00278     AuthInfoPrivate * const d;
00279 };
00280 
00281 KIO_EXPORT QDataStream& operator<< (QDataStream& s, const AuthInfo& a);
00282 KIO_EXPORT QDataStream& operator>> (QDataStream& s, AuthInfo& a);
00283 
00293 class KIO_EXPORT NetRC
00294 {
00295 public:
00296 
00307   enum LookUpModeFlag
00308   {
00309       exactOnly = 0x0002,
00310       defaultOnly = 0x0004,
00311       presetOnly = 0x0008
00312   };
00313   Q_DECLARE_FLAGS(LookUpMode, LookUpModeFlag)
00314 
00315   
00319   struct AutoLogin
00320   {
00321     QString type;
00322     QString machine;
00323     QString login;
00324     QString password;
00325     QMap<QString, QStringList> macdef;
00326   };
00327 
00332   static NetRC* self();
00333 
00344   bool lookup( const KUrl& url, AutoLogin& login,
00345                bool userealnetrc = false,
00346                const QString &type = QString(),
00347                LookUpMode mode = LookUpMode(exactOnly) | defaultOnly );
00351   void reload();
00352 
00353 protected:
00354   QString extract( const char*, const char*, int& );
00355   int openf( const QString& );
00356   bool parse( int );
00357 
00358 private:
00359   NetRC();
00360   ~NetRC();
00361 
00362 private:
00363   static NetRC* instance;
00364 
00365   class NetRCPrivate;
00366   NetRCPrivate* const d;
00367 };
00368 }
00369 Q_DECLARE_OPERATORS_FOR_FLAGS(KIO::NetRC::LookUpMode)
00370 
00371 #endif

KIO

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal