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

KIO

  • sources
  • kde-4.12
  • kdelibs
  • kio
  • kio
Macros | 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.

Macros

#define DISPATCH(f)   dispatch_##f
 

Functions

static QString extract (const QByteArray &buf, int &pos, const char c1= '\0')
 
static int find (const QByteArray &buf, int begin, const char c1)
 
static void ignoreWS (const QString &buf, int &pos)
 
static DataHeader parseDataHeader (const KUrl &url, const bool mimeOnly)
 
static QString parseQuotedString (const QString &buf, int &pos)
 

Macro Definition Documentation

#define DISPATCH (   f)    dispatch_##f

Definition at line 37 of file dataprotocol.cpp.

Function Documentation

static QString extract ( const QByteArray &  buf,
int &  pos,
const char  c1 = '\0' 
)
inlinestatic

extracts the string between the current position pos and the first occurrence of either c1 or comma (',') or semicolon (';') 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 or '\0' to ignore

Definition at line 108 of file dataprotocol.cpp.

static int find ( const QByteArray &  buf,
int  begin,
const char  c1 
)
static

returns the position of the first occurrence of any of the given characters c1 or comma (',') or semicolon (';') or buf.length() if none is contained.

Parameters
bufbuffer where to look for c
beginzero-indexed starting position
c1character to find or '\0' to ignore

Definition at line 85 of file dataprotocol.cpp.

static void ignoreWS ( const QString &  buf,
int &  pos 
)
inlinestatic

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 122 of file dataprotocol.cpp.

static DataHeader parseDataHeader ( const KUrl &  url,
const bool  mimeOnly 
)
static

parses the header of a data url

Parameters
urlthe data url
mimeOnlyif the only interesting information is the mime type
Returns
DataHeader structure with the header information

Definition at line 166 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 137 of file dataprotocol.cpp.

This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:50:03 by doxygen 1.8.7 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 API Reference

Skip menu "kdelibs 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
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



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