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

KIO

Defines | Functions
dataprotocol.cpp File Reference
#include "dataprotocol.h"
#include <kdebug.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 37 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 112 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 87 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 125 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 169 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 140 of file dataprotocol.cpp.

This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Thu May 10 2012 20:55:24 by doxygen 1.8.0 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.8.3 API Reference

Skip menu "kdelibs-4.8.3 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