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

KIO

Defines | Functions

dataprotocol.cpp File Reference

#include "dataprotocol.h"
#include <kdebug.h>
#include <kcodecs.h>
#include <kurl.h>
#include "global.h"
#include <kglobal.h>
#include <QtCore/QByteArray>
#include <QtCore/QCharRef>
#include <QtCore/QMutableStringListIterator>
#include <QtCore/QTextCodec>
Include dependency graph for dataprotocol.cpp:

Go to the source code of this file.

Defines

#define DISPATCH(f)   dispatch_##f

Functions

QString extract (const QString &buf, int &pos, QChar c1, QChar c2=QLatin1Char('\0'), QChar c3=QLatin1Char('\0'))
static int find (const QString &buf, int begin, QChar c1, QChar c2=QLatin1Char('\0'), QChar c3=QLatin1Char('\0'))
void ignoreWS (const QString &buf, int &pos)
static void parseDataHeader (const KUrl &url, DataHeader &header_info)
static QString parseQuotedString (const QString &buf, int &pos)

Define Documentation

#define DISPATCH (   f)    dispatch_##f

Definition at line 38 of file dataprotocol.cpp.


Function Documentation

QString extract ( const QString &  buf,
int &  pos,
QChar  c1,
QChar  c2 = QLatin1Char('\0'),
QChar  c3 = QLatin1Char('\0') 
) [inline]

extracts the string between the current position pos and the first occurrence of either c1 to c3 exclusively and updates pos to point at the found delimiter or at the end of the buffer if neither character occurred.

Parameters:
bufbuffer where to look for
poszero-indexed position within buffer
c1character to find
c2alternative character to find or 0 to ignore
c3alternative character to find or 0 to ignore

Definition at line 113 of file dataprotocol.cpp.

static int find ( const QString &  buf,
int  begin,
QChar  c1,
QChar  c2 = QLatin1Char('\0'),
QChar  c3 = QLatin1Char('\0') 
) [static]

returns the position of the first occurrence of any of the given characters c1 to c3 or buf.length() if none is contained.

Parameters:
bufbuffer where to look for c
beginzero-indexed starting position
c1character to find
c2alternative character to find or "\0" to ignore
c3alternative character to find or "\0" to ignore

Definition at line 88 of file dataprotocol.cpp.

void ignoreWS ( const QString &  buf,
int &  pos 
) [inline]

ignores all whitespaces

Parameters:
bufbuffer to operate on
posposition to shift to first non-whitespace character Upon return pos will either point to the first non-whitespace character or to the end of the buffer.

Definition at line 126 of file dataprotocol.cpp.

static void parseDataHeader ( const KUrl &  url,
DataHeader &  header_info 
) [static]

parses the header of a data url

Parameters:
urlthe data url
header_infofills the given DataHeader structure with the header information

Definition at line 170 of file dataprotocol.cpp.

static QString parseQuotedString ( const QString &  buf,
int &  pos 
) [static]

parses a quoted string as per rfc 822.

If trailing quote is missing, the whole rest of the buffer is returned.

Parameters:
bufbuffer to operate on
posposition pointing to the leading quote
Returns:
the extracted string. pos will be updated to point to the character following the trailing quote.

Definition at line 141 of file dataprotocol.cpp.

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
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.7.3
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