diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-14 19:47:20 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-14 19:47:20 +0000 |
commit | 875ae8e38bc3663e5057ca910e7ebe4b2994edb9 (patch) | |
tree | ddd3b3bc4d6f0343bae986aebbf9555c20f8e558 /python/pykde/sip/kio/authinfo.sip | |
parent | cb61a0436524f8ceba31db51ce3f1c5d4afbbb0e (diff) | |
download | tdebindings-875ae8e38bc3663e5057ca910e7ebe4b2994edb9.tar.gz tdebindings-875ae8e38bc3663e5057ca910e7ebe4b2994edb9.zip |
Updated python directory
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebindings@1175349 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'python/pykde/sip/kio/authinfo.sip')
-rw-r--r-- | python/pykde/sip/kio/authinfo.sip | 206 |
1 files changed, 0 insertions, 206 deletions
diff --git a/python/pykde/sip/kio/authinfo.sip b/python/pykde/sip/kio/authinfo.sip deleted file mode 100644 index 454e1ff8..00000000 --- a/python/pykde/sip/kio/authinfo.sip +++ /dev/null @@ -1,206 +0,0 @@ -// -// Copyright 2006 Jim Bublitz <jbublitz@nwinternet.com> -// Earlier copyrights 1998 - 2005 Jim Bublitz and/or Phil Thompson -// may also apply - - -// Generated by preSip -// module kio version KDE 3.5.3 - - -// This software is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License as -// published by the Free Software Foundation; either version 2 of -// the License, or (at your option) any later version. -// -// This software is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public -// License along with this library; see the file COPYING. -// If not, write to the Free Software Foundation, Inc., -// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -namespace KIO -{ - -class AuthInfo -{ -%TypeHeaderCode -#include <authinfo.h> -%End - - -public: - AuthInfo (); - AuthInfo (const KIO::AuthInfo&); - bool isModified () const; - void setModified (bool); - KURL url; - QString username; - QString password; - QString prompt; - QString caption; - QString comment; - QString commentLabel; - QString realmValue; - QString digestInfo; - bool verifyPath; - bool readOnly; - bool keepPassword; - -protected: - -}; // class AuthInfo - - -%If ( KDE_3_1_4 - ) -//igx QDataStream& operator << (QDataStream&, const KIO::AuthInfo&); -//igx QDataStream& operator >> (QDataStream&, KIO::AuthInfo&); -%End - - -class NetRC -{ -%TypeHeaderCode -#include <authinfo.h> -%End - - -public: - - enum LookUpMode - { - exactOnly, - defaultOnly, - presetOnly - }; - - - class AutoLogin - { - - public: - QString type; - QString machine; - QString login; - QString password; - KStringListMap macdef; - - }; // class AutoLogin - - -public: - static KIO::NetRC* self (); - bool lookup (const KURL&, KIO::NetRC::AutoLogin&, bool = 0, QString = QString ::null , int = 6); - void reload (); - -protected: -//ig QString extract (const char*, const char*, int&); - int openf (const QString&); - -%If ( KDE_3_2_0 - ) - bool parse (int); -%End - - -private: - NetRC (); - ~NetRC (); - -protected: - -%If ( - KDE_3_2_0 ) - void parse (int); -%End - - -}; // class NetRC - -}; // namespace KIO - - - -%MappedType KStringListMap -{ -//converts a Python dict of QString:QStringList -%TypeHeaderCode -#include <sipqtQString.h> -#include <sipqtQStringList.h> -#include <qmap.h> -typedef QMap<QString, QStringList> KStringListMap; -%End - -%ConvertFromTypeCode - // Convert to a Python dict. - - if (!sipCpp) - return PyDict_New(); - - PyObject *dict; - - // Create the dictionary. - - if ((dict = PyDict_New()) == NULL) - return NULL; - - // Get it. - - const QMap<QString, QStringList> map = *sipCpp; - QMap<QString, QStringList>::ConstIterator it; - - for (it = map.begin (); it != map.end (); ++it) - { - PyObject *sKey = PyString_FromString ((const char *)((QString)it.key ())); - PyObject *sData = sipConvertFromInstance ((void *)&it.data (), sipClass_QStringList, sipTransferObj); - - if ((sKey == NULL) || (sData == NULL) || (PyDict_SetItem (dict, sKey, sData) < 0)) - { - Py_XDECREF (sKey); - Py_XDECREF (sData); - Py_DECREF (dict); - return NULL; - } - } - - return dict; -%End - - -%ConvertToTypeCode - if (sipIsErr == NULL) - return PyDict_Check(sipPy); - - QMap<QString, QStringList> *map = new QMap<QString, QStringList>; - - PyObject *key, *value; - int pos = 0; - QString *sKey; - QStringList *sData; - - while (PyDict_Next(sipPy, &pos, &key, &value)) - { - int iserr = 0; - - sKey = (QString *)sipForceConvertTo_QString (key, &iserr); - sData = (QStringList *)sipForceConvertTo_QStringList (value, &iserr); - - if (iserr) - { - *sipIsErr = 1; - delete map; - return 0; - } - - map->insert (*sKey, *sData); - } - - *sipCppPtr = map; - - return 1; -%End -}; - - |